Orders by {@link FinderPattern#getCount()}, descending.
\n */\n // CenterComparator implements Comparator\n (center1, center2) => {\n if (center2.getCount() === center1.getCount()) {\n const dA = Math.abs(center2.getEstimatedModuleSize() - average);\n const dB = Math.abs(center1.getEstimatedModuleSize() - average);\n return dA < dB ? 1 : dA > dB ? -1 : 0;\n } else {\n return center2.getCount() - center1.getCount();\n }\n });\n possibleCenters.splice(3); // this is not realy necessary as we only return first 3 anyway\n }\n\n return [possibleCenters[0], possibleCenters[1], possibleCenters[2]];\n }\n }\n FinderPatternFinder.CENTER_QUORUM = 2;\n FinderPatternFinder.MIN_SKIP = 3; // 1 pixel/module times 3 modules/center\n FinderPatternFinder.MAX_MODULES = 57; // support up to version 10 for mobile clients\n\n /*\n * Copyright 2007 ZXing authors\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 /*import java.util.Map;*/\n /**\n * Encapsulates logic that can detect a QR Code in an image, even if the QR Code\n * is rotated or skewed, or partially obscured.
\n *\n * @author Sean Owen\n */\n return FinderPatternFinder;\n })();\n class Detector$2 {\n constructor(image) {\n this.image = image;\n }\n getImage() {\n return this.image;\n }\n getResultPointCallback() {\n return this.resultPointCallback;\n }\n /**\n * Detects a QR Code in an image.
\n *\n * @return {@link DetectorResult} encapsulating results of detecting a QR Code\n * @throws NotFoundException if QR Code cannot be found\n * @throws FormatException if a QR Code cannot be decoded\n */\n // public detect(): DetectorResult /*throws NotFoundException, FormatException*/ {\n // return detect(null)\n // }\n /**\n * Detects a QR Code in an image.
\n *\n * @param hints optional hints to detector\n * @return {@link DetectorResult} encapsulating results of detecting a QR Code\n * @throws NotFoundException if QR Code cannot be found\n * @throws FormatException if a QR Code cannot be decoded\n */\n detect(hints) {\n this.resultPointCallback = hints === null || hints === undefined ? null : /*(ResultPointCallback) */hints.get(DecodeHintType$1.NEED_RESULT_POINT_CALLBACK);\n const finder = new FinderPatternFinder(this.image, this.resultPointCallback);\n const info = finder.find(hints);\n return this.processFinderPatternInfo(info);\n }\n processFinderPatternInfo(info) {\n const topLeft = info.getTopLeft();\n const topRight = info.getTopRight();\n const bottomLeft = info.getBottomLeft();\n const moduleSize = this.calculateModuleSize(topLeft, topRight, bottomLeft);\n if (moduleSize < 1.0) {\n throw new NotFoundException('No pattern found in proccess finder.');\n }\n const dimension = Detector$2.computeDimension(topLeft, topRight, bottomLeft, moduleSize);\n const provisionalVersion = Version$1.getProvisionalVersionForDimension(dimension);\n const modulesBetweenFPCenters = provisionalVersion.getDimensionForVersion() - 7;\n let alignmentPattern = null;\n // Anything above version 1 has an alignment pattern\n if (provisionalVersion.getAlignmentPatternCenters().length > 0) {\n // Guess where a \"bottom right\" finder pattern would have been\n const bottomRightX = topRight.getX() - topLeft.getX() + bottomLeft.getX();\n const bottomRightY = topRight.getY() - topLeft.getY() + bottomLeft.getY();\n // Estimate that alignment pattern is closer by 3 modules\n // from \"bottom right\" to known top left location\n const correctionToTopLeft = 1.0 - 3.0 / modulesBetweenFPCenters;\n const estAlignmentX = /*(int) */Math.floor(topLeft.getX() + correctionToTopLeft * (bottomRightX - topLeft.getX()));\n const estAlignmentY = /*(int) */Math.floor(topLeft.getY() + correctionToTopLeft * (bottomRightY - topLeft.getY()));\n // Kind of arbitrary -- expand search radius before giving up\n for (let i = 4; i <= 16; i <<= 1) {\n try {\n alignmentPattern = this.findAlignmentInRegion(moduleSize, estAlignmentX, estAlignmentY, i);\n break;\n } catch (re /*NotFoundException*/) {\n if (!(re instanceof NotFoundException)) {\n throw re;\n }\n // try next round\n }\n }\n // If we didn't find alignment pattern... well try anyway without it\n }\n\n const transform = Detector$2.createTransform(topLeft, topRight, bottomLeft, alignmentPattern, dimension);\n const bits = Detector$2.sampleGrid(this.image, transform, dimension);\n let points;\n if (alignmentPattern === null) {\n points = [bottomLeft, topLeft, topRight];\n } else {\n points = [bottomLeft, topLeft, topRight, alignmentPattern];\n }\n return new DetectorResult(bits, points);\n }\n static createTransform(topLeft, topRight, bottomLeft, alignmentPattern, dimension /*int*/) {\n const dimMinusThree = dimension - 3.5;\n let bottomRightX; /*float*/\n let bottomRightY; /*float*/\n let sourceBottomRightX; /*float*/\n let sourceBottomRightY; /*float*/\n if (alignmentPattern !== null) {\n bottomRightX = alignmentPattern.getX();\n bottomRightY = alignmentPattern.getY();\n sourceBottomRightX = dimMinusThree - 3.0;\n sourceBottomRightY = sourceBottomRightX;\n } else {\n // Don't have an alignment pattern, just make up the bottom-right point\n bottomRightX = topRight.getX() - topLeft.getX() + bottomLeft.getX();\n bottomRightY = topRight.getY() - topLeft.getY() + bottomLeft.getY();\n sourceBottomRightX = dimMinusThree;\n sourceBottomRightY = dimMinusThree;\n }\n return PerspectiveTransform.quadrilateralToQuadrilateral(3.5, 3.5, dimMinusThree, 3.5, sourceBottomRightX, sourceBottomRightY, 3.5, dimMinusThree, topLeft.getX(), topLeft.getY(), topRight.getX(), topRight.getY(), bottomRightX, bottomRightY, bottomLeft.getX(), bottomLeft.getY());\n }\n static sampleGrid(image, transform, dimension /*int*/) {\n const sampler = GridSamplerInstance.getInstance();\n return sampler.sampleGridWithTransform(image, dimension, dimension, transform);\n }\n /**\n * Computes the dimension (number of modules on a size) of the QR Code based on the position\n * of the finder patterns and estimated module size.
\n */\n static computeDimension(topLeft, topRight, bottomLeft, moduleSize /*float*/) {\n const tltrCentersDimension = MathUtils.round(ResultPoint.distance(topLeft, topRight) / moduleSize);\n const tlblCentersDimension = MathUtils.round(ResultPoint.distance(topLeft, bottomLeft) / moduleSize);\n let dimension = Math.floor((tltrCentersDimension + tlblCentersDimension) / 2) + 7;\n switch (dimension & 0x03) {\n // mod 4\n case 0:\n dimension++;\n break;\n // 1? do nothing\n case 2:\n dimension--;\n break;\n case 3:\n throw new NotFoundException('Dimensions could be not found.');\n }\n return dimension;\n }\n /**\n * Computes an average estimated module size based on estimated derived from the positions\n * of the three finder patterns.
\n *\n * @param topLeft detected top-left finder pattern center\n * @param topRight detected top-right finder pattern center\n * @param bottomLeft detected bottom-left finder pattern center\n * @return estimated module size\n */\n calculateModuleSize(topLeft, topRight, bottomLeft) {\n // Take the average\n return (this.calculateModuleSizeOneWay(topLeft, topRight) + this.calculateModuleSizeOneWay(topLeft, bottomLeft)) / 2.0;\n }\n /**\n * Estimates module size based on two finder patterns -- it uses\n * {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the\n * width of each, measuring along the axis between their centers.
\n */\n calculateModuleSizeOneWay(pattern, otherPattern) {\n const moduleSizeEst1 = this.sizeOfBlackWhiteBlackRunBothWays( /*(int) */Math.floor(pattern.getX()), /*(int) */Math.floor(pattern.getY()), /*(int) */Math.floor(otherPattern.getX()), /*(int) */Math.floor(otherPattern.getY()));\n const moduleSizeEst2 = this.sizeOfBlackWhiteBlackRunBothWays( /*(int) */Math.floor(otherPattern.getX()), /*(int) */Math.floor(otherPattern.getY()), /*(int) */Math.floor(pattern.getX()), /*(int) */Math.floor(pattern.getY()));\n if (isNaN(moduleSizeEst1)) {\n return moduleSizeEst2 / 7.0;\n }\n if (isNaN(moduleSizeEst2)) {\n return moduleSizeEst1 / 7.0;\n }\n // Average them, and divide by 7 since we've counted the width of 3 black modules,\n // and 1 white and 1 black module on either side. Ergo, divide sum by 14.\n return (moduleSizeEst1 + moduleSizeEst2) / 14.0;\n }\n /**\n * See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of\n * a finder pattern by looking for a black-white-black run from the center in the direction\n * of another point (another finder pattern center), and in the opposite direction too.\n */\n sizeOfBlackWhiteBlackRunBothWays(fromX /*int*/, fromY /*int*/, toX /*int*/, toY /*int*/) {\n let result = this.sizeOfBlackWhiteBlackRun(fromX, fromY, toX, toY);\n // Now count other way -- don't run off image though of course\n let scale = 1.0;\n let otherToX = fromX - (toX - fromX);\n if (otherToX < 0) {\n scale = fromX / ( /*(float) */fromX - otherToX);\n otherToX = 0;\n } else if (otherToX >= this.image.getWidth()) {\n scale = (this.image.getWidth() - 1 - fromX) / ( /*(float) */otherToX - fromX);\n otherToX = this.image.getWidth() - 1;\n }\n let otherToY = /*(int) */Math.floor(fromY - (toY - fromY) * scale);\n scale = 1.0;\n if (otherToY < 0) {\n scale = fromY / ( /*(float) */fromY - otherToY);\n otherToY = 0;\n } else if (otherToY >= this.image.getHeight()) {\n scale = (this.image.getHeight() - 1 - fromY) / ( /*(float) */otherToY - fromY);\n otherToY = this.image.getHeight() - 1;\n }\n otherToX = /*(int) */Math.floor(fromX + (otherToX - fromX) * scale);\n result += this.sizeOfBlackWhiteBlackRun(fromX, fromY, otherToX, otherToY);\n // Middle pixel is double-counted this way; subtract 1\n return result - 1.0;\n }\n /**\n * This method traces a line from a point in the image, in the direction towards another point.\n * It begins in a black region, and keeps going until it finds white, then black, then white again.\n * It reports the distance from the start to this point.
\n *\n * This is used when figuring out how wide a finder pattern is, when the finder pattern\n * may be skewed or rotated.
\n */\n sizeOfBlackWhiteBlackRun(fromX /*int*/, fromY /*int*/, toX /*int*/, toY /*int*/) {\n // Mild variant of Bresenham's algorithm\n // see http://en.wikipedia.org/wiki/Bresenham's_line_algorithm\n const steep = Math.abs(toY - fromY) > Math.abs(toX - fromX);\n if (steep) {\n let temp = fromX;\n fromX = fromY;\n fromY = temp;\n temp = toX;\n toX = toY;\n toY = temp;\n }\n const dx = Math.abs(toX - fromX);\n const dy = Math.abs(toY - fromY);\n let error = -dx / 2;\n const xstep = fromX < toX ? 1 : -1;\n const ystep = fromY < toY ? 1 : -1;\n // In black pixels, looking for white, first or second time.\n let state = 0;\n // Loop up until x == toX, but not beyond\n const xLimit = toX + xstep;\n for (let x = fromX, y = fromY; x !== xLimit; x += xstep) {\n const realX = steep ? y : x;\n const realY = steep ? x : y;\n // Does current pixel mean we have moved white to black or vice versa?\n // Scanning black in state 0,2 and white in state 1, so if we find the wrong\n // color, advance to next state or end if we are in state 2 already\n if (state === 1 === this.image.get(realX, realY)) {\n if (state === 2) {\n return MathUtils.distance(x, y, fromX, fromY);\n }\n state++;\n }\n error += dy;\n if (error > 0) {\n if (y === toY) {\n break;\n }\n y += ystep;\n error -= dx;\n }\n }\n // Found black-white-black; give the benefit of the doubt that the next pixel outside the image\n // is \"white\" so this last point at (toX+xStep,toY) is the right ending. This is really a\n // small approximation; (toX+xStep,toY+yStep) might be really correct. Ignore this.\n if (state === 2) {\n return MathUtils.distance(toX + xstep, toY, fromX, fromY);\n }\n // else we didn't find even black-white-black; no estimate is really possible\n return NaN;\n }\n /**\n * Attempts to locate an alignment pattern in a limited region of the image, which is\n * guessed to contain it. This method uses {@link AlignmentPattern}.
\n *\n * @param overallEstModuleSize estimated module size so far\n * @param estAlignmentX x coordinate of center of area probably containing alignment pattern\n * @param estAlignmentY y coordinate of above\n * @param allowanceFactor number of pixels in all directions to search from the center\n * @return {@link AlignmentPattern} if found, or null otherwise\n * @throws NotFoundException if an unexpected error occurs during detection\n */\n findAlignmentInRegion(overallEstModuleSize /*float*/, estAlignmentX /*int*/, estAlignmentY /*int*/, allowanceFactor /*float*/) {\n // Look for an alignment pattern (3 modules in size) around where it\n // should be\n const allowance = /*(int) */Math.floor(allowanceFactor * overallEstModuleSize);\n const alignmentAreaLeftX = Math.max(0, estAlignmentX - allowance);\n const alignmentAreaRightX = Math.min(this.image.getWidth() - 1, estAlignmentX + allowance);\n if (alignmentAreaRightX - alignmentAreaLeftX < overallEstModuleSize * 3) {\n throw new NotFoundException('Alignment top exceeds estimated module size.');\n }\n const alignmentAreaTopY = Math.max(0, estAlignmentY - allowance);\n const alignmentAreaBottomY = Math.min(this.image.getHeight() - 1, estAlignmentY + allowance);\n if (alignmentAreaBottomY - alignmentAreaTopY < overallEstModuleSize * 3) {\n throw new NotFoundException('Alignment bottom exceeds estimated module size.');\n }\n const alignmentFinder = new AlignmentPatternFinder(this.image, alignmentAreaLeftX, alignmentAreaTopY, alignmentAreaRightX - alignmentAreaLeftX, alignmentAreaBottomY - alignmentAreaTopY, overallEstModuleSize, this.resultPointCallback);\n return alignmentFinder.find();\n }\n }\n\n /*\n * Copyright 2007 ZXing authors\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 /*import java.util.List;*/\n /*import java.util.Map;*/\n /**\n * This implementation can detect and decode QR Codes in an image.\n *\n * @author Sean Owen\n */\n class QRCodeReader {\n constructor() {\n this.decoder = new Decoder$2();\n }\n getDecoder() {\n return this.decoder;\n }\n /**\n * Locates and decodes a QR code in an image.\n *\n * @return a representing: string the content encoded by the QR code\n * @throws NotFoundException if a QR code cannot be found\n * @throws FormatException if a QR code cannot be decoded\n * @throws ChecksumException if error correction fails\n */\n /*@Override*/\n // public decode(image: BinaryBitmap): Result /*throws NotFoundException, ChecksumException, FormatException */ {\n // return this.decode(image, null)\n // }\n /*@Override*/\n decode(image, hints) {\n let decoderResult;\n let points;\n if (hints !== undefined && hints !== null && undefined !== hints.get(DecodeHintType$1.PURE_BARCODE)) {\n const bits = QRCodeReader.extractPureBits(image.getBlackMatrix());\n decoderResult = this.decoder.decodeBitMatrix(bits, hints);\n points = QRCodeReader.NO_POINTS;\n } else {\n const detectorResult = new Detector$2(image.getBlackMatrix()).detect(hints);\n decoderResult = this.decoder.decodeBitMatrix(detectorResult.getBits(), hints);\n points = detectorResult.getPoints();\n }\n // If the code was mirrored: swap the bottom-left and the top-right points.\n if (decoderResult.getOther() instanceof QRCodeDecoderMetaData) {\n decoderResult.getOther().applyMirroredCorrection(points);\n }\n const result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), undefined, points, BarcodeFormat$1.QR_CODE, undefined);\n const byteSegments = decoderResult.getByteSegments();\n if (byteSegments !== null) {\n result.putMetadata(ResultMetadataType$1.BYTE_SEGMENTS, byteSegments);\n }\n const ecLevel = decoderResult.getECLevel();\n if (ecLevel !== null) {\n result.putMetadata(ResultMetadataType$1.ERROR_CORRECTION_LEVEL, ecLevel);\n }\n if (decoderResult.hasStructuredAppend()) {\n result.putMetadata(ResultMetadataType$1.STRUCTURED_APPEND_SEQUENCE, decoderResult.getStructuredAppendSequenceNumber());\n result.putMetadata(ResultMetadataType$1.STRUCTURED_APPEND_PARITY, decoderResult.getStructuredAppendParity());\n }\n return result;\n }\n /*@Override*/\n reset() {\n // do nothing\n }\n /**\n * This method detects a code in a \"pure\" image -- that is, pure monochrome image\n * which contains only an unrotated, unskewed, image of a code, with some white border\n * around it. This is a specialized method that works exceptionally fast in this special\n * case.\n *\n * @see com.google.zxing.datamatrix.DataMatrixReader#extractPureBits(BitMatrix)\n */\n static extractPureBits(image) {\n const leftTopBlack = image.getTopLeftOnBit();\n const rightBottomBlack = image.getBottomRightOnBit();\n if (leftTopBlack === null || rightBottomBlack === null) {\n throw new NotFoundException();\n }\n const moduleSize = this.moduleSize(leftTopBlack, image);\n let top = leftTopBlack[1];\n let bottom = rightBottomBlack[1];\n let left = leftTopBlack[0];\n let right = rightBottomBlack[0];\n // Sanity check!\n if (left >= right || top >= bottom) {\n throw new NotFoundException();\n }\n if (bottom - top !== right - left) {\n // Special case, where bottom-right module wasn't black so we found something else in the last row\n // Assume it's a square, so use height as the width\n right = left + (bottom - top);\n if (right >= image.getWidth()) {\n // Abort if that would not make sense -- off image\n throw new NotFoundException();\n }\n }\n const matrixWidth = Math.round((right - left + 1) / moduleSize);\n const matrixHeight = Math.round((bottom - top + 1) / moduleSize);\n if (matrixWidth <= 0 || matrixHeight <= 0) {\n throw new NotFoundException();\n }\n if (matrixHeight !== matrixWidth) {\n // Only possibly decode square regions\n throw new NotFoundException();\n }\n // Push in the \"border\" by half the module width so that we start\n // sampling in the middle of the module. Just in case the image is a\n // little off, this will help recover.\n const nudge = /*(int) */Math.floor(moduleSize / 2.0);\n top += nudge;\n left += nudge;\n // But careful that this does not sample off the edge\n // \"right\" is the farthest-right valid pixel location -- right+1 is not necessarily\n // This is positive by how much the inner x loop below would be too large\n const nudgedTooFarRight = left + /*(int) */Math.floor((matrixWidth - 1) * moduleSize) - right;\n if (nudgedTooFarRight > 0) {\n if (nudgedTooFarRight > nudge) {\n // Neither way fits; abort\n throw new NotFoundException();\n }\n left -= nudgedTooFarRight;\n }\n // See logic above\n const nudgedTooFarDown = top + /*(int) */Math.floor((matrixHeight - 1) * moduleSize) - bottom;\n if (nudgedTooFarDown > 0) {\n if (nudgedTooFarDown > nudge) {\n // Neither way fits; abort\n throw new NotFoundException();\n }\n top -= nudgedTooFarDown;\n }\n // Now just read off the bits\n const bits = new BitMatrix(matrixWidth, matrixHeight);\n for (let y = 0; y < matrixHeight; y++) {\n const iOffset = top + /*(int) */Math.floor(y * moduleSize);\n for (let x = 0; x < matrixWidth; x++) {\n if (image.get(left + /*(int) */Math.floor(x * moduleSize), iOffset)) {\n bits.set(x, y);\n }\n }\n }\n return bits;\n }\n static moduleSize(leftTopBlack, image) {\n const height = image.getHeight();\n const width = image.getWidth();\n let x = leftTopBlack[0];\n let y = leftTopBlack[1];\n let inBlack = true;\n let transitions = 0;\n while (x < width && y < height) {\n if (inBlack !== image.get(x, y)) {\n if (++transitions === 5) {\n break;\n }\n inBlack = !inBlack;\n }\n x++;\n y++;\n }\n if (x === width || y === height) {\n throw new NotFoundException();\n }\n return (x - leftTopBlack[0]) / 7.0;\n }\n }\n QRCodeReader.NO_POINTS = new Array();\n\n /*\n * Copyright 2009 ZXing authors\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 * @author SITA Lab (kevin.osullivan@sita.aero)\n * @author Guenther Grau\n */\n /*public final*/\n class PDF417Common {\n PDF417Common() {}\n /**\n * @param moduleBitCount values to sum\n * @return sum of values\n * @deprecated call {@link MathUtils#sum(int[])}\n */\n // @Deprecated\n static getBitCountSum(moduleBitCount) {\n return MathUtils.sum(moduleBitCount);\n }\n static toIntArray(list) {\n if (list == null || !list.length) {\n return PDF417Common.EMPTY_INT_ARRAY;\n }\n const result = new Int32Array(list.length);\n let i = 0;\n for (const integer of list) {\n result[i++] = integer;\n }\n return result;\n }\n /**\n * @param symbol encoded symbol to translate to a codeword\n * @return the codeword corresponding to the symbol.\n */\n static getCodeword(symbol /*int*/) {\n const i = Arrays.binarySearch(PDF417Common.SYMBOL_TABLE, symbol & 0x3FFFF);\n if (i < 0) {\n return -1;\n }\n return (PDF417Common.CODEWORD_TABLE[i] - 1) % PDF417Common.NUMBER_OF_CODEWORDS;\n }\n }\n PDF417Common.NUMBER_OF_CODEWORDS = 929;\n // Maximum Codewords (Data + Error).\n PDF417Common.MAX_CODEWORDS_IN_BARCODE = PDF417Common.NUMBER_OF_CODEWORDS - 1;\n PDF417Common.MIN_ROWS_IN_BARCODE = 3;\n PDF417Common.MAX_ROWS_IN_BARCODE = 90;\n // One left row indication column + max 30 data columns + one right row indicator column\n // public static /*final*/ MAX_CODEWORDS_IN_ROW: /*int*/ number = 32;\n PDF417Common.MODULES_IN_CODEWORD = 17;\n PDF417Common.MODULES_IN_STOP_PATTERN = 18;\n PDF417Common.BARS_IN_MODULE = 8;\n PDF417Common.EMPTY_INT_ARRAY = new Int32Array([]);\n /**\n * The sorted table of all possible symbols. Extracted from the PDF417\n * specification. The index of a symbol in this table corresponds to the\n * index into the codeword table.\n */\n PDF417Common.SYMBOL_TABLE = Int32Array.from([0x1025e, 0x1027a, 0x1029e, 0x102bc, 0x102f2, 0x102f4, 0x1032e, 0x1034e, 0x1035c, 0x10396, 0x103a6, 0x103ac, 0x10422, 0x10428, 0x10436, 0x10442, 0x10444, 0x10448, 0x10450, 0x1045e, 0x10466, 0x1046c, 0x1047a, 0x10482, 0x1049e, 0x104a0, 0x104bc, 0x104c6, 0x104d8, 0x104ee, 0x104f2, 0x104f4, 0x10504, 0x10508, 0x10510, 0x1051e, 0x10520, 0x1053c, 0x10540, 0x10578, 0x10586, 0x1058c, 0x10598, 0x105b0, 0x105be, 0x105ce, 0x105dc, 0x105e2, 0x105e4, 0x105e8, 0x105f6, 0x1062e, 0x1064e, 0x1065c, 0x1068e, 0x1069c, 0x106b8, 0x106de, 0x106fa, 0x10716, 0x10726, 0x1072c, 0x10746, 0x1074c, 0x10758, 0x1076e, 0x10792, 0x10794, 0x107a2, 0x107a4, 0x107a8, 0x107b6, 0x10822, 0x10828, 0x10842, 0x10848, 0x10850, 0x1085e, 0x10866, 0x1086c, 0x1087a, 0x10882, 0x10884, 0x10890, 0x1089e, 0x108a0, 0x108bc, 0x108c6, 0x108cc, 0x108d8, 0x108ee, 0x108f2, 0x108f4, 0x10902, 0x10908, 0x1091e, 0x10920, 0x1093c, 0x10940, 0x10978, 0x10986, 0x10998, 0x109b0, 0x109be, 0x109ce, 0x109dc, 0x109e2, 0x109e4, 0x109e8, 0x109f6, 0x10a08, 0x10a10, 0x10a1e, 0x10a20, 0x10a3c, 0x10a40, 0x10a78, 0x10af0, 0x10b06, 0x10b0c, 0x10b18, 0x10b30, 0x10b3e, 0x10b60, 0x10b7c, 0x10b8e, 0x10b9c, 0x10bb8, 0x10bc2, 0x10bc4, 0x10bc8, 0x10bd0, 0x10bde, 0x10be6, 0x10bec, 0x10c2e, 0x10c4e, 0x10c5c, 0x10c62, 0x10c64, 0x10c68, 0x10c76, 0x10c8e, 0x10c9c, 0x10cb8, 0x10cc2, 0x10cc4, 0x10cc8, 0x10cd0, 0x10cde, 0x10ce6, 0x10cec, 0x10cfa, 0x10d0e, 0x10d1c, 0x10d38, 0x10d70, 0x10d7e, 0x10d82, 0x10d84, 0x10d88, 0x10d90, 0x10d9e, 0x10da0, 0x10dbc, 0x10dc6, 0x10dcc, 0x10dd8, 0x10dee, 0x10df2, 0x10df4, 0x10e16, 0x10e26, 0x10e2c, 0x10e46, 0x10e58, 0x10e6e, 0x10e86, 0x10e8c, 0x10e98, 0x10eb0, 0x10ebe, 0x10ece, 0x10edc, 0x10f0a, 0x10f12, 0x10f14, 0x10f22, 0x10f28, 0x10f36, 0x10f42, 0x10f44, 0x10f48, 0x10f50, 0x10f5e, 0x10f66, 0x10f6c, 0x10fb2, 0x10fb4, 0x11022, 0x11028, 0x11042, 0x11048, 0x11050, 0x1105e, 0x1107a, 0x11082, 0x11084, 0x11090, 0x1109e, 0x110a0, 0x110bc, 0x110c6, 0x110cc, 0x110d8, 0x110ee, 0x110f2, 0x110f4, 0x11102, 0x1111e, 0x11120, 0x1113c, 0x11140, 0x11178, 0x11186, 0x11198, 0x111b0, 0x111be, 0x111ce, 0x111dc, 0x111e2, 0x111e4, 0x111e8, 0x111f6, 0x11208, 0x1121e, 0x11220, 0x11278, 0x112f0, 0x1130c, 0x11330, 0x1133e, 0x11360, 0x1137c, 0x1138e, 0x1139c, 0x113b8, 0x113c2, 0x113c8, 0x113d0, 0x113de, 0x113e6, 0x113ec, 0x11408, 0x11410, 0x1141e, 0x11420, 0x1143c, 0x11440, 0x11478, 0x114f0, 0x115e0, 0x1160c, 0x11618, 0x11630, 0x1163e, 0x11660, 0x1167c, 0x116c0, 0x116f8, 0x1171c, 0x11738, 0x11770, 0x1177e, 0x11782, 0x11784, 0x11788, 0x11790, 0x1179e, 0x117a0, 0x117bc, 0x117c6, 0x117cc, 0x117d8, 0x117ee, 0x1182e, 0x11834, 0x1184e, 0x1185c, 0x11862, 0x11864, 0x11868, 0x11876, 0x1188e, 0x1189c, 0x118b8, 0x118c2, 0x118c8, 0x118d0, 0x118de, 0x118e6, 0x118ec, 0x118fa, 0x1190e, 0x1191c, 0x11938, 0x11970, 0x1197e, 0x11982, 0x11984, 0x11990, 0x1199e, 0x119a0, 0x119bc, 0x119c6, 0x119cc, 0x119d8, 0x119ee, 0x119f2, 0x119f4, 0x11a0e, 0x11a1c, 0x11a38, 0x11a70, 0x11a7e, 0x11ae0, 0x11afc, 0x11b08, 0x11b10, 0x11b1e, 0x11b20, 0x11b3c, 0x11b40, 0x11b78, 0x11b8c, 0x11b98, 0x11bb0, 0x11bbe, 0x11bce, 0x11bdc, 0x11be2, 0x11be4, 0x11be8, 0x11bf6, 0x11c16, 0x11c26, 0x11c2c, 0x11c46, 0x11c4c, 0x11c58, 0x11c6e, 0x11c86, 0x11c98, 0x11cb0, 0x11cbe, 0x11cce, 0x11cdc, 0x11ce2, 0x11ce4, 0x11ce8, 0x11cf6, 0x11d06, 0x11d0c, 0x11d18, 0x11d30, 0x11d3e, 0x11d60, 0x11d7c, 0x11d8e, 0x11d9c, 0x11db8, 0x11dc4, 0x11dc8, 0x11dd0, 0x11dde, 0x11de6, 0x11dec, 0x11dfa, 0x11e0a, 0x11e12, 0x11e14, 0x11e22, 0x11e24, 0x11e28, 0x11e36, 0x11e42, 0x11e44, 0x11e50, 0x11e5e, 0x11e66, 0x11e6c, 0x11e82, 0x11e84, 0x11e88, 0x11e90, 0x11e9e, 0x11ea0, 0x11ebc, 0x11ec6, 0x11ecc, 0x11ed8, 0x11eee, 0x11f1a, 0x11f2e, 0x11f32, 0x11f34, 0x11f4e, 0x11f5c, 0x11f62, 0x11f64, 0x11f68, 0x11f76, 0x12048, 0x1205e, 0x12082, 0x12084, 0x12090, 0x1209e, 0x120a0, 0x120bc, 0x120d8, 0x120f2, 0x120f4, 0x12108, 0x1211e, 0x12120, 0x1213c, 0x12140, 0x12178, 0x12186, 0x12198, 0x121b0, 0x121be, 0x121e2, 0x121e4, 0x121e8, 0x121f6, 0x12204, 0x12210, 0x1221e, 0x12220, 0x12278, 0x122f0, 0x12306, 0x1230c, 0x12330, 0x1233e, 0x12360, 0x1237c, 0x1238e, 0x1239c, 0x123b8, 0x123c2, 0x123c8, 0x123d0, 0x123e6, 0x123ec, 0x1241e, 0x12420, 0x1243c, 0x124f0, 0x125e0, 0x12618, 0x1263e, 0x12660, 0x1267c, 0x126c0, 0x126f8, 0x12738, 0x12770, 0x1277e, 0x12782, 0x12784, 0x12790, 0x1279e, 0x127a0, 0x127bc, 0x127c6, 0x127cc, 0x127d8, 0x127ee, 0x12820, 0x1283c, 0x12840, 0x12878, 0x128f0, 0x129e0, 0x12bc0, 0x12c18, 0x12c30, 0x12c3e, 0x12c60, 0x12c7c, 0x12cc0, 0x12cf8, 0x12df0, 0x12e1c, 0x12e38, 0x12e70, 0x12e7e, 0x12ee0, 0x12efc, 0x12f04, 0x12f08, 0x12f10, 0x12f20, 0x12f3c, 0x12f40, 0x12f78, 0x12f86, 0x12f8c, 0x12f98, 0x12fb0, 0x12fbe, 0x12fce, 0x12fdc, 0x1302e, 0x1304e, 0x1305c, 0x13062, 0x13068, 0x1308e, 0x1309c, 0x130b8, 0x130c2, 0x130c8, 0x130d0, 0x130de, 0x130ec, 0x130fa, 0x1310e, 0x13138, 0x13170, 0x1317e, 0x13182, 0x13184, 0x13190, 0x1319e, 0x131a0, 0x131bc, 0x131c6, 0x131cc, 0x131d8, 0x131f2, 0x131f4, 0x1320e, 0x1321c, 0x13270, 0x1327e, 0x132e0, 0x132fc, 0x13308, 0x1331e, 0x13320, 0x1333c, 0x13340, 0x13378, 0x13386, 0x13398, 0x133b0, 0x133be, 0x133ce, 0x133dc, 0x133e2, 0x133e4, 0x133e8, 0x133f6, 0x1340e, 0x1341c, 0x13438, 0x13470, 0x1347e, 0x134e0, 0x134fc, 0x135c0, 0x135f8, 0x13608, 0x13610, 0x1361e, 0x13620, 0x1363c, 0x13640, 0x13678, 0x136f0, 0x1370c, 0x13718, 0x13730, 0x1373e, 0x13760, 0x1377c, 0x1379c, 0x137b8, 0x137c2, 0x137c4, 0x137c8, 0x137d0, 0x137de, 0x137e6, 0x137ec, 0x13816, 0x13826, 0x1382c, 0x13846, 0x1384c, 0x13858, 0x1386e, 0x13874, 0x13886, 0x13898, 0x138b0, 0x138be, 0x138ce, 0x138dc, 0x138e2, 0x138e4, 0x138e8, 0x13906, 0x1390c, 0x13930, 0x1393e, 0x13960, 0x1397c, 0x1398e, 0x1399c, 0x139b8, 0x139c8, 0x139d0, 0x139de, 0x139e6, 0x139ec, 0x139fa, 0x13a06, 0x13a0c, 0x13a18, 0x13a30, 0x13a3e, 0x13a60, 0x13a7c, 0x13ac0, 0x13af8, 0x13b0e, 0x13b1c, 0x13b38, 0x13b70, 0x13b7e, 0x13b88, 0x13b90, 0x13b9e, 0x13ba0, 0x13bbc, 0x13bcc, 0x13bd8, 0x13bee, 0x13bf2, 0x13bf4, 0x13c12, 0x13c14, 0x13c22, 0x13c24, 0x13c28, 0x13c36, 0x13c42, 0x13c48, 0x13c50, 0x13c5e, 0x13c66, 0x13c6c, 0x13c82, 0x13c84, 0x13c90, 0x13c9e, 0x13ca0, 0x13cbc, 0x13cc6, 0x13ccc, 0x13cd8, 0x13cee, 0x13d02, 0x13d04, 0x13d08, 0x13d10, 0x13d1e, 0x13d20, 0x13d3c, 0x13d40, 0x13d78, 0x13d86, 0x13d8c, 0x13d98, 0x13db0, 0x13dbe, 0x13dce, 0x13ddc, 0x13de4, 0x13de8, 0x13df6, 0x13e1a, 0x13e2e, 0x13e32, 0x13e34, 0x13e4e, 0x13e5c, 0x13e62, 0x13e64, 0x13e68, 0x13e76, 0x13e8e, 0x13e9c, 0x13eb8, 0x13ec2, 0x13ec4, 0x13ec8, 0x13ed0, 0x13ede, 0x13ee6, 0x13eec, 0x13f26, 0x13f2c, 0x13f3a, 0x13f46, 0x13f4c, 0x13f58, 0x13f6e, 0x13f72, 0x13f74, 0x14082, 0x1409e, 0x140a0, 0x140bc, 0x14104, 0x14108, 0x14110, 0x1411e, 0x14120, 0x1413c, 0x14140, 0x14178, 0x1418c, 0x14198, 0x141b0, 0x141be, 0x141e2, 0x141e4, 0x141e8, 0x14208, 0x14210, 0x1421e, 0x14220, 0x1423c, 0x14240, 0x14278, 0x142f0, 0x14306, 0x1430c, 0x14318, 0x14330, 0x1433e, 0x14360, 0x1437c, 0x1438e, 0x143c2, 0x143c4, 0x143c8, 0x143d0, 0x143e6, 0x143ec, 0x14408, 0x14410, 0x1441e, 0x14420, 0x1443c, 0x14440, 0x14478, 0x144f0, 0x145e0, 0x1460c, 0x14618, 0x14630, 0x1463e, 0x14660, 0x1467c, 0x146c0, 0x146f8, 0x1471c, 0x14738, 0x14770, 0x1477e, 0x14782, 0x14784, 0x14788, 0x14790, 0x147a0, 0x147bc, 0x147c6, 0x147cc, 0x147d8, 0x147ee, 0x14810, 0x14820, 0x1483c, 0x14840, 0x14878, 0x148f0, 0x149e0, 0x14bc0, 0x14c30, 0x14c3e, 0x14c60, 0x14c7c, 0x14cc0, 0x14cf8, 0x14df0, 0x14e38, 0x14e70, 0x14e7e, 0x14ee0, 0x14efc, 0x14f04, 0x14f08, 0x14f10, 0x14f1e, 0x14f20, 0x14f3c, 0x14f40, 0x14f78, 0x14f86, 0x14f8c, 0x14f98, 0x14fb0, 0x14fce, 0x14fdc, 0x15020, 0x15040, 0x15078, 0x150f0, 0x151e0, 0x153c0, 0x15860, 0x1587c, 0x158c0, 0x158f8, 0x159f0, 0x15be0, 0x15c70, 0x15c7e, 0x15ce0, 0x15cfc, 0x15dc0, 0x15df8, 0x15e08, 0x15e10, 0x15e20, 0x15e40, 0x15e78, 0x15ef0, 0x15f0c, 0x15f18, 0x15f30, 0x15f60, 0x15f7c, 0x15f8e, 0x15f9c, 0x15fb8, 0x1604e, 0x1605c, 0x1608e, 0x1609c, 0x160b8, 0x160c2, 0x160c4, 0x160c8, 0x160de, 0x1610e, 0x1611c, 0x16138, 0x16170, 0x1617e, 0x16184, 0x16188, 0x16190, 0x1619e, 0x161a0, 0x161bc, 0x161c6, 0x161cc, 0x161d8, 0x161f2, 0x161f4, 0x1620e, 0x1621c, 0x16238, 0x16270, 0x1627e, 0x162e0, 0x162fc, 0x16304, 0x16308, 0x16310, 0x1631e, 0x16320, 0x1633c, 0x16340, 0x16378, 0x16386, 0x1638c, 0x16398, 0x163b0, 0x163be, 0x163ce, 0x163dc, 0x163e2, 0x163e4, 0x163e8, 0x163f6, 0x1640e, 0x1641c, 0x16438, 0x16470, 0x1647e, 0x164e0, 0x164fc, 0x165c0, 0x165f8, 0x16610, 0x1661e, 0x16620, 0x1663c, 0x16640, 0x16678, 0x166f0, 0x16718, 0x16730, 0x1673e, 0x16760, 0x1677c, 0x1678e, 0x1679c, 0x167b8, 0x167c2, 0x167c4, 0x167c8, 0x167d0, 0x167de, 0x167e6, 0x167ec, 0x1681c, 0x16838, 0x16870, 0x168e0, 0x168fc, 0x169c0, 0x169f8, 0x16bf0, 0x16c10, 0x16c1e, 0x16c20, 0x16c3c, 0x16c40, 0x16c78, 0x16cf0, 0x16de0, 0x16e18, 0x16e30, 0x16e3e, 0x16e60, 0x16e7c, 0x16ec0, 0x16ef8, 0x16f1c, 0x16f38, 0x16f70, 0x16f7e, 0x16f84, 0x16f88, 0x16f90, 0x16f9e, 0x16fa0, 0x16fbc, 0x16fc6, 0x16fcc, 0x16fd8, 0x17026, 0x1702c, 0x17046, 0x1704c, 0x17058, 0x1706e, 0x17086, 0x1708c, 0x17098, 0x170b0, 0x170be, 0x170ce, 0x170dc, 0x170e8, 0x17106, 0x1710c, 0x17118, 0x17130, 0x1713e, 0x17160, 0x1717c, 0x1718e, 0x1719c, 0x171b8, 0x171c2, 0x171c4, 0x171c8, 0x171d0, 0x171de, 0x171e6, 0x171ec, 0x171fa, 0x17206, 0x1720c, 0x17218, 0x17230, 0x1723e, 0x17260, 0x1727c, 0x172c0, 0x172f8, 0x1730e, 0x1731c, 0x17338, 0x17370, 0x1737e, 0x17388, 0x17390, 0x1739e, 0x173a0, 0x173bc, 0x173cc, 0x173d8, 0x173ee, 0x173f2, 0x173f4, 0x1740c, 0x17418, 0x17430, 0x1743e, 0x17460, 0x1747c, 0x174c0, 0x174f8, 0x175f0, 0x1760e, 0x1761c, 0x17638, 0x17670, 0x1767e, 0x176e0, 0x176fc, 0x17708, 0x17710, 0x1771e, 0x17720, 0x1773c, 0x17740, 0x17778, 0x17798, 0x177b0, 0x177be, 0x177dc, 0x177e2, 0x177e4, 0x177e8, 0x17822, 0x17824, 0x17828, 0x17836, 0x17842, 0x17844, 0x17848, 0x17850, 0x1785e, 0x17866, 0x1786c, 0x17882, 0x17884, 0x17888, 0x17890, 0x1789e, 0x178a0, 0x178bc, 0x178c6, 0x178cc, 0x178d8, 0x178ee, 0x178f2, 0x178f4, 0x17902, 0x17904, 0x17908, 0x17910, 0x1791e, 0x17920, 0x1793c, 0x17940, 0x17978, 0x17986, 0x1798c, 0x17998, 0x179b0, 0x179be, 0x179ce, 0x179dc, 0x179e2, 0x179e4, 0x179e8, 0x179f6, 0x17a04, 0x17a08, 0x17a10, 0x17a1e, 0x17a20, 0x17a3c, 0x17a40, 0x17a78, 0x17af0, 0x17b06, 0x17b0c, 0x17b18, 0x17b30, 0x17b3e, 0x17b60, 0x17b7c, 0x17b8e, 0x17b9c, 0x17bb8, 0x17bc4, 0x17bc8, 0x17bd0, 0x17bde, 0x17be6, 0x17bec, 0x17c2e, 0x17c32, 0x17c34, 0x17c4e, 0x17c5c, 0x17c62, 0x17c64, 0x17c68, 0x17c76, 0x17c8e, 0x17c9c, 0x17cb8, 0x17cc2, 0x17cc4, 0x17cc8, 0x17cd0, 0x17cde, 0x17ce6, 0x17cec, 0x17d0e, 0x17d1c, 0x17d38, 0x17d70, 0x17d82, 0x17d84, 0x17d88, 0x17d90, 0x17d9e, 0x17da0, 0x17dbc, 0x17dc6, 0x17dcc, 0x17dd8, 0x17dee, 0x17e26, 0x17e2c, 0x17e3a, 0x17e46, 0x17e4c, 0x17e58, 0x17e6e, 0x17e72, 0x17e74, 0x17e86, 0x17e8c, 0x17e98, 0x17eb0, 0x17ece, 0x17edc, 0x17ee2, 0x17ee4, 0x17ee8, 0x17ef6, 0x1813a, 0x18172, 0x18174, 0x18216, 0x18226, 0x1823a, 0x1824c, 0x18258, 0x1826e, 0x18272, 0x18274, 0x18298, 0x182be, 0x182e2, 0x182e4, 0x182e8, 0x182f6, 0x1835e, 0x1837a, 0x183ae, 0x183d6, 0x18416, 0x18426, 0x1842c, 0x1843a, 0x18446, 0x18458, 0x1846e, 0x18472, 0x18474, 0x18486, 0x184b0, 0x184be, 0x184ce, 0x184dc, 0x184e2, 0x184e4, 0x184e8, 0x184f6, 0x18506, 0x1850c, 0x18518, 0x18530, 0x1853e, 0x18560, 0x1857c, 0x1858e, 0x1859c, 0x185b8, 0x185c2, 0x185c4, 0x185c8, 0x185d0, 0x185de, 0x185e6, 0x185ec, 0x185fa, 0x18612, 0x18614, 0x18622, 0x18628, 0x18636, 0x18642, 0x18650, 0x1865e, 0x1867a, 0x18682, 0x18684, 0x18688, 0x18690, 0x1869e, 0x186a0, 0x186bc, 0x186c6, 0x186cc, 0x186d8, 0x186ee, 0x186f2, 0x186f4, 0x1872e, 0x1874e, 0x1875c, 0x18796, 0x187a6, 0x187ac, 0x187d2, 0x187d4, 0x18826, 0x1882c, 0x1883a, 0x18846, 0x1884c, 0x18858, 0x1886e, 0x18872, 0x18874, 0x18886, 0x18898, 0x188b0, 0x188be, 0x188ce, 0x188dc, 0x188e2, 0x188e4, 0x188e8, 0x188f6, 0x1890c, 0x18930, 0x1893e, 0x18960, 0x1897c, 0x1898e, 0x189b8, 0x189c2, 0x189c8, 0x189d0, 0x189de, 0x189e6, 0x189ec, 0x189fa, 0x18a18, 0x18a30, 0x18a3e, 0x18a60, 0x18a7c, 0x18ac0, 0x18af8, 0x18b1c, 0x18b38, 0x18b70, 0x18b7e, 0x18b82, 0x18b84, 0x18b88, 0x18b90, 0x18b9e, 0x18ba0, 0x18bbc, 0x18bc6, 0x18bcc, 0x18bd8, 0x18bee, 0x18bf2, 0x18bf4, 0x18c22, 0x18c24, 0x18c28, 0x18c36, 0x18c42, 0x18c48, 0x18c50, 0x18c5e, 0x18c66, 0x18c7a, 0x18c82, 0x18c84, 0x18c90, 0x18c9e, 0x18ca0, 0x18cbc, 0x18ccc, 0x18cf2, 0x18cf4, 0x18d04, 0x18d08, 0x18d10, 0x18d1e, 0x18d20, 0x18d3c, 0x18d40, 0x18d78, 0x18d86, 0x18d98, 0x18dce, 0x18de2, 0x18de4, 0x18de8, 0x18e2e, 0x18e32, 0x18e34, 0x18e4e, 0x18e5c, 0x18e62, 0x18e64, 0x18e68, 0x18e8e, 0x18e9c, 0x18eb8, 0x18ec2, 0x18ec4, 0x18ec8, 0x18ed0, 0x18efa, 0x18f16, 0x18f26, 0x18f2c, 0x18f46, 0x18f4c, 0x18f58, 0x18f6e, 0x18f8a, 0x18f92, 0x18f94, 0x18fa2, 0x18fa4, 0x18fa8, 0x18fb6, 0x1902c, 0x1903a, 0x19046, 0x1904c, 0x19058, 0x19072, 0x19074, 0x19086, 0x19098, 0x190b0, 0x190be, 0x190ce, 0x190dc, 0x190e2, 0x190e8, 0x190f6, 0x19106, 0x1910c, 0x19130, 0x1913e, 0x19160, 0x1917c, 0x1918e, 0x1919c, 0x191b8, 0x191c2, 0x191c8, 0x191d0, 0x191de, 0x191e6, 0x191ec, 0x191fa, 0x19218, 0x1923e, 0x19260, 0x1927c, 0x192c0, 0x192f8, 0x19338, 0x19370, 0x1937e, 0x19382, 0x19384, 0x19390, 0x1939e, 0x193a0, 0x193bc, 0x193c6, 0x193cc, 0x193d8, 0x193ee, 0x193f2, 0x193f4, 0x19430, 0x1943e, 0x19460, 0x1947c, 0x194c0, 0x194f8, 0x195f0, 0x19638, 0x19670, 0x1967e, 0x196e0, 0x196fc, 0x19702, 0x19704, 0x19708, 0x19710, 0x19720, 0x1973c, 0x19740, 0x19778, 0x19786, 0x1978c, 0x19798, 0x197b0, 0x197be, 0x197ce, 0x197dc, 0x197e2, 0x197e4, 0x197e8, 0x19822, 0x19824, 0x19842, 0x19848, 0x19850, 0x1985e, 0x19866, 0x1987a, 0x19882, 0x19884, 0x19890, 0x1989e, 0x198a0, 0x198bc, 0x198cc, 0x198f2, 0x198f4, 0x19902, 0x19908, 0x1991e, 0x19920, 0x1993c, 0x19940, 0x19978, 0x19986, 0x19998, 0x199ce, 0x199e2, 0x199e4, 0x199e8, 0x19a08, 0x19a10, 0x19a1e, 0x19a20, 0x19a3c, 0x19a40, 0x19a78, 0x19af0, 0x19b18, 0x19b3e, 0x19b60, 0x19b9c, 0x19bc2, 0x19bc4, 0x19bc8, 0x19bd0, 0x19be6, 0x19c2e, 0x19c34, 0x19c4e, 0x19c5c, 0x19c62, 0x19c64, 0x19c68, 0x19c8e, 0x19c9c, 0x19cb8, 0x19cc2, 0x19cc8, 0x19cd0, 0x19ce6, 0x19cfa, 0x19d0e, 0x19d1c, 0x19d38, 0x19d70, 0x19d7e, 0x19d82, 0x19d84, 0x19d88, 0x19d90, 0x19da0, 0x19dcc, 0x19df2, 0x19df4, 0x19e16, 0x19e26, 0x19e2c, 0x19e46, 0x19e4c, 0x19e58, 0x19e74, 0x19e86, 0x19e8c, 0x19e98, 0x19eb0, 0x19ebe, 0x19ece, 0x19ee2, 0x19ee4, 0x19ee8, 0x19f0a, 0x19f12, 0x19f14, 0x19f22, 0x19f24, 0x19f28, 0x19f42, 0x19f44, 0x19f48, 0x19f50, 0x19f5e, 0x19f6c, 0x19f9a, 0x19fae, 0x19fb2, 0x19fb4, 0x1a046, 0x1a04c, 0x1a072, 0x1a074, 0x1a086, 0x1a08c, 0x1a098, 0x1a0b0, 0x1a0be, 0x1a0e2, 0x1a0e4, 0x1a0e8, 0x1a0f6, 0x1a106, 0x1a10c, 0x1a118, 0x1a130, 0x1a13e, 0x1a160, 0x1a17c, 0x1a18e, 0x1a19c, 0x1a1b8, 0x1a1c2, 0x1a1c4, 0x1a1c8, 0x1a1d0, 0x1a1de, 0x1a1e6, 0x1a1ec, 0x1a218, 0x1a230, 0x1a23e, 0x1a260, 0x1a27c, 0x1a2c0, 0x1a2f8, 0x1a31c, 0x1a338, 0x1a370, 0x1a37e, 0x1a382, 0x1a384, 0x1a388, 0x1a390, 0x1a39e, 0x1a3a0, 0x1a3bc, 0x1a3c6, 0x1a3cc, 0x1a3d8, 0x1a3ee, 0x1a3f2, 0x1a3f4, 0x1a418, 0x1a430, 0x1a43e, 0x1a460, 0x1a47c, 0x1a4c0, 0x1a4f8, 0x1a5f0, 0x1a61c, 0x1a638, 0x1a670, 0x1a67e, 0x1a6e0, 0x1a6fc, 0x1a702, 0x1a704, 0x1a708, 0x1a710, 0x1a71e, 0x1a720, 0x1a73c, 0x1a740, 0x1a778, 0x1a786, 0x1a78c, 0x1a798, 0x1a7b0, 0x1a7be, 0x1a7ce, 0x1a7dc, 0x1a7e2, 0x1a7e4, 0x1a7e8, 0x1a830, 0x1a860, 0x1a87c, 0x1a8c0, 0x1a8f8, 0x1a9f0, 0x1abe0, 0x1ac70, 0x1ac7e, 0x1ace0, 0x1acfc, 0x1adc0, 0x1adf8, 0x1ae04, 0x1ae08, 0x1ae10, 0x1ae20, 0x1ae3c, 0x1ae40, 0x1ae78, 0x1aef0, 0x1af06, 0x1af0c, 0x1af18, 0x1af30, 0x1af3e, 0x1af60, 0x1af7c, 0x1af8e, 0x1af9c, 0x1afb8, 0x1afc4, 0x1afc8, 0x1afd0, 0x1afde, 0x1b042, 0x1b05e, 0x1b07a, 0x1b082, 0x1b084, 0x1b088, 0x1b090, 0x1b09e, 0x1b0a0, 0x1b0bc, 0x1b0cc, 0x1b0f2, 0x1b0f4, 0x1b102, 0x1b104, 0x1b108, 0x1b110, 0x1b11e, 0x1b120, 0x1b13c, 0x1b140, 0x1b178, 0x1b186, 0x1b198, 0x1b1ce, 0x1b1e2, 0x1b1e4, 0x1b1e8, 0x1b204, 0x1b208, 0x1b210, 0x1b21e, 0x1b220, 0x1b23c, 0x1b240, 0x1b278, 0x1b2f0, 0x1b30c, 0x1b33e, 0x1b360, 0x1b39c, 0x1b3c2, 0x1b3c4, 0x1b3c8, 0x1b3d0, 0x1b3e6, 0x1b410, 0x1b41e, 0x1b420, 0x1b43c, 0x1b440, 0x1b478, 0x1b4f0, 0x1b5e0, 0x1b618, 0x1b660, 0x1b67c, 0x1b6c0, 0x1b738, 0x1b782, 0x1b784, 0x1b788, 0x1b790, 0x1b79e, 0x1b7a0, 0x1b7cc, 0x1b82e, 0x1b84e, 0x1b85c, 0x1b88e, 0x1b89c, 0x1b8b8, 0x1b8c2, 0x1b8c4, 0x1b8c8, 0x1b8d0, 0x1b8e6, 0x1b8fa, 0x1b90e, 0x1b91c, 0x1b938, 0x1b970, 0x1b97e, 0x1b982, 0x1b984, 0x1b988, 0x1b990, 0x1b99e, 0x1b9a0, 0x1b9cc, 0x1b9f2, 0x1b9f4, 0x1ba0e, 0x1ba1c, 0x1ba38, 0x1ba70, 0x1ba7e, 0x1bae0, 0x1bafc, 0x1bb08, 0x1bb10, 0x1bb20, 0x1bb3c, 0x1bb40, 0x1bb98, 0x1bbce, 0x1bbe2, 0x1bbe4, 0x1bbe8, 0x1bc16, 0x1bc26, 0x1bc2c, 0x1bc46, 0x1bc4c, 0x1bc58, 0x1bc72, 0x1bc74, 0x1bc86, 0x1bc8c, 0x1bc98, 0x1bcb0, 0x1bcbe, 0x1bcce, 0x1bce2, 0x1bce4, 0x1bce8, 0x1bd06, 0x1bd0c, 0x1bd18, 0x1bd30, 0x1bd3e, 0x1bd60, 0x1bd7c, 0x1bd9c, 0x1bdc2, 0x1bdc4, 0x1bdc8, 0x1bdd0, 0x1bde6, 0x1bdfa, 0x1be12, 0x1be14, 0x1be22, 0x1be24, 0x1be28, 0x1be42, 0x1be44, 0x1be48, 0x1be50, 0x1be5e, 0x1be66, 0x1be82, 0x1be84, 0x1be88, 0x1be90, 0x1be9e, 0x1bea0, 0x1bebc, 0x1becc, 0x1bef4, 0x1bf1a, 0x1bf2e, 0x1bf32, 0x1bf34, 0x1bf4e, 0x1bf5c, 0x1bf62, 0x1bf64, 0x1bf68, 0x1c09a, 0x1c0b2, 0x1c0b4, 0x1c11a, 0x1c132, 0x1c134, 0x1c162, 0x1c164, 0x1c168, 0x1c176, 0x1c1ba, 0x1c21a, 0x1c232, 0x1c234, 0x1c24e, 0x1c25c, 0x1c262, 0x1c264, 0x1c268, 0x1c276, 0x1c28e, 0x1c2c2, 0x1c2c4, 0x1c2c8, 0x1c2d0, 0x1c2de, 0x1c2e6, 0x1c2ec, 0x1c2fa, 0x1c316, 0x1c326, 0x1c33a, 0x1c346, 0x1c34c, 0x1c372, 0x1c374, 0x1c41a, 0x1c42e, 0x1c432, 0x1c434, 0x1c44e, 0x1c45c, 0x1c462, 0x1c464, 0x1c468, 0x1c476, 0x1c48e, 0x1c49c, 0x1c4b8, 0x1c4c2, 0x1c4c8, 0x1c4d0, 0x1c4de, 0x1c4e6, 0x1c4ec, 0x1c4fa, 0x1c51c, 0x1c538, 0x1c570, 0x1c57e, 0x1c582, 0x1c584, 0x1c588, 0x1c590, 0x1c59e, 0x1c5a0, 0x1c5bc, 0x1c5c6, 0x1c5cc, 0x1c5d8, 0x1c5ee, 0x1c5f2, 0x1c5f4, 0x1c616, 0x1c626, 0x1c62c, 0x1c63a, 0x1c646, 0x1c64c, 0x1c658, 0x1c66e, 0x1c672, 0x1c674, 0x1c686, 0x1c68c, 0x1c698, 0x1c6b0, 0x1c6be, 0x1c6ce, 0x1c6dc, 0x1c6e2, 0x1c6e4, 0x1c6e8, 0x1c712, 0x1c714, 0x1c722, 0x1c728, 0x1c736, 0x1c742, 0x1c744, 0x1c748, 0x1c750, 0x1c75e, 0x1c766, 0x1c76c, 0x1c77a, 0x1c7ae, 0x1c7d6, 0x1c7ea, 0x1c81a, 0x1c82e, 0x1c832, 0x1c834, 0x1c84e, 0x1c85c, 0x1c862, 0x1c864, 0x1c868, 0x1c876, 0x1c88e, 0x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0c4, 0x1d0c8, 0x1d0d0, 0x1d0de, 0x1d0e6, 0x1d0ec, 0x1d0fa, 0x1d11c, 0x1d138, 0x1d170, 0x1d17e, 0x1d182, 0x1d184, 0x1d188, 0x1d190, 0x1d19e, 0x1d1a0, 0x1d1bc, 0x1d1c6, 0x1d1cc, 0x1d1d8, 0x1d1ee, 0x1d1f2, 0x1d1f4, 0x1d21c, 0x1d238, 0x1d270, 0x1d27e, 0x1d2e0, 0x1d2fc, 0x1d302, 0x1d304, 0x1d308, 0x1d310, 0x1d31e, 0x1d320, 0x1d33c, 0x1d340, 0x1d378, 0x1d386, 0x1d38c, 0x1d398, 0x1d3b0, 0x1d3be, 0x1d3ce, 0x1d3dc, 0x1d3e2, 0x1d3e4, 0x1d3e8, 0x1d3f6, 0x1d470, 0x1d47e, 0x1d4e0, 0x1d4fc, 0x1d5c0, 0x1d5f8, 0x1d604, 0x1d608, 0x1d610, 0x1d620, 0x1d640, 0x1d678, 0x1d6f0, 0x1d706, 0x1d70c, 0x1d718, 0x1d730, 0x1d73e, 0x1d760, 0x1d77c, 0x1d78e, 0x1d79c, 0x1d7b8, 0x1d7c2, 0x1d7c4, 0x1d7c8, 0x1d7d0, 0x1d7de, 0x1d7e6, 0x1d7ec, 0x1d826, 0x1d82c, 0x1d83a, 0x1d846, 0x1d84c, 0x1d858, 0x1d872, 0x1d874, 0x1d886, 0x1d88c, 0x1d898, 0x1d8b0, 0x1d8be, 0x1d8ce, 0x1d8e2, 0x1d8e4, 0x1d8e8, 0x1d8f6, 0x1d90c, 0x1d918, 0x1d930, 0x1d93e, 0x1d960, 0x1d97c, 0x1d99c, 0x1d9c2, 0x1d9c4, 0x1d9c8, 0x1d9d0, 0x1d9e6, 0x1d9fa, 0x1da0c, 0x1da18, 0x1da30, 0x1da3e, 0x1da60, 0x1da7c, 0x1dac0, 0x1daf8, 0x1db38, 0x1db82, 0x1db84, 0x1db88, 0x1db90, 0x1db9e, 0x1dba0, 0x1dbcc, 0x1dbf2, 0x1dbf4, 0x1dc22, 0x1dc42, 0x1dc44, 0x1dc48, 0x1dc50, 0x1dc5e, 0x1dc66, 0x1dc7a, 0x1dc82, 0x1dc84, 0x1dc88, 0x1dc90, 0x1dc9e, 0x1dca0, 0x1dcbc, 0x1dccc, 0x1dcf2, 0x1dcf4, 0x1dd04, 0x1dd08, 0x1dd10, 0x1dd1e, 0x1dd20, 0x1dd3c, 0x1dd40, 0x1dd78, 0x1dd86, 0x1dd98, 0x1ddce, 0x1dde2, 0x1dde4, 0x1dde8, 0x1de2e, 0x1de32, 0x1de34, 0x1de4e, 0x1de5c, 0x1de62, 0x1de64, 0x1de68, 0x1de8e, 0x1de9c, 0x1deb8, 0x1dec2, 0x1dec4, 0x1dec8, 0x1ded0, 0x1dee6, 0x1defa, 0x1df16, 0x1df26, 0x1df2c, 0x1df46, 0x1df4c, 0x1df58, 0x1df72, 0x1df74, 0x1df8a, 0x1df92, 0x1df94, 0x1dfa2, 0x1dfa4, 0x1dfa8, 0x1e08a, 0x1e092, 0x1e094, 0x1e0a2, 0x1e0a4, 0x1e0a8, 0x1e0b6, 0x1e0da, 0x1e10a, 0x1e112, 0x1e114, 0x1e122, 0x1e124, 0x1e128, 0x1e136, 0x1e142, 0x1e144, 0x1e148, 0x1e150, 0x1e166, 0x1e16c, 0x1e17a, 0x1e19a, 0x1e1b2, 0x1e1b4, 0x1e20a, 0x1e212, 0x1e214, 0x1e222, 0x1e224, 0x1e228, 0x1e236, 0x1e242, 0x1e248, 0x1e250, 0x1e25e, 0x1e266, 0x1e26c, 0x1e27a, 0x1e282, 0x1e284, 0x1e288, 0x1e290, 0x1e2a0, 0x1e2bc, 0x1e2c6, 0x1e2cc, 0x1e2d8, 0x1e2ee, 0x1e2f2, 0x1e2f4, 0x1e31a, 0x1e332, 0x1e334, 0x1e35c, 0x1e362, 0x1e364, 0x1e368, 0x1e3ba, 0x1e40a, 0x1e412, 0x1e414, 0x1e422, 0x1e428, 0x1e436, 0x1e442, 0x1e448, 0x1e450, 0x1e45e, 0x1e466, 0x1e46c, 0x1e47a, 0x1e482, 0x1e484, 0x1e490, 0x1e49e, 0x1e4a0, 0x1e4bc, 0x1e4c6, 0x1e4cc, 0x1e4d8, 0x1e4ee, 0x1e4f2, 0x1e4f4, 0x1e502, 0x1e504, 0x1e508, 0x1e510, 0x1e51e, 0x1e520, 0x1e53c, 0x1e540, 0x1e578, 0x1e586, 0x1e58c, 0x1e598, 0x1e5b0, 0x1e5be, 0x1e5ce, 0x1e5dc, 0x1e5e2, 0x1e5e4, 0x1e5e8, 0x1e5f6, 0x1e61a, 0x1e62e, 0x1e632, 0x1e634, 0x1e64e, 0x1e65c, 0x1e662, 0x1e668, 0x1e68e, 0x1e69c, 0x1e6b8, 0x1e6c2, 0x1e6c4, 0x1e6c8, 0x1e6d0, 0x1e6e6, 0x1e6fa, 0x1e716, 0x1e726, 0x1e72c, 0x1e73a, 0x1e746, 0x1e74c, 0x1e758, 0x1e772, 0x1e774, 0x1e792, 0x1e794, 0x1e7a2, 0x1e7a4, 0x1e7a8, 0x1e7b6, 0x1e812, 0x1e814, 0x1e822, 0x1e824, 0x1e828, 0x1e836, 0x1e842, 0x1e844, 0x1e848, 0x1e850, 0x1e85e, 0x1e866, 0x1e86c, 0x1e87a, 0x1e882, 0x1e884, 0x1e888, 0x1e890, 0x1e89e, 0x1e8a0, 0x1e8bc, 0x1e8c6, 0x1e8cc, 0x1e8d8, 0x1e8ee, 0x1e8f2, 0x1e8f4, 0x1e902, 0x1e904, 0x1e908, 0x1e910, 0x1e920, 0x1e93c, 0x1e940, 0x1e978, 0x1e986, 0x1e98c, 0x1e998, 0x1e9b0, 0x1e9be, 0x1e9ce, 0x1e9dc, 0x1e9e2, 0x1e9e4, 0x1e9e8, 0x1e9f6, 0x1ea04, 0x1ea08, 0x1ea10, 0x1ea20, 0x1ea40, 0x1ea78, 0x1eaf0, 0x1eb06, 0x1eb0c, 0x1eb18, 0x1eb30, 0x1eb3e, 0x1eb60, 0x1eb7c, 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1f312, 0x1f314, 0x1f322, 0x1f328, 0x1f342, 0x1f344, 0x1f348, 0x1f350, 0x1f35e, 0x1f366, 0x1f37a, 0x1f39a, 0x1f3ae, 0x1f3b2, 0x1f3b4, 0x1f416, 0x1f426, 0x1f42c, 0x1f43a, 0x1f446, 0x1f44c, 0x1f458, 0x1f46e, 0x1f472, 0x1f474, 0x1f486, 0x1f48c, 0x1f498, 0x1f4b0, 0x1f4be, 0x1f4ce, 0x1f4dc, 0x1f4e2, 0x1f4e4, 0x1f4e8, 0x1f4f6, 0x1f506, 0x1f50c, 0x1f518, 0x1f530, 0x1f53e, 0x1f560, 0x1f57c, 0x1f58e, 0x1f59c, 0x1f5b8, 0x1f5c2, 0x1f5c4, 0x1f5c8, 0x1f5d0, 0x1f5de, 0x1f5e6, 0x1f5ec, 0x1f5fa, 0x1f60a, 0x1f612, 0x1f614, 0x1f622, 0x1f624, 0x1f628, 0x1f636, 0x1f642, 0x1f644, 0x1f648, 0x1f650, 0x1f65e, 0x1f666, 0x1f67a, 0x1f682, 0x1f684, 0x1f688, 0x1f690, 0x1f69e, 0x1f6a0, 0x1f6bc, 0x1f6cc, 0x1f6f2, 0x1f6f4, 0x1f71a, 0x1f72e, 0x1f732, 0x1f734, 0x1f74e, 0x1f75c, 0x1f762, 0x1f764, 0x1f768, 0x1f776, 0x1f796, 0x1f7a6, 0x1f7ac, 0x1f7ba, 0x1f7d2, 0x1f7d4, 0x1f89a, 0x1f8ae, 0x1f8b2, 0x1f8b4, 0x1f8d6, 0x1f8ea, 0x1f91a, 0x1f92e, 0x1f932, 0x1f934, 0x1f94e, 0x1f95c, 0x1f962, 0x1f964, 0x1f968, 0x1f976, 0x1f996, 0x1f9a6, 0x1f9ac, 0x1f9ba, 0x1f9ca, 0x1f9d2, 0x1f9d4, 0x1fa1a, 0x1fa2e, 0x1fa32, 0x1fa34, 0x1fa4e, 0x1fa5c, 0x1fa62, 0x1fa64, 0x1fa68, 0x1fa76, 0x1fa8e, 0x1fa9c, 0x1fab8, 0x1fac2, 0x1fac4, 0x1fac8, 0x1fad0, 0x1fade, 0x1fae6, 0x1faec, 0x1fb16, 0x1fb26, 0x1fb2c, 0x1fb3a, 0x1fb46, 0x1fb4c, 0x1fb58, 0x1fb6e, 0x1fb72, 0x1fb74, 0x1fb8a, 0x1fb92, 0x1fb94, 0x1fba2, 0x1fba4, 0x1fba8, 0x1fbb6, 0x1fbda]);\n /**\n * This table contains to codewords for all symbols.\n */\n PDF417Common.CODEWORD_TABLE = Int32Array.from([2627, 1819, 2622, 2621, 1813, 1812, 2729, 2724, 2723, 2779, 2774, 2773, 902, 896, 908, 868, 865, 861, 859, 2511, 873, 871, 1780, 835, 2493, 825, 2491, 842, 837, 844, 1764, 1762, 811, 810, 809, 2483, 807, 2482, 806, 2480, 815, 814, 813, 812, 2484, 817, 816, 1745, 1744, 1742, 1746, 2655, 2637, 2635, 2626, 2625, 2623, 2628, 1820, 2752, 2739, 2737, 2728, 2727, 2725, 2730, 2785, 2783, 2778, 2777, 2775, 2780, 787, 781, 747, 739, 736, 2413, 754, 752, 1719, 692, 689, 681, 2371, 678, 2369, 700, 697, 694, 703, 1688, 1686, 642, 638, 2343, 631, 2341, 627, 2338, 651, 646, 643, 2345, 654, 652, 1652, 1650, 1647, 1654, 601, 599, 2322, 596, 2321, 594, 2319, 2317, 611, 610, 608, 606, 2324, 603, 2323, 615, 614, 612, 1617, 1616, 1614, 1612, 616, 1619, 1618, 2575, 2538, 2536, 905, 901, 898, 909, 2509, 2507, 2504, 870, 867, 864, 860, 2512, 875, 872, 1781, 2490, 2489, 2487, 2485, 1748, 836, 834, 832, 830, 2494, 827, 2492, 843, 841, 839, 845, 1765, 1763, 2701, 2676, 2674, 2653, 2648, 2656, 2634, 2633, 2631, 2629, 1821, 2638, 2636, 2770, 2763, 2761, 2750, 2745, 2753, 2736, 2735, 2733, 2731, 1848, 2740, 2738, 2786, 2784, 591, 588, 576, 569, 566, 2296, 1590, 537, 534, 526, 2276, 522, 2274, 545, 542, 539, 548, 1572, 1570, 481, 2245, 466, 2242, 462, 2239, 492, 485, 482, 2249, 496, 494, 1534, 1531, 1528, 1538, 413, 2196, 406, 2191, 2188, 425, 419, 2202, 415, 2199, 432, 430, 427, 1472, 1467, 1464, 433, 1476, 1474, 368, 367, 2160, 365, 2159, 362, 2157, 2155, 2152, 378, 377, 375, 2166, 372, 2165, 369, 2162, 383, 381, 379, 2168, 1419, 1418, 1416, 1414, 385, 1411, 384, 1423, 1422, 1420, 1424, 2461, 802, 2441, 2439, 790, 786, 783, 794, 2409, 2406, 2403, 750, 742, 738, 2414, 756, 753, 1720, 2367, 2365, 2362, 2359, 1663, 693, 691, 684, 2373, 680, 2370, 702, 699, 696, 704, 1690, 1687, 2337, 2336, 2334, 2332, 1624, 2329, 1622, 640, 637, 2344, 634, 2342, 630, 2340, 650, 648, 645, 2346, 655, 653, 1653, 1651, 1649, 1655, 2612, 2597, 2595, 2571, 2568, 2565, 2576, 2534, 2529, 2526, 1787, 2540, 2537, 907, 904, 900, 910, 2503, 2502, 2500, 2498, 1768, 2495, 1767, 2510, 2508, 2506, 869, 866, 863, 2513, 876, 874, 1782, 2720, 2713, 2711, 2697, 2694, 2691, 2702, 2672, 2670, 2664, 1828, 2678, 2675, 2647, 2646, 2644, 2642, 1823, 2639, 1822, 2654, 2652, 2650, 2657, 2771, 1855, 2765, 2762, 1850, 1849, 2751, 2749, 2747, 2754, 353, 2148, 344, 342, 336, 2142, 332, 2140, 345, 1375, 1373, 306, 2130, 299, 2128, 295, 2125, 319, 314, 311, 2132, 1354, 1352, 1349, 1356, 262, 257, 2101, 253, 2096, 2093, 274, 273, 267, 2107, 263, 2104, 280, 278, 275, 1316, 1311, 1308, 1320, 1318, 2052, 202, 2050, 2044, 2040, 219, 2063, 212, 2060, 208, 2055, 224, 221, 2066, 1260, 1258, 1252, 231, 1248, 229, 1266, 1264, 1261, 1268, 155, 1998, 153, 1996, 1994, 1991, 1988, 165, 164, 2007, 162, 2006, 159, 2003, 2000, 172, 171, 169, 2012, 166, 2010, 1186, 1184, 1182, 1179, 175, 1176, 173, 1192, 1191, 1189, 1187, 176, 1194, 1193, 2313, 2307, 2305, 592, 589, 2294, 2292, 2289, 578, 572, 568, 2297, 580, 1591, 2272, 2267, 2264, 1547, 538, 536, 529, 2278, 525, 2275, 547, 544, 541, 1574, 1571, 2237, 2235, 2229, 1493, 2225, 1489, 478, 2247, 470, 2244, 465, 2241, 493, 488, 484, 2250, 498, 495, 1536, 1533, 1530, 1539, 2187, 2186, 2184, 2182, 1432, 2179, 1430, 2176, 1427, 414, 412, 2197, 409, 2195, 405, 2193, 2190, 426, 424, 421, 2203, 418, 2201, 431, 429, 1473, 1471, 1469, 1466, 434, 1477, 1475, 2478, 2472, 2470, 2459, 2457, 2454, 2462, 803, 2437, 2432, 2429, 1726, 2443, 2440, 792, 789, 785, 2401, 2399, 2393, 1702, 2389, 1699, 2411, 2408, 2405, 745, 741, 2415, 758, 755, 1721, 2358, 2357, 2355, 2353, 1661, 2350, 1660, 2347, 1657, 2368, 2366, 2364, 2361, 1666, 690, 687, 2374, 683, 2372, 701, 698, 705, 1691, 1689, 2619, 2617, 2610, 2608, 2605, 2613, 2593, 2588, 2585, 1803, 2599, 2596, 2563, 2561, 2555, 1797, 2551, 1795, 2573, 2570, 2567, 2577, 2525, 2524, 2522, 2520, 1786, 2517, 1785, 2514, 1783, 2535, 2533, 2531, 2528, 1788, 2541, 2539, 906, 903, 911, 2721, 1844, 2715, 2712, 1838, 1836, 2699, 2696, 2693, 2703, 1827, 1826, 1824, 2673, 2671, 2669, 2666, 1829, 2679, 2677, 1858, 1857, 2772, 1854, 1853, 1851, 1856, 2766, 2764, 143, 1987, 139, 1986, 135, 133, 131, 1984, 128, 1983, 125, 1981, 138, 137, 136, 1985, 1133, 1132, 1130, 112, 110, 1974, 107, 1973, 104, 1971, 1969, 122, 121, 119, 117, 1977, 114, 1976, 124, 1115, 1114, 1112, 1110, 1117, 1116, 84, 83, 1953, 81, 1952, 78, 1950, 1948, 1945, 94, 93, 91, 1959, 88, 1958, 85, 1955, 99, 97, 95, 1961, 1086, 1085, 1083, 1081, 1078, 100, 1090, 1089, 1087, 1091, 49, 47, 1917, 44, 1915, 1913, 1910, 1907, 59, 1926, 56, 1925, 53, 1922, 1919, 66, 64, 1931, 61, 1929, 1042, 1040, 1038, 71, 1035, 70, 1032, 68, 1048, 1047, 1045, 1043, 1050, 1049, 12, 10, 1869, 1867, 1864, 1861, 21, 1880, 19, 1877, 1874, 1871, 28, 1888, 25, 1886, 22, 1883, 982, 980, 977, 974, 32, 30, 991, 989, 987, 984, 34, 995, 994, 992, 2151, 2150, 2147, 2146, 2144, 356, 355, 354, 2149, 2139, 2138, 2136, 2134, 1359, 343, 341, 338, 2143, 335, 2141, 348, 347, 346, 1376, 1374, 2124, 2123, 2121, 2119, 1326, 2116, 1324, 310, 308, 305, 2131, 302, 2129, 298, 2127, 320, 318, 316, 313, 2133, 322, 321, 1355, 1353, 1351, 1357, 2092, 2091, 2089, 2087, 1276, 2084, 1274, 2081, 1271, 259, 2102, 256, 2100, 252, 2098, 2095, 272, 269, 2108, 266, 2106, 281, 279, 277, 1317, 1315, 1313, 1310, 282, 1321, 1319, 2039, 2037, 2035, 2032, 1203, 2029, 1200, 1197, 207, 2053, 205, 2051, 201, 2049, 2046, 2043, 220, 218, 2064, 215, 2062, 211, 2059, 228, 226, 223, 2069, 1259, 1257, 1254, 232, 1251, 230, 1267, 1265, 1263, 2316, 2315, 2312, 2311, 2309, 2314, 2304, 2303, 2301, 2299, 1593, 2308, 2306, 590, 2288, 2287, 2285, 2283, 1578, 2280, 1577, 2295, 2293, 2291, 579, 577, 574, 571, 2298, 582, 581, 1592, 2263, 2262, 2260, 2258, 1545, 2255, 1544, 2252, 1541, 2273, 2271, 2269, 2266, 1550, 535, 532, 2279, 528, 2277, 546, 543, 549, 1575, 1573, 2224, 2222, 2220, 1486, 2217, 1485, 2214, 1482, 1479, 2238, 2236, 2234, 2231, 1496, 2228, 1492, 480, 477, 2248, 473, 2246, 469, 2243, 490, 487, 2251, 497, 1537, 1535, 1532, 2477, 2476, 2474, 2479, 2469, 2468, 2466, 2464, 1730, 2473, 2471, 2453, 2452, 2450, 2448, 1729, 2445, 1728, 2460, 2458, 2456, 2463, 805, 804, 2428, 2427, 2425, 2423, 1725, 2420, 1724, 2417, 1722, 2438, 2436, 2434, 2431, 1727, 2444, 2442, 793, 791, 788, 795, 2388, 2386, 2384, 1697, 2381, 1696, 2378, 1694, 1692, 2402, 2400, 2398, 2395, 1703, 2392, 1701, 2412, 2410, 2407, 751, 748, 744, 2416, 759, 757, 1807, 2620, 2618, 1806, 1805, 2611, 2609, 2607, 2614, 1802, 1801, 1799, 2594, 2592, 2590, 2587, 1804, 2600, 2598, 1794, 1793, 1791, 1789, 2564, 2562, 2560, 2557, 1798, 2554, 1796, 2574, 2572, 2569, 2578, 1847, 1846, 2722, 1843, 1842, 1840, 1845, 2716, 2714, 1835, 1834, 1832, 1830, 1839, 1837, 2700, 2698, 2695, 2704, 1817, 1811, 1810, 897, 862, 1777, 829, 826, 838, 1760, 1758, 808, 2481, 1741, 1740, 1738, 1743, 2624, 1818, 2726, 2776, 782, 740, 737, 1715, 686, 679, 695, 1682, 1680, 639, 628, 2339, 647, 644, 1645, 1643, 1640, 1648, 602, 600, 597, 595, 2320, 593, 2318, 609, 607, 604, 1611, 1610, 1608, 1606, 613, 1615, 1613, 2328, 926, 924, 892, 886, 899, 857, 850, 2505, 1778, 824, 823, 821, 819, 2488, 818, 2486, 833, 831, 828, 840, 1761, 1759, 2649, 2632, 2630, 2746, 2734, 2732, 2782, 2781, 570, 567, 1587, 531, 527, 523, 540, 1566, 1564, 476, 467, 463, 2240, 486, 483, 1524, 1521, 1518, 1529, 411, 403, 2192, 399, 2189, 423, 416, 1462, 1457, 1454, 428, 1468, 1465, 2210, 366, 363, 2158, 360, 2156, 357, 2153, 376, 373, 370, 2163, 1410, 1409, 1407, 1405, 382, 1402, 380, 1417, 1415, 1412, 1421, 2175, 2174, 777, 774, 771, 784, 732, 725, 722, 2404, 743, 1716, 676, 674, 668, 2363, 665, 2360, 685, 1684, 1681, 626, 624, 622, 2335, 620, 2333, 617, 2330, 641, 635, 649, 1646, 1644, 1642, 2566, 928, 925, 2530, 2527, 894, 891, 888, 2501, 2499, 2496, 858, 856, 854, 851, 1779, 2692, 2668, 2665, 2645, 2643, 2640, 2651, 2768, 2759, 2757, 2744, 2743, 2741, 2748, 352, 1382, 340, 337, 333, 1371, 1369, 307, 300, 296, 2126, 315, 312, 1347, 1342, 1350, 261, 258, 250, 2097, 246, 2094, 271, 268, 264, 1306, 1301, 1298, 276, 1312, 1309, 2115, 203, 2048, 195, 2045, 191, 2041, 213, 209, 2056, 1246, 1244, 1238, 225, 1234, 222, 1256, 1253, 1249, 1262, 2080, 2079, 154, 1997, 150, 1995, 147, 1992, 1989, 163, 160, 2004, 156, 2001, 1175, 1174, 1172, 1170, 1167, 170, 1164, 167, 1185, 1183, 1180, 1177, 174, 1190, 1188, 2025, 2024, 2022, 587, 586, 564, 559, 556, 2290, 573, 1588, 520, 518, 512, 2268, 508, 2265, 530, 1568, 1565, 461, 457, 2233, 450, 2230, 446, 2226, 479, 471, 489, 1526, 1523, 1520, 397, 395, 2185, 392, 2183, 389, 2180, 2177, 410, 2194, 402, 422, 1463, 1461, 1459, 1456, 1470, 2455, 799, 2433, 2430, 779, 776, 773, 2397, 2394, 2390, 734, 728, 724, 746, 1717, 2356, 2354, 2351, 2348, 1658, 677, 675, 673, 670, 667, 688, 1685, 1683, 2606, 2589, 2586, 2559, 2556, 2552, 927, 2523, 2521, 2518, 2515, 1784, 2532, 895, 893, 890, 2718, 2709, 2707, 2689, 2687, 2684, 2663, 2662, 2660, 2658, 1825, 2667, 2769, 1852, 2760, 2758, 142, 141, 1139, 1138, 134, 132, 129, 126, 1982, 1129, 1128, 1126, 1131, 113, 111, 108, 105, 1972, 101, 1970, 120, 118, 115, 1109, 1108, 1106, 1104, 123, 1113, 1111, 82, 79, 1951, 75, 1949, 72, 1946, 92, 89, 86, 1956, 1077, 1076, 1074, 1072, 98, 1069, 96, 1084, 1082, 1079, 1088, 1968, 1967, 48, 45, 1916, 42, 1914, 39, 1911, 1908, 60, 57, 54, 1923, 50, 1920, 1031, 1030, 1028, 1026, 67, 1023, 65, 1020, 62, 1041, 1039, 1036, 1033, 69, 1046, 1044, 1944, 1943, 1941, 11, 9, 1868, 7, 1865, 1862, 1859, 20, 1878, 16, 1875, 13, 1872, 970, 968, 966, 963, 29, 960, 26, 23, 983, 981, 978, 975, 33, 971, 31, 990, 988, 985, 1906, 1904, 1902, 993, 351, 2145, 1383, 331, 330, 328, 326, 2137, 323, 2135, 339, 1372, 1370, 294, 293, 291, 289, 2122, 286, 2120, 283, 2117, 309, 303, 317, 1348, 1346, 1344, 245, 244, 242, 2090, 239, 2088, 236, 2085, 2082, 260, 2099, 249, 270, 1307, 1305, 1303, 1300, 1314, 189, 2038, 186, 2036, 183, 2033, 2030, 2026, 206, 198, 2047, 194, 216, 1247, 1245, 1243, 1240, 227, 1237, 1255, 2310, 2302, 2300, 2286, 2284, 2281, 565, 563, 561, 558, 575, 1589, 2261, 2259, 2256, 2253, 1542, 521, 519, 517, 514, 2270, 511, 533, 1569, 1567, 2223, 2221, 2218, 2215, 1483, 2211, 1480, 459, 456, 453, 2232, 449, 474, 491, 1527, 1525, 1522, 2475, 2467, 2465, 2451, 2449, 2446, 801, 800, 2426, 2424, 2421, 2418, 1723, 2435, 780, 778, 775, 2387, 2385, 2382, 2379, 1695, 2375, 1693, 2396, 735, 733, 730, 727, 749, 1718, 2616, 2615, 2604, 2603, 2601, 2584, 2583, 2581, 2579, 1800, 2591, 2550, 2549, 2547, 2545, 1792, 2542, 1790, 2558, 929, 2719, 1841, 2710, 2708, 1833, 1831, 2690, 2688, 2686, 1815, 1809, 1808, 1774, 1756, 1754, 1737, 1736, 1734, 1739, 1816, 1711, 1676, 1674, 633, 629, 1638, 1636, 1633, 1641, 598, 1605, 1604, 1602, 1600, 605, 1609, 1607, 2327, 887, 853, 1775, 822, 820, 1757, 1755, 1584, 524, 1560, 1558, 468, 464, 1514, 1511, 1508, 1519, 408, 404, 400, 1452, 1447, 1444, 417, 1458, 1455, 2208, 364, 361, 358, 2154, 1401, 1400, 1398, 1396, 374, 1393, 371, 1408, 1406, 1403, 1413, 2173, 2172, 772, 726, 723, 1712, 672, 669, 666, 682, 1678, 1675, 625, 623, 621, 618, 2331, 636, 632, 1639, 1637, 1635, 920, 918, 884, 880, 889, 849, 848, 847, 846, 2497, 855, 852, 1776, 2641, 2742, 2787, 1380, 334, 1367, 1365, 301, 297, 1340, 1338, 1335, 1343, 255, 251, 247, 1296, 1291, 1288, 265, 1302, 1299, 2113, 204, 196, 192, 2042, 1232, 1230, 1224, 214, 1220, 210, 1242, 1239, 1235, 1250, 2077, 2075, 151, 148, 1993, 144, 1990, 1163, 1162, 1160, 1158, 1155, 161, 1152, 157, 1173, 1171, 1168, 1165, 168, 1181, 1178, 2021, 2020, 2018, 2023, 585, 560, 557, 1585, 516, 509, 1562, 1559, 458, 447, 2227, 472, 1516, 1513, 1510, 398, 396, 393, 390, 2181, 386, 2178, 407, 1453, 1451, 1449, 1446, 420, 1460, 2209, 769, 764, 720, 712, 2391, 729, 1713, 664, 663, 661, 659, 2352, 656, 2349, 671, 1679, 1677, 2553, 922, 919, 2519, 2516, 885, 883, 881, 2685, 2661, 2659, 2767, 2756, 2755, 140, 1137, 1136, 130, 127, 1125, 1124, 1122, 1127, 109, 106, 102, 1103, 1102, 1100, 1098, 116, 1107, 1105, 1980, 80, 76, 73, 1947, 1068, 1067, 1065, 1063, 90, 1060, 87, 1075, 1073, 1070, 1080, 1966, 1965, 46, 43, 40, 1912, 36, 1909, 1019, 1018, 1016, 1014, 58, 1011, 55, 1008, 51, 1029, 1027, 1024, 1021, 63, 1037, 1034, 1940, 1939, 1937, 1942, 8, 1866, 4, 1863, 1, 1860, 956, 954, 952, 949, 946, 17, 14, 969, 967, 964, 961, 27, 957, 24, 979, 976, 972, 1901, 1900, 1898, 1896, 986, 1905, 1903, 350, 349, 1381, 329, 327, 324, 1368, 1366, 292, 290, 287, 284, 2118, 304, 1341, 1339, 1337, 1345, 243, 240, 237, 2086, 233, 2083, 254, 1297, 1295, 1293, 1290, 1304, 2114, 190, 187, 184, 2034, 180, 2031, 177, 2027, 199, 1233, 1231, 1229, 1226, 217, 1223, 1241, 2078, 2076, 584, 555, 554, 552, 550, 2282, 562, 1586, 507, 506, 504, 502, 2257, 499, 2254, 515, 1563, 1561, 445, 443, 441, 2219, 438, 2216, 435, 2212, 460, 454, 475, 1517, 1515, 1512, 2447, 798, 797, 2422, 2419, 770, 768, 766, 2383, 2380, 2376, 721, 719, 717, 714, 731, 1714, 2602, 2582, 2580, 2548, 2546, 2543, 923, 921, 2717, 2706, 2705, 2683, 2682, 2680, 1771, 1752, 1750, 1733, 1732, 1731, 1735, 1814, 1707, 1670, 1668, 1631, 1629, 1626, 1634, 1599, 1598, 1596, 1594, 1603, 1601, 2326, 1772, 1753, 1751, 1581, 1554, 1552, 1504, 1501, 1498, 1509, 1442, 1437, 1434, 401, 1448, 1445, 2206, 1392, 1391, 1389, 1387, 1384, 359, 1399, 1397, 1394, 1404, 2171, 2170, 1708, 1672, 1669, 619, 1632, 1630, 1628, 1773, 1378, 1363, 1361, 1333, 1328, 1336, 1286, 1281, 1278, 248, 1292, 1289, 2111, 1218, 1216, 1210, 197, 1206, 193, 1228, 1225, 1221, 1236, 2073, 2071, 1151, 1150, 1148, 1146, 152, 1143, 149, 1140, 145, 1161, 1159, 1156, 1153, 158, 1169, 1166, 2017, 2016, 2014, 2019, 1582, 510, 1556, 1553, 452, 448, 1506, 1500, 394, 391, 387, 1443, 1441, 1439, 1436, 1450, 2207, 765, 716, 713, 1709, 662, 660, 657, 1673, 1671, 916, 914, 879, 878, 877, 882, 1135, 1134, 1121, 1120, 1118, 1123, 1097, 1096, 1094, 1092, 103, 1101, 1099, 1979, 1059, 1058, 1056, 1054, 77, 1051, 74, 1066, 1064, 1061, 1071, 1964, 1963, 1007, 1006, 1004, 1002, 999, 41, 996, 37, 1017, 1015, 1012, 1009, 52, 1025, 1022, 1936, 1935, 1933, 1938, 942, 940, 938, 935, 932, 5, 2, 955, 953, 950, 947, 18, 943, 15, 965, 962, 958, 1895, 1894, 1892, 1890, 973, 1899, 1897, 1379, 325, 1364, 1362, 288, 285, 1334, 1332, 1330, 241, 238, 234, 1287, 1285, 1283, 1280, 1294, 2112, 188, 185, 181, 178, 2028, 1219, 1217, 1215, 1212, 200, 1209, 1227, 2074, 2072, 583, 553, 551, 1583, 505, 503, 500, 513, 1557, 1555, 444, 442, 439, 436, 2213, 455, 451, 1507, 1505, 1502, 796, 763, 762, 760, 767, 711, 710, 708, 706, 2377, 718, 715, 1710, 2544, 917, 915, 2681, 1627, 1597, 1595, 2325, 1769, 1749, 1747, 1499, 1438, 1435, 2204, 1390, 1388, 1385, 1395, 2169, 2167, 1704, 1665, 1662, 1625, 1623, 1620, 1770, 1329, 1282, 1279, 2109, 1214, 1207, 1222, 2068, 2065, 1149, 1147, 1144, 1141, 146, 1157, 1154, 2013, 2011, 2008, 2015, 1579, 1549, 1546, 1495, 1487, 1433, 1431, 1428, 1425, 388, 1440, 2205, 1705, 658, 1667, 1664, 1119, 1095, 1093, 1978, 1057, 1055, 1052, 1062, 1962, 1960, 1005, 1003, 1000, 997, 38, 1013, 1010, 1932, 1930, 1927, 1934, 941, 939, 936, 933, 6, 930, 3, 951, 948, 944, 1889, 1887, 1884, 1881, 959, 1893, 1891, 35, 1377, 1360, 1358, 1327, 1325, 1322, 1331, 1277, 1275, 1272, 1269, 235, 1284, 2110, 1205, 1204, 1201, 1198, 182, 1195, 179, 1213, 2070, 2067, 1580, 501, 1551, 1548, 440, 437, 1497, 1494, 1490, 1503, 761, 709, 707, 1706, 913, 912, 2198, 1386, 2164, 2161, 1621, 1766, 2103, 1208, 2058, 2054, 1145, 1142, 2005, 2002, 1999, 2009, 1488, 1429, 1426, 2200, 1698, 1659, 1656, 1975, 1053, 1957, 1954, 1001, 998, 1924, 1921, 1918, 1928, 937, 934, 931, 1879, 1876, 1873, 1870, 945, 1885, 1882, 1323, 1273, 1270, 2105, 1202, 1199, 1196, 1211, 2061, 2057, 1576, 1543, 1540, 1484, 1481, 1478, 1491, 1700]);\n\n /*\n * Copyright 2007 ZXing authors\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 // import java.util.List;\n /**\n * @author Guenther Grau\n */\n /*public final*/\n class PDF417DetectorResult {\n constructor(bits, points) {\n this.bits = bits;\n this.points = points;\n }\n getBits() {\n return this.bits;\n }\n getPoints() {\n return this.points;\n }\n }\n\n /*\n * Copyright 2009 ZXing authors\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 // import java.util.ArrayList;\n // import java.util.Arrays;\n // import java.util.List;\n // import java.util.Map;\n /**\n * Encapsulates logic that can detect a PDF417 Code in an image, even if the\n * PDF417 Code is rotated or skewed, or partially obscured.
\n *\n * @author SITA Lab (kevin.osullivan@sita.aero)\n * @author dswitkin@google.com (Daniel Switkin)\n * @author Guenther Grau\n */\n /*public*/ /*final*/\n class Detector$3 {\n /**\n * Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.
\n *\n * @param image barcode image to decode\n * @param hints optional hints to detector\n * @param multiple if true, then the image is searched for multiple codes. If false, then at most one code will\n * be found and returned\n * @return {@link PDF417DetectorResult} encapsulating results of detecting a PDF417 code\n * @throws NotFoundException if no PDF417 Code can be found\n */\n static detectMultiple(image, hints, multiple) {\n // TODO detection improvement, tryHarder could try several different luminance thresholds/blackpoints or even\n // different binarizers\n // boolean tryHarder = hints != null && hints.containsKey(DecodeHintType.TRY_HARDER);\n let bitMatrix = image.getBlackMatrix();\n let barcodeCoordinates = Detector$3.detect(multiple, bitMatrix);\n if (!barcodeCoordinates.length) {\n bitMatrix = bitMatrix.clone();\n bitMatrix.rotate180();\n barcodeCoordinates = Detector$3.detect(multiple, bitMatrix);\n }\n return new PDF417DetectorResult(bitMatrix, barcodeCoordinates);\n }\n /**\n * Detects PDF417 codes in an image. Only checks 0 degree rotation\n * @param multiple if true, then the image is searched for multiple codes. If false, then at most one code will\n * be found and returned\n * @param bitMatrix bit matrix to detect barcodes in\n * @return List of ResultPoint arrays containing the coordinates of found barcodes\n */\n static detect(multiple, bitMatrix) {\n const barcodeCoordinates = new Array();\n let row = 0;\n let column = 0;\n let foundBarcodeInRow = false;\n while (row < bitMatrix.getHeight()) {\n const vertices = Detector$3.findVertices(bitMatrix, row, column);\n if (vertices[0] == null && vertices[3] == null) {\n if (!foundBarcodeInRow) {\n // we didn't find any barcode so that's the end of searching\n break;\n }\n // we didn't find a barcode starting at the given column and row. Try again from the first column and slightly\n // below the lowest barcode we found so far.\n foundBarcodeInRow = false;\n column = 0;\n for (const barcodeCoordinate of barcodeCoordinates) {\n if (barcodeCoordinate[1] != null) {\n row = Math.trunc(Math.max(row, barcodeCoordinate[1].getY()));\n }\n if (barcodeCoordinate[3] != null) {\n row = Math.max(row, Math.trunc(barcodeCoordinate[3].getY()));\n }\n }\n row += Detector$3.ROW_STEP;\n continue;\n }\n foundBarcodeInRow = true;\n barcodeCoordinates.push(vertices);\n if (!multiple) {\n break;\n }\n // if we didn't find a right row indicator column, then continue the search for the next barcode after the\n // start pattern of the barcode just found.\n if (vertices[2] != null) {\n column = Math.trunc(vertices[2].getX());\n row = Math.trunc(vertices[2].getY());\n } else {\n column = Math.trunc(vertices[4].getX());\n row = Math.trunc(vertices[4].getY());\n }\n }\n return barcodeCoordinates;\n }\n /**\n * Locate the vertices and the codewords area of a black blob using the Start\n * and Stop patterns as locators.\n *\n * @param matrix the scanned barcode image.\n * @return an array containing the vertices:\n * vertices[0] x, y top left barcode\n * vertices[1] x, y bottom left barcode\n * vertices[2] x, y top right barcode\n * vertices[3] x, y bottom right barcode\n * vertices[4] x, y top left codeword area\n * vertices[5] x, y bottom left codeword area\n * vertices[6] x, y top right codeword area\n * vertices[7] x, y bottom right codeword area\n */\n static findVertices(matrix, startRow, startColumn) {\n const height = matrix.getHeight();\n const width = matrix.getWidth();\n // const result = new ResultPoint[8];\n const result = new Array(8);\n Detector$3.copyToResult(result, Detector$3.findRowsWithPattern(matrix, height, width, startRow, startColumn, Detector$3.START_PATTERN), Detector$3.INDEXES_START_PATTERN);\n if (result[4] != null) {\n startColumn = Math.trunc(result[4].getX());\n startRow = Math.trunc(result[4].getY());\n }\n Detector$3.copyToResult(result, Detector$3.findRowsWithPattern(matrix, height, width, startRow, startColumn, Detector$3.STOP_PATTERN), Detector$3.INDEXES_STOP_PATTERN);\n return result;\n }\n static copyToResult(result, tmpResult, destinationIndexes) {\n for (let i = 0; i < destinationIndexes.length; i++) {\n result[destinationIndexes[i]] = tmpResult[i];\n }\n }\n static findRowsWithPattern(matrix, height, width, startRow, startColumn, pattern) {\n // const result = new ResultPoint[4];\n const result = new Array(4);\n let found = false;\n const counters = new Int32Array(pattern.length);\n for (; startRow < height; startRow += Detector$3.ROW_STEP) {\n let loc = Detector$3.findGuardPattern(matrix, startColumn, startRow, width, false, pattern, counters);\n if (loc != null) {\n while (startRow > 0) {\n const previousRowLoc = Detector$3.findGuardPattern(matrix, startColumn, --startRow, width, false, pattern, counters);\n if (previousRowLoc != null) {\n loc = previousRowLoc;\n } else {\n startRow++;\n break;\n }\n }\n result[0] = new ResultPoint(loc[0], startRow);\n result[1] = new ResultPoint(loc[1], startRow);\n found = true;\n break;\n }\n }\n let stopRow = startRow + 1;\n // Last row of the current symbol that contains pattern\n if (found) {\n let skippedRowCount = 0;\n let previousRowLoc = Int32Array.from([Math.trunc(result[0].getX()), Math.trunc(result[1].getX())]);\n for (; stopRow < height; stopRow++) {\n const loc = Detector$3.findGuardPattern(matrix, previousRowLoc[0], stopRow, width, false, pattern, counters);\n // a found pattern is only considered to belong to the same barcode if the start and end positions\n // don't differ too much. Pattern drift should be not bigger than two for consecutive rows. With\n // a higher number of skipped rows drift could be larger. To keep it simple for now, we allow a slightly\n // larger drift and don't check for skipped rows.\n if (loc != null && Math.abs(previousRowLoc[0] - loc[0]) < Detector$3.MAX_PATTERN_DRIFT && Math.abs(previousRowLoc[1] - loc[1]) < Detector$3.MAX_PATTERN_DRIFT) {\n previousRowLoc = loc;\n skippedRowCount = 0;\n } else {\n if (skippedRowCount > Detector$3.SKIPPED_ROW_COUNT_MAX) {\n break;\n } else {\n skippedRowCount++;\n }\n }\n }\n stopRow -= skippedRowCount + 1;\n result[2] = new ResultPoint(previousRowLoc[0], stopRow);\n result[3] = new ResultPoint(previousRowLoc[1], stopRow);\n }\n if (stopRow - startRow < Detector$3.BARCODE_MIN_HEIGHT) {\n Arrays.fill(result, null);\n }\n return result;\n }\n /**\n * @param matrix row of black/white values to search\n * @param column x position to start search\n * @param row y position to start search\n * @param width the number of pixels to search on this row\n * @param pattern pattern of counts of number of black and white pixels that are\n * being searched for as a pattern\n * @param counters array of counters, as long as pattern, to re-use\n * @return start/end horizontal offset of guard pattern, as an array of two ints.\n */\n static findGuardPattern(matrix, column, row, width, whiteFirst, pattern, counters) {\n Arrays.fillWithin(counters, 0, counters.length, 0);\n let patternStart = column;\n let pixelDrift = 0;\n // if there are black pixels left of the current pixel shift to the left, but only for MAX_PIXEL_DRIFT pixels\n while (matrix.get(patternStart, row) && patternStart > 0 && pixelDrift++ < Detector$3.MAX_PIXEL_DRIFT) {\n patternStart--;\n }\n let x = patternStart;\n let counterPosition = 0;\n let patternLength = pattern.length;\n for (let isWhite = whiteFirst; x < width; x++) {\n let pixel = matrix.get(x, row);\n if (pixel !== isWhite) {\n counters[counterPosition]++;\n } else {\n if (counterPosition === patternLength - 1) {\n if (Detector$3.patternMatchVariance(counters, pattern, Detector$3.MAX_INDIVIDUAL_VARIANCE) < Detector$3.MAX_AVG_VARIANCE) {\n return new Int32Array([patternStart, x]);\n }\n patternStart += counters[0] + counters[1];\n System.arraycopy(counters, 2, counters, 0, counterPosition - 1);\n counters[counterPosition - 1] = 0;\n counters[counterPosition] = 0;\n counterPosition--;\n } else {\n counterPosition++;\n }\n counters[counterPosition] = 1;\n isWhite = !isWhite;\n }\n }\n if (counterPosition === patternLength - 1 && Detector$3.patternMatchVariance(counters, pattern, Detector$3.MAX_INDIVIDUAL_VARIANCE) < Detector$3.MAX_AVG_VARIANCE) {\n return new Int32Array([patternStart, x - 1]);\n }\n return null;\n }\n /**\n * Determines how closely a set of observed counts of runs of black/white\n * values matches a given target pattern. This is reported as the ratio of\n * the total variance from the expected pattern proportions across all\n * pattern elements, to the length of the pattern.\n *\n * @param counters observed counters\n * @param pattern expected pattern\n * @param maxIndividualVariance The most any counter can differ before we give up\n * @return ratio of total variance between counters and pattern compared to total pattern size\n */\n static patternMatchVariance(counters, pattern, maxIndividualVariance) {\n let numCounters = counters.length;\n let total = 0;\n let patternLength = 0;\n for (let i = 0; i < numCounters; i++) {\n total += counters[i];\n patternLength += pattern[i];\n }\n if (total < patternLength) {\n // If we don't even have one pixel per unit of bar width, assume this\n // is too small to reliably match, so fail:\n return (/*Float.POSITIVE_INFINITY*/Infinity\n );\n }\n // We're going to fake floating-point math in integers. We just need to use more bits.\n // Scale up patternLength so that intermediate values below like scaledCounter will have\n // more \"significant digits\".\n let unitBarWidth = total / patternLength;\n maxIndividualVariance *= unitBarWidth;\n let totalVariance = 0.0;\n for (let x = 0; x < numCounters; x++) {\n let counter = counters[x];\n let scaledPattern = pattern[x] * unitBarWidth;\n let variance = counter > scaledPattern ? counter - scaledPattern : scaledPattern - counter;\n if (variance > maxIndividualVariance) {\n return (/*Float.POSITIVE_INFINITY*/Infinity\n );\n }\n totalVariance += variance;\n }\n return totalVariance / total;\n }\n }\n Detector$3.INDEXES_START_PATTERN = Int32Array.from([0, 4, 1, 5]);\n Detector$3.INDEXES_STOP_PATTERN = Int32Array.from([6, 2, 7, 3]);\n Detector$3.MAX_AVG_VARIANCE = 0.42;\n Detector$3.MAX_INDIVIDUAL_VARIANCE = 0.8;\n // B S B S B S B S Bar/Space pattern\n // 11111111 0 1 0 1 0 1 000\n Detector$3.START_PATTERN = Int32Array.from([8, 1, 1, 1, 1, 1, 1, 3]);\n // 1111111 0 1 000 1 0 1 00 1\n Detector$3.STOP_PATTERN = Int32Array.from([7, 1, 1, 3, 1, 1, 1, 2, 1]);\n Detector$3.MAX_PIXEL_DRIFT = 3;\n Detector$3.MAX_PATTERN_DRIFT = 5;\n // if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged.\n // if we set the value too high, then we might detect the start pattern from a neighbor barcode.\n Detector$3.SKIPPED_ROW_COUNT_MAX = 25;\n // A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least\n // 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it.\n Detector$3.ROW_STEP = 5;\n Detector$3.BARCODE_MIN_HEIGHT = 10;\n\n /*\n * Copyright 2012 ZXing authors\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 * @author Sean Owen\n * @see com.google.zxing.common.reedsolomon.GenericGFPoly\n */\n /*final*/\n class ModulusPoly {\n constructor(field, coefficients) {\n if (coefficients.length === 0) {\n throw new IllegalArgumentException();\n }\n this.field = field;\n let coefficientsLength = /*int*/coefficients.length;\n if (coefficientsLength > 1 && coefficients[0] === 0) {\n // Leading term must be non-zero for anything except the constant polynomial \"0\"\n let firstNonZero = /*int*/1;\n while (firstNonZero < coefficientsLength && coefficients[firstNonZero] === 0) {\n firstNonZero++;\n }\n if (firstNonZero === coefficientsLength) {\n this.coefficients = new Int32Array([0]);\n } else {\n this.coefficients = new Int32Array(coefficientsLength - firstNonZero);\n System.arraycopy(coefficients, firstNonZero, this.coefficients, 0, this.coefficients.length);\n }\n } else {\n this.coefficients = coefficients;\n }\n }\n getCoefficients() {\n return this.coefficients;\n }\n /**\n * @return degree of this polynomial\n */\n getDegree() {\n return this.coefficients.length - 1;\n }\n /**\n * @return true iff this polynomial is the monomial \"0\"\n */\n isZero() {\n return this.coefficients[0] === 0;\n }\n /**\n * @return coefficient of x^degree term in this polynomial\n */\n getCoefficient(degree) {\n return this.coefficients[this.coefficients.length - 1 - degree];\n }\n /**\n * @return evaluation of this polynomial at a given point\n */\n evaluateAt(a) {\n if (a === 0) {\n // Just return the x^0 coefficient\n return this.getCoefficient(0);\n }\n if (a === 1) {\n // Just the sum of the coefficients\n let sum = /*int*/0;\n for (let coefficient /*int*/ of this.coefficients) {\n sum = this.field.add(sum, coefficient);\n }\n return sum;\n }\n let result = /*int*/this.coefficients[0];\n let size = /*int*/this.coefficients.length;\n for (let i /*int*/ = 1; i < size; i++) {\n result = this.field.add(this.field.multiply(a, result), this.coefficients[i]);\n }\n return result;\n }\n add(other) {\n if (!this.field.equals(other.field)) {\n throw new IllegalArgumentException('ModulusPolys do not have same ModulusGF field');\n }\n if (this.isZero()) {\n return other;\n }\n if (other.isZero()) {\n return this;\n }\n let smallerCoefficients = this.coefficients;\n let largerCoefficients = other.coefficients;\n if (smallerCoefficients.length > largerCoefficients.length) {\n let temp = smallerCoefficients;\n smallerCoefficients = largerCoefficients;\n largerCoefficients = temp;\n }\n let sumDiff = new Int32Array(largerCoefficients.length);\n let lengthDiff = /*int*/largerCoefficients.length - smallerCoefficients.length;\n // Copy high-order terms only found in higher-degree polynomial's coefficients\n System.arraycopy(largerCoefficients, 0, sumDiff, 0, lengthDiff);\n for (let i /*int*/ = lengthDiff; i < largerCoefficients.length; i++) {\n sumDiff[i] = this.field.add(smallerCoefficients[i - lengthDiff], largerCoefficients[i]);\n }\n return new ModulusPoly(this.field, sumDiff);\n }\n subtract(other) {\n if (!this.field.equals(other.field)) {\n throw new IllegalArgumentException('ModulusPolys do not have same ModulusGF field');\n }\n if (other.isZero()) {\n return this;\n }\n return this.add(other.negative());\n }\n multiply(other) {\n if (other instanceof ModulusPoly) {\n return this.multiplyOther(other);\n }\n return this.multiplyScalar(other);\n }\n multiplyOther(other) {\n if (!this.field.equals(other.field)) {\n throw new IllegalArgumentException('ModulusPolys do not have same ModulusGF field');\n }\n if (this.isZero() || other.isZero()) {\n // return this.field.getZero();\n return new ModulusPoly(this.field, new Int32Array([0]));\n }\n let aCoefficients = this.coefficients;\n let aLength = /*int*/aCoefficients.length;\n let bCoefficients = other.coefficients;\n let bLength = /*int*/bCoefficients.length;\n let product = new Int32Array(aLength + bLength - 1);\n for (let i /*int*/ = 0; i < aLength; i++) {\n let aCoeff = /*int*/aCoefficients[i];\n for (let j /*int*/ = 0; j < bLength; j++) {\n product[i + j] = this.field.add(product[i + j], this.field.multiply(aCoeff, bCoefficients[j]));\n }\n }\n return new ModulusPoly(this.field, product);\n }\n negative() {\n let size = /*int*/this.coefficients.length;\n let negativeCoefficients = new Int32Array(size);\n for (let i /*int*/ = 0; i < size; i++) {\n negativeCoefficients[i] = this.field.subtract(0, this.coefficients[i]);\n }\n return new ModulusPoly(this.field, negativeCoefficients);\n }\n multiplyScalar(scalar) {\n if (scalar === 0) {\n return new ModulusPoly(this.field, new Int32Array([0]));\n }\n if (scalar === 1) {\n return this;\n }\n let size = /*int*/this.coefficients.length;\n let product = new Int32Array(size);\n for (let i /*int*/ = 0; i < size; i++) {\n product[i] = this.field.multiply(this.coefficients[i], scalar);\n }\n return new ModulusPoly(this.field, product);\n }\n multiplyByMonomial(degree, coefficient) {\n if (degree < 0) {\n throw new IllegalArgumentException();\n }\n if (coefficient === 0) {\n return new ModulusPoly(this.field, new Int32Array([0]));\n }\n let size = /*int*/this.coefficients.length;\n let product = new Int32Array(size + degree);\n for (let i /*int*/ = 0; i < size; i++) {\n product[i] = this.field.multiply(this.coefficients[i], coefficient);\n }\n return new ModulusPoly(this.field, product);\n }\n /*\n ModulusPoly[] divide(other: ModulusPoly) {\n if (!field.equals(other.field)) {\n throw new IllegalArgumentException(\"ModulusPolys do not have same ModulusGF field\");\n }\n if (other.isZero()) {\n throw new IllegalArgumentException(\"Divide by 0\");\n }\n let quotient: ModulusPoly = field.getZero();\n let remainder: ModulusPoly = this;\n let denominatorLeadingTerm: /*int/ number = other.getCoefficient(other.getDegree());\n let inverseDenominatorLeadingTerm: /*int/ number = field.inverse(denominatorLeadingTerm);\n while (remainder.getDegree() >= other.getDegree() && !remainder.isZero()) {\n let degreeDifference: /*int/ number = remainder.getDegree() - other.getDegree();\n let scale: /*int/ number = field.multiply(remainder.getCoefficient(remainder.getDegree()), inverseDenominatorLeadingTerm);\n let term: ModulusPoly = other.multiplyByMonomial(degreeDifference, scale);\n let iterationQuotient: ModulusPoly = field.buildMonomial(degreeDifference, scale);\n quotient = quotient.add(iterationQuotient);\n remainder = remainder.subtract(term);\n }\n return new ModulusPoly[] { quotient, remainder };\n }\n */\n // @Override\n toString() {\n let result = new StringBuilder( /*8 * this.getDegree()*/); // dynamic string size in JS\n for (let degree /*int*/ = this.getDegree(); degree >= 0; degree--) {\n let coefficient = /*int*/this.getCoefficient(degree);\n if (coefficient !== 0) {\n if (coefficient < 0) {\n result.append(' - ');\n coefficient = -coefficient;\n } else {\n if (result.length() > 0) {\n result.append(' + ');\n }\n }\n if (degree === 0 || coefficient !== 1) {\n result.append(coefficient);\n }\n if (degree !== 0) {\n if (degree === 1) {\n result.append('x');\n } else {\n result.append('x^');\n result.append(degree);\n }\n }\n }\n }\n return result.toString();\n }\n }\n class ModulusBase {\n add(a, b) {\n return (a + b) % this.modulus;\n }\n subtract(a, b) {\n return (this.modulus + a - b) % this.modulus;\n }\n exp(a) {\n return this.expTable[a];\n }\n log(a) {\n if (a === 0) {\n throw new IllegalArgumentException();\n }\n return this.logTable[a];\n }\n inverse(a) {\n if (a === 0) {\n throw new ArithmeticException();\n }\n return this.expTable[this.modulus - this.logTable[a] - 1];\n }\n multiply(a, b) {\n if (a === 0 || b === 0) {\n return 0;\n }\n return this.expTable[(this.logTable[a] + this.logTable[b]) % (this.modulus - 1)];\n }\n getSize() {\n return this.modulus;\n }\n equals(o) {\n return o === this;\n }\n }\n\n /*\n * Copyright 2012 ZXing authors\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 * A field based on powers of a generator integer, modulo some modulus.
\n *\n * @author Sean Owen\n * @see com.google.zxing.common.reedsolomon.GenericGF\n */\n /*public final*/\n class ModulusGF extends ModulusBase {\n // private /*final*/ modulus: /*int*/ number;\n constructor(modulus, generator) {\n super();\n this.modulus = modulus;\n this.expTable = new Int32Array(modulus);\n this.logTable = new Int32Array(modulus);\n let x = /*int*/1;\n for (let i /*int*/ = 0; i < modulus; i++) {\n this.expTable[i] = x;\n x = x * generator % modulus;\n }\n for (let i /*int*/ = 0; i < modulus - 1; i++) {\n this.logTable[this.expTable[i]] = i;\n }\n // logTable[0] == 0 but this should never be used\n this.zero = new ModulusPoly(this, new Int32Array([0]));\n this.one = new ModulusPoly(this, new Int32Array([1]));\n }\n getZero() {\n return this.zero;\n }\n getOne() {\n return this.one;\n }\n buildMonomial(degree, coefficient) {\n if (degree < 0) {\n throw new IllegalArgumentException();\n }\n if (coefficient === 0) {\n return this.zero;\n }\n let coefficients = new Int32Array(degree + 1);\n coefficients[0] = coefficient;\n return new ModulusPoly(this, coefficients);\n }\n }\n ModulusGF.PDF417_GF = new ModulusGF(PDF417Common.NUMBER_OF_CODEWORDS, 3);\n\n /*\n * Copyright 2012 ZXing authors\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 * PDF417 error correction implementation.
\n *\n * This example \n * is quite useful in understanding the algorithm.
\n *\n * @author Sean Owen\n * @see com.google.zxing.common.reedsolomon.ReedSolomonDecoder\n */\n /*public final*/\n class ErrorCorrection {\n constructor() {\n this.field = ModulusGF.PDF417_GF;\n }\n /**\n * @param received received codewords\n * @param numECCodewords number of those codewords used for EC\n * @param erasures location of erasures\n * @return number of errors\n * @throws ChecksumException if errors cannot be corrected, maybe because of too many errors\n */\n decode(received, numECCodewords, erasures) {\n let poly = new ModulusPoly(this.field, received);\n let S = new Int32Array(numECCodewords);\n let error = false;\n for (let i /*int*/ = numECCodewords; i > 0; i--) {\n let evaluation = poly.evaluateAt(this.field.exp(i));\n S[numECCodewords - i] = evaluation;\n if (evaluation !== 0) {\n error = true;\n }\n }\n if (!error) {\n return 0;\n }\n let knownErrors = this.field.getOne();\n if (erasures != null) {\n for (const erasure of erasures) {\n let b = this.field.exp(received.length - 1 - erasure);\n // Add (1 - bx) term:\n let term = new ModulusPoly(this.field, new Int32Array([this.field.subtract(0, b), 1]));\n knownErrors = knownErrors.multiply(term);\n }\n }\n let syndrome = new ModulusPoly(this.field, S);\n // syndrome = syndrome.multiply(knownErrors);\n let sigmaOmega = this.runEuclideanAlgorithm(this.field.buildMonomial(numECCodewords, 1), syndrome, numECCodewords);\n let sigma = sigmaOmega[0];\n let omega = sigmaOmega[1];\n // sigma = sigma.multiply(knownErrors);\n let errorLocations = this.findErrorLocations(sigma);\n let errorMagnitudes = this.findErrorMagnitudes(omega, sigma, errorLocations);\n for (let i /*int*/ = 0; i < errorLocations.length; i++) {\n let position = received.length - 1 - this.field.log(errorLocations[i]);\n if (position < 0) {\n throw ChecksumException.getChecksumInstance();\n }\n received[position] = this.field.subtract(received[position], errorMagnitudes[i]);\n }\n return errorLocations.length;\n }\n /**\n *\n * @param ModulusPoly\n * @param a\n * @param ModulusPoly\n * @param b\n * @param int\n * @param R\n * @throws ChecksumException\n */\n runEuclideanAlgorithm(a, b, R) {\n // Assume a's degree is >= b's\n if (a.getDegree() < b.getDegree()) {\n let temp = a;\n a = b;\n b = temp;\n }\n let rLast = a;\n let r = b;\n let tLast = this.field.getZero();\n let t = this.field.getOne();\n // Run Euclidean algorithm until r's degree is less than R/2\n while (r.getDegree() >= Math.round(R / 2)) {\n let rLastLast = rLast;\n let tLastLast = tLast;\n rLast = r;\n tLast = t;\n // Divide rLastLast by rLast, with quotient in q and remainder in r\n if (rLast.isZero()) {\n // Oops, Euclidean algorithm already terminated?\n throw ChecksumException.getChecksumInstance();\n }\n r = rLastLast;\n let q = this.field.getZero();\n let denominatorLeadingTerm = rLast.getCoefficient(rLast.getDegree());\n let dltInverse = this.field.inverse(denominatorLeadingTerm);\n while (r.getDegree() >= rLast.getDegree() && !r.isZero()) {\n let degreeDiff = r.getDegree() - rLast.getDegree();\n let scale = this.field.multiply(r.getCoefficient(r.getDegree()), dltInverse);\n q = q.add(this.field.buildMonomial(degreeDiff, scale));\n r = r.subtract(rLast.multiplyByMonomial(degreeDiff, scale));\n }\n t = q.multiply(tLast).subtract(tLastLast).negative();\n }\n let sigmaTildeAtZero = t.getCoefficient(0);\n if (sigmaTildeAtZero === 0) {\n throw ChecksumException.getChecksumInstance();\n }\n let inverse = this.field.inverse(sigmaTildeAtZero);\n let sigma = t.multiply(inverse);\n let omega = r.multiply(inverse);\n return [sigma, omega];\n }\n /**\n *\n * @param errorLocator\n * @throws ChecksumException\n */\n findErrorLocations(errorLocator) {\n // This is a direct application of Chien's search\n let numErrors = errorLocator.getDegree();\n let result = new Int32Array(numErrors);\n let e = 0;\n for (let i /*int*/ = 1; i < this.field.getSize() && e < numErrors; i++) {\n if (errorLocator.evaluateAt(i) === 0) {\n result[e] = this.field.inverse(i);\n e++;\n }\n }\n if (e !== numErrors) {\n throw ChecksumException.getChecksumInstance();\n }\n return result;\n }\n findErrorMagnitudes(errorEvaluator, errorLocator, errorLocations) {\n let errorLocatorDegree = errorLocator.getDegree();\n let formalDerivativeCoefficients = new Int32Array(errorLocatorDegree);\n for (let i /*int*/ = 1; i <= errorLocatorDegree; i++) {\n formalDerivativeCoefficients[errorLocatorDegree - i] = this.field.multiply(i, errorLocator.getCoefficient(i));\n }\n let formalDerivative = new ModulusPoly(this.field, formalDerivativeCoefficients);\n // This is directly applying Forney's Formula\n let s = errorLocations.length;\n let result = new Int32Array(s);\n for (let i /*int*/ = 0; i < s; i++) {\n let xiInverse = this.field.inverse(errorLocations[i]);\n let numerator = this.field.subtract(0, errorEvaluator.evaluateAt(xiInverse));\n let denominator = this.field.inverse(formalDerivative.evaluateAt(xiInverse));\n result[i] = this.field.multiply(numerator, denominator);\n }\n return result;\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\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 * @author Guenther Grau\n */\n /*final*/\n class BoundingBox {\n constructor(image, topLeft, bottomLeft, topRight, bottomRight) {\n if (image instanceof BoundingBox) {\n this.constructor_2(image);\n } else {\n this.constructor_1(image, topLeft, bottomLeft, topRight, bottomRight);\n }\n }\n /**\n *\n * @param image\n * @param topLeft\n * @param bottomLeft\n * @param topRight\n * @param bottomRight\n *\n * @throws NotFoundException\n */\n constructor_1(image, topLeft, bottomLeft, topRight, bottomRight) {\n const leftUnspecified = topLeft == null || bottomLeft == null;\n const rightUnspecified = topRight == null || bottomRight == null;\n if (leftUnspecified && rightUnspecified) {\n throw new NotFoundException();\n }\n if (leftUnspecified) {\n topLeft = new ResultPoint(0, topRight.getY());\n bottomLeft = new ResultPoint(0, bottomRight.getY());\n } else if (rightUnspecified) {\n topRight = new ResultPoint(image.getWidth() - 1, topLeft.getY());\n bottomRight = new ResultPoint(image.getWidth() - 1, bottomLeft.getY());\n }\n this.image = image;\n this.topLeft = topLeft;\n this.bottomLeft = bottomLeft;\n this.topRight = topRight;\n this.bottomRight = bottomRight;\n this.minX = Math.trunc(Math.min(topLeft.getX(), bottomLeft.getX()));\n this.maxX = Math.trunc(Math.max(topRight.getX(), bottomRight.getX()));\n this.minY = Math.trunc(Math.min(topLeft.getY(), topRight.getY()));\n this.maxY = Math.trunc(Math.max(bottomLeft.getY(), bottomRight.getY()));\n }\n constructor_2(boundingBox) {\n this.image = boundingBox.image;\n this.topLeft = boundingBox.getTopLeft();\n this.bottomLeft = boundingBox.getBottomLeft();\n this.topRight = boundingBox.getTopRight();\n this.bottomRight = boundingBox.getBottomRight();\n this.minX = boundingBox.getMinX();\n this.maxX = boundingBox.getMaxX();\n this.minY = boundingBox.getMinY();\n this.maxY = boundingBox.getMaxY();\n }\n /**\n * @throws NotFoundException\n */\n static merge(leftBox, rightBox) {\n if (leftBox == null) {\n return rightBox;\n }\n if (rightBox == null) {\n return leftBox;\n }\n return new BoundingBox(leftBox.image, leftBox.topLeft, leftBox.bottomLeft, rightBox.topRight, rightBox.bottomRight);\n }\n /**\n * @throws NotFoundException\n */\n addMissingRows(missingStartRows, missingEndRows, isLeft) {\n let newTopLeft = this.topLeft;\n let newBottomLeft = this.bottomLeft;\n let newTopRight = this.topRight;\n let newBottomRight = this.bottomRight;\n if (missingStartRows > 0) {\n let top = isLeft ? this.topLeft : this.topRight;\n let newMinY = Math.trunc(top.getY() - missingStartRows);\n if (newMinY < 0) {\n newMinY = 0;\n }\n let newTop = new ResultPoint(top.getX(), newMinY);\n if (isLeft) {\n newTopLeft = newTop;\n } else {\n newTopRight = newTop;\n }\n }\n if (missingEndRows > 0) {\n let bottom = isLeft ? this.bottomLeft : this.bottomRight;\n let newMaxY = Math.trunc(bottom.getY() + missingEndRows);\n if (newMaxY >= this.image.getHeight()) {\n newMaxY = this.image.getHeight() - 1;\n }\n let newBottom = new ResultPoint(bottom.getX(), newMaxY);\n if (isLeft) {\n newBottomLeft = newBottom;\n } else {\n newBottomRight = newBottom;\n }\n }\n return new BoundingBox(this.image, newTopLeft, newBottomLeft, newTopRight, newBottomRight);\n }\n getMinX() {\n return this.minX;\n }\n getMaxX() {\n return this.maxX;\n }\n getMinY() {\n return this.minY;\n }\n getMaxY() {\n return this.maxY;\n }\n getTopLeft() {\n return this.topLeft;\n }\n getTopRight() {\n return this.topRight;\n }\n getBottomLeft() {\n return this.bottomLeft;\n }\n getBottomRight() {\n return this.bottomRight;\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\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 // package com.google.zxing.pdf417.decoder;\n /**\n * @author Guenther Grau\n */\n /*final*/\n class BarcodeMetadata {\n constructor(columnCount, rowCountUpperPart, rowCountLowerPart, errorCorrectionLevel) {\n this.columnCount = columnCount;\n this.errorCorrectionLevel = errorCorrectionLevel;\n this.rowCountUpperPart = rowCountUpperPart;\n this.rowCountLowerPart = rowCountLowerPart;\n this.rowCount = rowCountUpperPart + rowCountLowerPart;\n }\n getColumnCount() {\n return this.columnCount;\n }\n getErrorCorrectionLevel() {\n return this.errorCorrectionLevel;\n }\n getRowCount() {\n return this.rowCount;\n }\n getRowCountUpperPart() {\n return this.rowCountUpperPart;\n }\n getRowCountLowerPart() {\n return this.rowCountLowerPart;\n }\n }\n\n /**\n * Java Formatter class polyfill that works in the JS way.\n */\n class Formatter {\n constructor() {\n this.buffer = '';\n }\n /**\n *\n * @see https://stackoverflow.com/a/13439711/4367683\n *\n * @param str\n * @param arr\n */\n static form(str, arr) {\n let i = -1;\n function callback(exp, p0, p1, p2, p3, p4) {\n if (exp === '%%') return '%';\n if (arr[++i] === undefined) return undefined;\n exp = p2 ? parseInt(p2.substr(1)) : undefined;\n let base = p3 ? parseInt(p3.substr(1)) : undefined;\n let val;\n switch (p4) {\n case 's':\n val = arr[i];\n break;\n case 'c':\n val = arr[i][0];\n break;\n case 'f':\n val = parseFloat(arr[i]).toFixed(exp);\n break;\n case 'p':\n val = parseFloat(arr[i]).toPrecision(exp);\n break;\n case 'e':\n val = parseFloat(arr[i]).toExponential(exp);\n break;\n case 'x':\n val = parseInt(arr[i]).toString(base ? base : 16);\n break;\n case 'd':\n val = parseFloat(parseInt(arr[i], base ? base : 10).toPrecision(exp)).toFixed(0);\n break;\n }\n val = typeof val === 'object' ? JSON.stringify(val) : (+val).toString(base);\n let size = parseInt(p1); /* padding size */\n let ch = p1 && p1[0] + '' === '0' ? '0' : ' '; /* isnull? */\n while (val.length < size) val = p0 !== undefined ? val + ch : ch + val; /* isminus? */\n return val;\n }\n let regex = /%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;\n return str.replace(regex, callback);\n }\n /**\n *\n * @param append The new string to append.\n * @param args Argumets values to be formated.\n */\n format(append, ...args) {\n this.buffer += Formatter.form(append, args);\n }\n /**\n * Returns the Formatter string value.\n */\n toString() {\n return this.buffer;\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\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 * @author Guenther Grau\n */\n let DetectionResultColumn = /*#__PURE__*/(() => {\n class DetectionResultColumn {\n constructor(boundingBox) {\n this.boundingBox = new BoundingBox(boundingBox);\n // this.codewords = new Codeword[boundingBox.getMaxY() - boundingBox.getMinY() + 1];\n this.codewords = new Array(boundingBox.getMaxY() - boundingBox.getMinY() + 1);\n }\n /*final*/\n getCodewordNearby(imageRow) {\n let codeword = this.getCodeword(imageRow);\n if (codeword != null) {\n return codeword;\n }\n for (let i = 1; i < DetectionResultColumn.MAX_NEARBY_DISTANCE; i++) {\n let nearImageRow = this.imageRowToCodewordIndex(imageRow) - i;\n if (nearImageRow >= 0) {\n codeword = this.codewords[nearImageRow];\n if (codeword != null) {\n return codeword;\n }\n }\n nearImageRow = this.imageRowToCodewordIndex(imageRow) + i;\n if (nearImageRow < this.codewords.length) {\n codeword = this.codewords[nearImageRow];\n if (codeword != null) {\n return codeword;\n }\n }\n }\n return null;\n }\n /*final int*/\n imageRowToCodewordIndex(imageRow) {\n return imageRow - this.boundingBox.getMinY();\n }\n /*final void*/\n setCodeword(imageRow, codeword) {\n this.codewords[this.imageRowToCodewordIndex(imageRow)] = codeword;\n }\n /*final*/\n getCodeword(imageRow) {\n return this.codewords[this.imageRowToCodewordIndex(imageRow)];\n }\n /*final*/\n getBoundingBox() {\n return this.boundingBox;\n }\n /*final*/\n getCodewords() {\n return this.codewords;\n }\n // @Override\n toString() {\n const formatter = new Formatter();\n let row = 0;\n for (const codeword of this.codewords) {\n if (codeword == null) {\n formatter.format('%3d: | %n', row++);\n continue;\n }\n formatter.format('%3d: %3d|%3d%n', row++, codeword.getRowNumber(), codeword.getValue());\n }\n return formatter.toString();\n }\n }\n DetectionResultColumn.MAX_NEARBY_DISTANCE = 5;\n\n /*\n * Copyright 2013 ZXing authors\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 // import java.util.ArrayList;\n // import java.util.Collection;\n // import java.util.HashMap;\n // import java.util.Map;\n // import java.util.Map.Entry;\n /**\n * @author Guenther Grau\n */\n /*final*/\n return DetectionResultColumn;\n })();\n class BarcodeValue {\n constructor() {\n this.values = new Map();\n }\n /**\n * Add an occurrence of a value\n */\n setValue(value) {\n value = Math.trunc(value);\n let confidence = this.values.get(value);\n if (confidence == null) {\n confidence = 0;\n }\n confidence++;\n this.values.set(value, confidence);\n }\n /**\n * Determines the maximum occurrence of a set value and returns all values which were set with this occurrence.\n * @return an array of int, containing the values with the highest occurrence, or null, if no value was set\n */\n getValue() {\n let maxConfidence = -1;\n let result = new Array();\n for (const [key, value] of this.values.entries()) {\n const entry = {\n getKey: () => key,\n getValue: () => value\n };\n if (entry.getValue() > maxConfidence) {\n maxConfidence = entry.getValue();\n result = [];\n result.push(entry.getKey());\n } else if (entry.getValue() === maxConfidence) {\n result.push(entry.getKey());\n }\n }\n return PDF417Common.toIntArray(result);\n }\n getConfidence(value) {\n return this.values.get(value);\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\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 * @author Guenther Grau\n */\n /*final*/\n class DetectionResultRowIndicatorColumn extends DetectionResultColumn {\n constructor(boundingBox, isLeft) {\n super(boundingBox);\n this._isLeft = isLeft;\n }\n setRowNumbers() {\n for (let codeword /*Codeword*/ of this.getCodewords()) {\n if (codeword != null) {\n codeword.setRowNumberAsRowIndicatorColumn();\n }\n }\n }\n // TODO implement properly\n // TODO maybe we should add missing codewords to store the correct row number to make\n // finding row numbers for other columns easier\n // use row height count to make detection of invalid row numbers more reliable\n adjustCompleteIndicatorColumnRowNumbers(barcodeMetadata) {\n let codewords = this.getCodewords();\n this.setRowNumbers();\n this.removeIncorrectCodewords(codewords, barcodeMetadata);\n let boundingBox = this.getBoundingBox();\n let top = this._isLeft ? boundingBox.getTopLeft() : boundingBox.getTopRight();\n let bottom = this._isLeft ? boundingBox.getBottomLeft() : boundingBox.getBottomRight();\n let firstRow = this.imageRowToCodewordIndex(Math.trunc(top.getY()));\n let lastRow = this.imageRowToCodewordIndex(Math.trunc(bottom.getY()));\n // We need to be careful using the average row height. Barcode could be skewed so that we have smaller and\n // taller rows\n // float averageRowHeight = (lastRow - firstRow) / /*(float)*/ barcodeMetadata.getRowCount();\n let barcodeRow = -1;\n let maxRowHeight = 1;\n let currentRowHeight = 0;\n for (let codewordsRow /*int*/ = firstRow; codewordsRow < lastRow; codewordsRow++) {\n if (codewords[codewordsRow] == null) {\n continue;\n }\n let codeword = codewords[codewordsRow];\n // float expectedRowNumber = (codewordsRow - firstRow) / averageRowHeight;\n // if (Math.abs(codeword.getRowNumber() - expectedRowNumber) > 2) {\n // SimpleLog.log(LEVEL.WARNING,\n // \"Removing codeword, rowNumberSkew too high, codeword[\" + codewordsRow + \"]: Expected Row: \" +\n // expectedRowNumber + \", RealRow: \" + codeword.getRowNumber() + \", value: \" + codeword.getValue());\n // codewords[codewordsRow] = null;\n // }\n let rowDifference = codeword.getRowNumber() - barcodeRow;\n // TODO improve handling with case where first row indicator doesn't start with 0\n if (rowDifference === 0) {\n currentRowHeight++;\n } else if (rowDifference === 1) {\n maxRowHeight = Math.max(maxRowHeight, currentRowHeight);\n currentRowHeight = 1;\n barcodeRow = codeword.getRowNumber();\n } else if (rowDifference < 0 || codeword.getRowNumber() >= barcodeMetadata.getRowCount() || rowDifference > codewordsRow) {\n codewords[codewordsRow] = null;\n } else {\n let checkedRows;\n if (maxRowHeight > 2) {\n checkedRows = (maxRowHeight - 2) * rowDifference;\n } else {\n checkedRows = rowDifference;\n }\n let closePreviousCodewordFound = checkedRows >= codewordsRow;\n for (let i /*int*/ = 1; i <= checkedRows && !closePreviousCodewordFound; i++) {\n // there must be (height * rowDifference) number of codewords missing. For now we assume height = 1.\n // This should hopefully get rid of most problems already.\n closePreviousCodewordFound = codewords[codewordsRow - i] != null;\n }\n if (closePreviousCodewordFound) {\n codewords[codewordsRow] = null;\n } else {\n barcodeRow = codeword.getRowNumber();\n currentRowHeight = 1;\n }\n }\n }\n // return (int) (averageRowHeight + 0.5);\n }\n\n getRowHeights() {\n let barcodeMetadata = this.getBarcodeMetadata();\n if (barcodeMetadata == null) {\n return null;\n }\n this.adjustIncompleteIndicatorColumnRowNumbers(barcodeMetadata);\n let result = new Int32Array(barcodeMetadata.getRowCount());\n for (let codeword /*Codeword*/ of this.getCodewords()) {\n if (codeword != null) {\n let rowNumber = codeword.getRowNumber();\n if (rowNumber >= result.length) {\n // We have more rows than the barcode metadata allows for, ignore them.\n continue;\n }\n result[rowNumber]++;\n } // else throw exception?\n }\n\n return result;\n }\n // TODO maybe we should add missing codewords to store the correct row number to make\n // finding row numbers for other columns easier\n // use row height count to make detection of invalid row numbers more reliable\n adjustIncompleteIndicatorColumnRowNumbers(barcodeMetadata) {\n let boundingBox = this.getBoundingBox();\n let top = this._isLeft ? boundingBox.getTopLeft() : boundingBox.getTopRight();\n let bottom = this._isLeft ? boundingBox.getBottomLeft() : boundingBox.getBottomRight();\n let firstRow = this.imageRowToCodewordIndex(Math.trunc(top.getY()));\n let lastRow = this.imageRowToCodewordIndex(Math.trunc(bottom.getY()));\n // float averageRowHeight = (lastRow - firstRow) / /*(float)*/ barcodeMetadata.getRowCount();\n let codewords = this.getCodewords();\n let barcodeRow = -1;\n for (let codewordsRow /*int*/ = firstRow; codewordsRow < lastRow; codewordsRow++) {\n if (codewords[codewordsRow] == null) {\n continue;\n }\n let codeword = codewords[codewordsRow];\n codeword.setRowNumberAsRowIndicatorColumn();\n let rowDifference = codeword.getRowNumber() - barcodeRow;\n // TODO improve handling with case where first row indicator doesn't start with 0\n if (rowDifference === 0) ;else if (rowDifference === 1) {\n barcodeRow = codeword.getRowNumber();\n } else if (codeword.getRowNumber() >= barcodeMetadata.getRowCount()) {\n codewords[codewordsRow] = null;\n } else {\n barcodeRow = codeword.getRowNumber();\n }\n }\n // return (int) (averageRowHeight + 0.5);\n }\n\n getBarcodeMetadata() {\n let codewords = this.getCodewords();\n let barcodeColumnCount = new BarcodeValue();\n let barcodeRowCountUpperPart = new BarcodeValue();\n let barcodeRowCountLowerPart = new BarcodeValue();\n let barcodeECLevel = new BarcodeValue();\n for (let codeword /*Codeword*/ of codewords) {\n if (codeword == null) {\n continue;\n }\n codeword.setRowNumberAsRowIndicatorColumn();\n let rowIndicatorValue = codeword.getValue() % 30;\n let codewordRowNumber = codeword.getRowNumber();\n if (!this._isLeft) {\n codewordRowNumber += 2;\n }\n switch (codewordRowNumber % 3) {\n case 0:\n barcodeRowCountUpperPart.setValue(rowIndicatorValue * 3 + 1);\n break;\n case 1:\n barcodeECLevel.setValue(rowIndicatorValue / 3);\n barcodeRowCountLowerPart.setValue(rowIndicatorValue % 3);\n break;\n case 2:\n barcodeColumnCount.setValue(rowIndicatorValue + 1);\n break;\n }\n }\n // Maybe we should check if we have ambiguous values?\n if (barcodeColumnCount.getValue().length === 0 || barcodeRowCountUpperPart.getValue().length === 0 || barcodeRowCountLowerPart.getValue().length === 0 || barcodeECLevel.getValue().length === 0 || barcodeColumnCount.getValue()[0] < 1 || barcodeRowCountUpperPart.getValue()[0] + barcodeRowCountLowerPart.getValue()[0] < PDF417Common.MIN_ROWS_IN_BARCODE || barcodeRowCountUpperPart.getValue()[0] + barcodeRowCountLowerPart.getValue()[0] > PDF417Common.MAX_ROWS_IN_BARCODE) {\n return null;\n }\n let barcodeMetadata = new BarcodeMetadata(barcodeColumnCount.getValue()[0], barcodeRowCountUpperPart.getValue()[0], barcodeRowCountLowerPart.getValue()[0], barcodeECLevel.getValue()[0]);\n this.removeIncorrectCodewords(codewords, barcodeMetadata);\n return barcodeMetadata;\n }\n removeIncorrectCodewords(codewords, barcodeMetadata) {\n // Remove codewords which do not match the metadata\n // TODO Maybe we should keep the incorrect codewords for the start and end positions?\n for (let codewordRow /*int*/ = 0; codewordRow < codewords.length; codewordRow++) {\n let codeword = codewords[codewordRow];\n if (codewords[codewordRow] == null) {\n continue;\n }\n let rowIndicatorValue = codeword.getValue() % 30;\n let codewordRowNumber = codeword.getRowNumber();\n if (codewordRowNumber > barcodeMetadata.getRowCount()) {\n codewords[codewordRow] = null;\n continue;\n }\n if (!this._isLeft) {\n codewordRowNumber += 2;\n }\n switch (codewordRowNumber % 3) {\n case 0:\n if (rowIndicatorValue * 3 + 1 !== barcodeMetadata.getRowCountUpperPart()) {\n codewords[codewordRow] = null;\n }\n break;\n case 1:\n if (Math.trunc(rowIndicatorValue / 3) !== barcodeMetadata.getErrorCorrectionLevel() || rowIndicatorValue % 3 !== barcodeMetadata.getRowCountLowerPart()) {\n codewords[codewordRow] = null;\n }\n break;\n case 2:\n if (rowIndicatorValue + 1 !== barcodeMetadata.getColumnCount()) {\n codewords[codewordRow] = null;\n }\n break;\n }\n }\n }\n isLeft() {\n return this._isLeft;\n }\n // @Override\n toString() {\n return 'IsLeft: ' + this._isLeft + '\\n' + super.toString();\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\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 * @author Guenther Grau\n */\n /*final*/\n class DetectionResult {\n constructor(barcodeMetadata, boundingBox) {\n /*final*/this.ADJUST_ROW_NUMBER_SKIP = 2;\n this.barcodeMetadata = barcodeMetadata;\n this.barcodeColumnCount = barcodeMetadata.getColumnCount();\n this.boundingBox = boundingBox;\n // this.detectionResultColumns = new DetectionResultColumn[this.barcodeColumnCount + 2];\n this.detectionResultColumns = new Array(this.barcodeColumnCount + 2);\n }\n getDetectionResultColumns() {\n this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]);\n this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount + 1]);\n let unadjustedCodewordCount = PDF417Common.MAX_CODEWORDS_IN_BARCODE;\n let previousUnadjustedCount;\n do {\n previousUnadjustedCount = unadjustedCodewordCount;\n unadjustedCodewordCount = this.adjustRowNumbersAndGetCount();\n } while (unadjustedCodewordCount > 0 && unadjustedCodewordCount < previousUnadjustedCount);\n return this.detectionResultColumns;\n }\n adjustIndicatorColumnRowNumbers(detectionResultColumn) {\n if (detectionResultColumn != null) {\n detectionResultColumn.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata);\n }\n }\n // TODO ensure that no detected codewords with unknown row number are left\n // we should be able to estimate the row height and use it as a hint for the row number\n // we should also fill the rows top to bottom and bottom to top\n /**\n * @return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords\n * will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers\n */\n adjustRowNumbersAndGetCount() {\n let unadjustedCount = this.adjustRowNumbersByRow();\n if (unadjustedCount === 0) {\n return 0;\n }\n for (let barcodeColumn /*int*/ = 1; barcodeColumn < this.barcodeColumnCount + 1; barcodeColumn++) {\n let codewords = this.detectionResultColumns[barcodeColumn].getCodewords();\n for (let codewordsRow /*int*/ = 0; codewordsRow < codewords.length; codewordsRow++) {\n if (codewords[codewordsRow] == null) {\n continue;\n }\n if (!codewords[codewordsRow].hasValidRowNumber()) {\n this.adjustRowNumbers(barcodeColumn, codewordsRow, codewords);\n }\n }\n }\n return unadjustedCount;\n }\n adjustRowNumbersByRow() {\n this.adjustRowNumbersFromBothRI();\n // TODO we should only do full row adjustments if row numbers of left and right row indicator column match.\n // Maybe it's even better to calculated the height (rows: d) and divide it by the number of barcode\n // rows. This, together with the LRI and RRI row numbers should allow us to get a good estimate where a row\n // number starts and ends.\n let unadjustedCount = this.adjustRowNumbersFromLRI();\n return unadjustedCount + this.adjustRowNumbersFromRRI();\n }\n adjustRowNumbersFromBothRI() {\n if (this.detectionResultColumns[0] == null || this.detectionResultColumns[this.barcodeColumnCount + 1] == null) {\n return;\n }\n let LRIcodewords = this.detectionResultColumns[0].getCodewords();\n let RRIcodewords = this.detectionResultColumns[this.barcodeColumnCount + 1].getCodewords();\n for (let codewordsRow /*int*/ = 0; codewordsRow < LRIcodewords.length; codewordsRow++) {\n if (LRIcodewords[codewordsRow] != null && RRIcodewords[codewordsRow] != null && LRIcodewords[codewordsRow].getRowNumber() === RRIcodewords[codewordsRow].getRowNumber()) {\n for (let barcodeColumn /*int*/ = 1; barcodeColumn <= this.barcodeColumnCount; barcodeColumn++) {\n let codeword = this.detectionResultColumns[barcodeColumn].getCodewords()[codewordsRow];\n if (codeword == null) {\n continue;\n }\n codeword.setRowNumber(LRIcodewords[codewordsRow].getRowNumber());\n if (!codeword.hasValidRowNumber()) {\n this.detectionResultColumns[barcodeColumn].getCodewords()[codewordsRow] = null;\n }\n }\n }\n }\n }\n adjustRowNumbersFromRRI() {\n if (this.detectionResultColumns[this.barcodeColumnCount + 1] == null) {\n return 0;\n }\n let unadjustedCount = 0;\n let codewords = this.detectionResultColumns[this.barcodeColumnCount + 1].getCodewords();\n for (let codewordsRow /*int*/ = 0; codewordsRow < codewords.length; codewordsRow++) {\n if (codewords[codewordsRow] == null) {\n continue;\n }\n let rowIndicatorRowNumber = codewords[codewordsRow].getRowNumber();\n let invalidRowCounts = 0;\n for (let barcodeColumn /*int*/ = this.barcodeColumnCount + 1; barcodeColumn > 0 && invalidRowCounts < this.ADJUST_ROW_NUMBER_SKIP; barcodeColumn--) {\n let codeword = this.detectionResultColumns[barcodeColumn].getCodewords()[codewordsRow];\n if (codeword != null) {\n invalidRowCounts = DetectionResult.adjustRowNumberIfValid(rowIndicatorRowNumber, invalidRowCounts, codeword);\n if (!codeword.hasValidRowNumber()) {\n unadjustedCount++;\n }\n }\n }\n }\n return unadjustedCount;\n }\n adjustRowNumbersFromLRI() {\n if (this.detectionResultColumns[0] == null) {\n return 0;\n }\n let unadjustedCount = 0;\n let codewords = this.detectionResultColumns[0].getCodewords();\n for (let codewordsRow /*int*/ = 0; codewordsRow < codewords.length; codewordsRow++) {\n if (codewords[codewordsRow] == null) {\n continue;\n }\n let rowIndicatorRowNumber = codewords[codewordsRow].getRowNumber();\n let invalidRowCounts = 0;\n for (let barcodeColumn /*int*/ = 1; barcodeColumn < this.barcodeColumnCount + 1 && invalidRowCounts < this.ADJUST_ROW_NUMBER_SKIP; barcodeColumn++) {\n let codeword = this.detectionResultColumns[barcodeColumn].getCodewords()[codewordsRow];\n if (codeword != null) {\n invalidRowCounts = DetectionResult.adjustRowNumberIfValid(rowIndicatorRowNumber, invalidRowCounts, codeword);\n if (!codeword.hasValidRowNumber()) {\n unadjustedCount++;\n }\n }\n }\n }\n return unadjustedCount;\n }\n static adjustRowNumberIfValid(rowIndicatorRowNumber, invalidRowCounts, codeword) {\n if (codeword == null) {\n return invalidRowCounts;\n }\n if (!codeword.hasValidRowNumber()) {\n if (codeword.isValidRowNumber(rowIndicatorRowNumber)) {\n codeword.setRowNumber(rowIndicatorRowNumber);\n invalidRowCounts = 0;\n } else {\n ++invalidRowCounts;\n }\n }\n return invalidRowCounts;\n }\n adjustRowNumbers(barcodeColumn, codewordsRow, codewords) {\n if (!this.detectionResultColumns[barcodeColumn - 1]) {\n return;\n }\n let codeword = codewords[codewordsRow];\n let previousColumnCodewords = this.detectionResultColumns[barcodeColumn - 1].getCodewords();\n let nextColumnCodewords = previousColumnCodewords;\n if (this.detectionResultColumns[barcodeColumn + 1] != null) {\n nextColumnCodewords = this.detectionResultColumns[barcodeColumn + 1].getCodewords();\n }\n // let otherCodewords: Codeword[] = new Codeword[14];\n let otherCodewords = new Array(14);\n otherCodewords[2] = previousColumnCodewords[codewordsRow];\n otherCodewords[3] = nextColumnCodewords[codewordsRow];\n if (codewordsRow > 0) {\n otherCodewords[0] = codewords[codewordsRow - 1];\n otherCodewords[4] = previousColumnCodewords[codewordsRow - 1];\n otherCodewords[5] = nextColumnCodewords[codewordsRow - 1];\n }\n if (codewordsRow > 1) {\n otherCodewords[8] = codewords[codewordsRow - 2];\n otherCodewords[10] = previousColumnCodewords[codewordsRow - 2];\n otherCodewords[11] = nextColumnCodewords[codewordsRow - 2];\n }\n if (codewordsRow < codewords.length - 1) {\n otherCodewords[1] = codewords[codewordsRow + 1];\n otherCodewords[6] = previousColumnCodewords[codewordsRow + 1];\n otherCodewords[7] = nextColumnCodewords[codewordsRow + 1];\n }\n if (codewordsRow < codewords.length - 2) {\n otherCodewords[9] = codewords[codewordsRow + 2];\n otherCodewords[12] = previousColumnCodewords[codewordsRow + 2];\n otherCodewords[13] = nextColumnCodewords[codewordsRow + 2];\n }\n for (let otherCodeword of otherCodewords) {\n if (DetectionResult.adjustRowNumber(codeword, otherCodeword)) {\n return;\n }\n }\n }\n /**\n * @return true, if row number was adjusted, false otherwise\n */\n static adjustRowNumber(codeword, otherCodeword) {\n if (otherCodeword == null) {\n return false;\n }\n if (otherCodeword.hasValidRowNumber() && otherCodeword.getBucket() === codeword.getBucket()) {\n codeword.setRowNumber(otherCodeword.getRowNumber());\n return true;\n }\n return false;\n }\n getBarcodeColumnCount() {\n return this.barcodeColumnCount;\n }\n getBarcodeRowCount() {\n return this.barcodeMetadata.getRowCount();\n }\n getBarcodeECLevel() {\n return this.barcodeMetadata.getErrorCorrectionLevel();\n }\n setBoundingBox(boundingBox) {\n this.boundingBox = boundingBox;\n }\n getBoundingBox() {\n return this.boundingBox;\n }\n setDetectionResultColumn(barcodeColumn, detectionResultColumn) {\n this.detectionResultColumns[barcodeColumn] = detectionResultColumn;\n }\n getDetectionResultColumn(barcodeColumn) {\n return this.detectionResultColumns[barcodeColumn];\n }\n // @Override\n toString() {\n let rowIndicatorColumn = this.detectionResultColumns[0];\n if (rowIndicatorColumn == null) {\n rowIndicatorColumn = this.detectionResultColumns[this.barcodeColumnCount + 1];\n }\n // try (\n let formatter = new Formatter();\n // ) {\n for (let codewordsRow /*int*/ = 0; codewordsRow < rowIndicatorColumn.getCodewords().length; codewordsRow++) {\n formatter.format('CW %3d:', codewordsRow);\n for (let barcodeColumn /*int*/ = 0; barcodeColumn < this.barcodeColumnCount + 2; barcodeColumn++) {\n if (this.detectionResultColumns[barcodeColumn] == null) {\n formatter.format(' | ');\n continue;\n }\n let codeword = this.detectionResultColumns[barcodeColumn].getCodewords()[codewordsRow];\n if (codeword == null) {\n formatter.format(' | ');\n continue;\n }\n formatter.format(' %3d|%3d', codeword.getRowNumber(), codeword.getValue());\n }\n formatter.format('%n');\n }\n return formatter.toString();\n // }\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\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 // package com.google.zxing.pdf417.decoder;\n /**\n * @author Guenther Grau\n */\n /*final*/\n let Codeword = /*#__PURE__*/(() => {\n class Codeword {\n constructor(startX, endX, bucket, value) {\n this.rowNumber = Codeword.BARCODE_ROW_UNKNOWN;\n this.startX = Math.trunc(startX);\n this.endX = Math.trunc(endX);\n this.bucket = Math.trunc(bucket);\n this.value = Math.trunc(value);\n }\n hasValidRowNumber() {\n return this.isValidRowNumber(this.rowNumber);\n }\n isValidRowNumber(rowNumber) {\n return rowNumber !== Codeword.BARCODE_ROW_UNKNOWN && this.bucket === rowNumber % 3 * 3;\n }\n setRowNumberAsRowIndicatorColumn() {\n this.rowNumber = Math.trunc(Math.trunc(this.value / 30) * 3 + Math.trunc(this.bucket / 3));\n }\n getWidth() {\n return this.endX - this.startX;\n }\n getStartX() {\n return this.startX;\n }\n getEndX() {\n return this.endX;\n }\n getBucket() {\n return this.bucket;\n }\n getValue() {\n return this.value;\n }\n getRowNumber() {\n return this.rowNumber;\n }\n setRowNumber(rowNumber) {\n this.rowNumber = rowNumber;\n }\n // @Override\n toString() {\n return this.rowNumber + '|' + this.value;\n }\n }\n Codeword.BARCODE_ROW_UNKNOWN = -1;\n\n /*\n * Copyright 2013 ZXing authors\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 * @author Guenther Grau\n * @author creatale GmbH (christoph.schulz@creatale.de)\n */\n /*final*/\n return Codeword;\n })();\n class PDF417CodewordDecoder {\n /* @note\n * this action have to be performed before first use of class\n * - static constructor\n * working with 32bit float (based from Java logic)\n */\n static initialize() {\n // Pre-computes the symbol ratio table.\n for ( /*int*/let i = 0; i < PDF417Common.SYMBOL_TABLE.length; i++) {\n let currentSymbol = PDF417Common.SYMBOL_TABLE[i];\n let currentBit = currentSymbol & 0x1;\n for ( /*int*/let j = 0; j < PDF417Common.BARS_IN_MODULE; j++) {\n let size = 0.0;\n while ((currentSymbol & 0x1) === currentBit) {\n size += 1.0;\n currentSymbol >>= 1;\n }\n currentBit = currentSymbol & 0x1;\n if (!PDF417CodewordDecoder.RATIOS_TABLE[i]) {\n PDF417CodewordDecoder.RATIOS_TABLE[i] = new Array(PDF417Common.BARS_IN_MODULE);\n }\n PDF417CodewordDecoder.RATIOS_TABLE[i][PDF417Common.BARS_IN_MODULE - j - 1] = Math.fround(size / PDF417Common.MODULES_IN_CODEWORD);\n }\n }\n this.bSymbolTableReady = true;\n }\n static getDecodedValue(moduleBitCount) {\n let decodedValue = PDF417CodewordDecoder.getDecodedCodewordValue(PDF417CodewordDecoder.sampleBitCounts(moduleBitCount));\n if (decodedValue !== -1) {\n return decodedValue;\n }\n return PDF417CodewordDecoder.getClosestDecodedValue(moduleBitCount);\n }\n static sampleBitCounts(moduleBitCount) {\n let bitCountSum = MathUtils.sum(moduleBitCount);\n let result = new Int32Array(PDF417Common.BARS_IN_MODULE);\n let bitCountIndex = 0;\n let sumPreviousBits = 0;\n for ( /*int*/let i = 0; i < PDF417Common.MODULES_IN_CODEWORD; i++) {\n let sampleIndex = bitCountSum / (2 * PDF417Common.MODULES_IN_CODEWORD) + i * bitCountSum / PDF417Common.MODULES_IN_CODEWORD;\n if (sumPreviousBits + moduleBitCount[bitCountIndex] <= sampleIndex) {\n sumPreviousBits += moduleBitCount[bitCountIndex];\n bitCountIndex++;\n }\n result[bitCountIndex]++;\n }\n return result;\n }\n static getDecodedCodewordValue(moduleBitCount) {\n let decodedValue = PDF417CodewordDecoder.getBitValue(moduleBitCount);\n return PDF417Common.getCodeword(decodedValue) === -1 ? -1 : decodedValue;\n }\n static getBitValue(moduleBitCount) {\n let result = /*long*/0;\n for (let /*int*/i = 0; i < moduleBitCount.length; i++) {\n for ( /*int*/let bit = 0; bit < moduleBitCount[i]; bit++) {\n result = result << 1 | (i % 2 === 0 ? 1 : 0);\n }\n }\n return Math.trunc(result);\n }\n // working with 32bit float (as in Java)\n static getClosestDecodedValue(moduleBitCount) {\n let bitCountSum = MathUtils.sum(moduleBitCount);\n let bitCountRatios = new Array(PDF417Common.BARS_IN_MODULE);\n if (bitCountSum > 1) {\n for (let /*int*/i = 0; i < bitCountRatios.length; i++) {\n bitCountRatios[i] = Math.fround(moduleBitCount[i] / bitCountSum);\n }\n }\n let bestMatchError = Float.MAX_VALUE;\n let bestMatch = -1;\n if (!this.bSymbolTableReady) {\n PDF417CodewordDecoder.initialize();\n }\n for ( /*int*/let j = 0; j < PDF417CodewordDecoder.RATIOS_TABLE.length; j++) {\n let error = 0.0;\n let ratioTableRow = PDF417CodewordDecoder.RATIOS_TABLE[j];\n for ( /*int*/let k = 0; k < PDF417Common.BARS_IN_MODULE; k++) {\n let diff = Math.fround(ratioTableRow[k] - bitCountRatios[k]);\n error += Math.fround(diff * diff);\n if (error >= bestMatchError) {\n break;\n }\n }\n if (error < bestMatchError) {\n bestMatchError = error;\n bestMatch = PDF417Common.SYMBOL_TABLE[j];\n }\n }\n return bestMatch;\n }\n }\n // flag that the table is ready for use\n PDF417CodewordDecoder.bSymbolTableReady = false;\n PDF417CodewordDecoder.RATIOS_TABLE = new Array(PDF417Common.SYMBOL_TABLE.length).map(x => x = new Array(PDF417Common.BARS_IN_MODULE));\n\n /*\n * Copyright 2013 ZXing authors\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 // package com.google.zxing.pdf417;\n /**\n * @author Guenther Grau\n */\n /*public final*/\n class PDF417ResultMetadata {\n constructor() {\n this.segmentCount = -1;\n this.fileSize = -1;\n this.timestamp = -1;\n this.checksum = -1;\n }\n /**\n * The Segment ID represents the segment of the whole file distributed over different symbols.\n *\n * @return File segment index\n */\n getSegmentIndex() {\n return this.segmentIndex;\n }\n setSegmentIndex(segmentIndex) {\n this.segmentIndex = segmentIndex;\n }\n /**\n * Is the same for each related PDF417 symbol\n *\n * @return File ID\n */\n getFileId() {\n return this.fileId;\n }\n setFileId(fileId) {\n this.fileId = fileId;\n }\n /**\n * @return always null\n * @deprecated use dedicated already parsed fields\n */\n // @Deprecated\n getOptionalData() {\n return this.optionalData;\n }\n /**\n * @param optionalData old optional data format as int array\n * @deprecated parse and use new fields\n */\n // @Deprecated\n setOptionalData(optionalData) {\n this.optionalData = optionalData;\n }\n /**\n * @return true if it is the last segment\n */\n isLastSegment() {\n return this.lastSegment;\n }\n setLastSegment(lastSegment) {\n this.lastSegment = lastSegment;\n }\n /**\n * @return count of segments, -1 if not set\n */\n getSegmentCount() {\n return this.segmentCount;\n }\n setSegmentCount(segmentCount /*int*/) {\n this.segmentCount = segmentCount;\n }\n getSender() {\n return this.sender || null;\n }\n setSender(sender) {\n this.sender = sender;\n }\n getAddressee() {\n return this.addressee || null;\n }\n setAddressee(addressee) {\n this.addressee = addressee;\n }\n /**\n * Filename of the encoded file\n *\n * @return filename\n */\n getFileName() {\n return this.fileName;\n }\n setFileName(fileName) {\n this.fileName = fileName;\n }\n /**\n * filesize in bytes of the encoded file\n *\n * @return filesize in bytes, -1 if not set\n */\n getFileSize() {\n return this.fileSize;\n }\n setFileSize(fileSize /*long*/) {\n this.fileSize = fileSize;\n }\n /**\n * 16-bit CRC checksum using CCITT-16\n *\n * @return crc checksum, -1 if not set\n */\n getChecksum() {\n return this.checksum;\n }\n setChecksum(checksum /*int*/) {\n this.checksum = checksum;\n }\n /**\n * unix epock timestamp, elapsed seconds since 1970-01-01\n *\n * @return elapsed seconds, -1 if not set\n */\n getTimestamp() {\n return this.timestamp;\n }\n setTimestamp(timestamp /*long*/) {\n this.timestamp = timestamp;\n }\n }\n\n /**\n * Ponyfill for Java's Long class.\n */\n class Long {\n /**\n * Parses a string to a number, since JS has no really Int64.\n *\n * @param num Numeric string.\n * @param radix Destination radix.\n */\n static parseLong(num, radix = undefined) {\n return parseInt(num, radix);\n }\n }\n\n /**\n * Custom Error class of type Exception.\n */\n let NullPointerException = /*#__PURE__*/(() => {\n class NullPointerException extends Exception {}\n NullPointerException.kind = 'NullPointerException';\n\n /*\n * Copyright (c) 1994, 2004, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation. Oracle designates this\n * particular file as subject to the \"Classpath\" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n // package java.io;\n /**\n * This abstract class is the superclass of all classes representing\n * an output stream of bytes. An output stream accepts output bytes\n * and sends them to some sink.\n * \n * Applications that need to define a subclass of\n * OutputStream
must always provide at least a method\n * that writes one byte of output.\n *\n * @author Arthur van Hoff\n * @see java.io.BufferedOutputStream\n * @see java.io.ByteArrayOutputStream\n * @see java.io.DataOutputStream\n * @see java.io.FilterOutputStream\n * @see java.io.InputStream\n * @see java.io.OutputStream#write(int)\n * @since JDK1.0\n */\n /*public*/\n return NullPointerException;\n })();\n class OutputStream /*implements Closeable, Flushable*/ {\n /**\n * Writes b.length
bytes from the specified byte array\n * to this output stream. The general contract for write(b)
\n * is that it should have exactly the same effect as the call\n * write(b, 0, b.length)
.\n *\n * @param b the data.\n * @exception IOException if an I/O error occurs.\n * @see java.io.OutputStream#write(byte[], int, int)\n */\n writeBytes(b) {\n this.writeBytesOffset(b, 0, b.length);\n }\n /**\n * Writes len
bytes from the specified byte array\n * starting at offset off
to this output stream.\n * The general contract for write(b, off, len)
is that\n * some of the bytes in the array b
are written to the\n * output stream in order; element b[off]
is the first\n * byte written and b[off+len-1]
is the last byte written\n * by this operation.\n *
\n * The write
method of OutputStream
calls\n * the write method of one argument on each of the bytes to be\n * written out. Subclasses are encouraged to override this method and\n * provide a more efficient implementation.\n *
\n * If b
is null
, a\n * NullPointerException
is thrown.\n *
\n * If off
is negative, or len
is negative, or\n * off+len
is greater than the length of the array\n * b
, then an IndexOutOfBoundsException is thrown.\n *\n * @param b the data.\n * @param off the start offset in the data.\n * @param len the number of bytes to write.\n * @exception IOException if an I/O error occurs. In particular,\n * an IOException
is thrown if the output\n * stream is closed.\n */\n writeBytesOffset(b, off, len) {\n if (b == null) {\n throw new NullPointerException();\n } else if (off < 0 || off > b.length || len < 0 || off + len > b.length || off + len < 0) {\n throw new IndexOutOfBoundsException();\n } else if (len === 0) {\n return;\n }\n for (let i = 0; i < len; i++) {\n this.write(b[off + i]);\n }\n }\n /**\n * Flushes this output stream and forces any buffered output bytes\n * to be written out. The general contract of flush
is\n * that calling it is an indication that, if any bytes previously\n * written have been buffered by the implementation of the output\n * stream, such bytes should immediately be written to their\n * intended destination.\n *
\n * If the intended destination of this stream is an abstraction provided by\n * the underlying operating system, for example a file, then flushing the\n * stream guarantees only that bytes previously written to the stream are\n * passed to the operating system for writing; it does not guarantee that\n * they are actually written to a physical device such as a disk drive.\n *
\n * The flush
method of OutputStream
does nothing.\n *\n * @exception IOException if an I/O error occurs.\n */\n flush() {}\n /**\n * Closes this output stream and releases any system resources\n * associated with this stream. The general contract of close
\n * is that it closes the output stream. A closed stream cannot perform\n * output operations and cannot be reopened.\n *
\n * The close
method of OutputStream
does nothing.\n *\n * @exception IOException if an I/O error occurs.\n */\n close() {}\n }\n\n /**\n * Custom Error class of type Exception.\n */\n class OutOfMemoryError extends Exception {}\n\n /*\n * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation. Oracle designates this\n * particular file as subject to the \"Classpath\" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n /**\n * This class implements an output stream in which the data is\n * written into a byte array. The buffer automatically grows as data\n * is written to it.\n * The data can be retrieved using toByteArray()
and\n * toString()
.\n *
\n * Closing a ByteArrayOutputStream has no effect. The methods in\n * this class can be called after the stream has been closed without\n * generating an IOException .\n *\n * @author Arthur van Hoff\n * @since JDK1.0\n */\n /*public*/\n class ByteArrayOutputStream extends OutputStream {\n /**\n * Creates a new byte array output stream. The buffer capacity is\n * initially 32 bytes, though its size increases if necessary.\n */\n // public constructor() {\n // this(32);\n // }\n /**\n * Creates a new byte array output stream, with a buffer capacity of\n * the specified size, in bytes.\n *\n * @param size the initial size.\n * @exception IllegalArgumentException if size is negative.\n */\n constructor(size = 32) {\n super();\n /**\n * The number of valid bytes in the buffer.\n */\n this.count = 0;\n if (size < 0) {\n throw new IllegalArgumentException('Negative initial size: ' + size);\n }\n this.buf = new Uint8Array(size);\n }\n /**\n * Increases the capacity if necessary to ensure that it can hold\n * at least the number of elements specified by the minimum\n * capacity argument.\n *\n * @param minCapacity the desired minimum capacity\n * @throws OutOfMemoryError if {@code minCapacity < 0}. This is\n * interpreted as a request for the unsatisfiably large capacity\n * {@code (long) Integer.MAX_VALUE + (minCapacity - Integer.MAX_VALUE)}.\n */\n ensureCapacity(minCapacity) {\n // overflow-conscious code\n if (minCapacity - this.buf.length > 0) this.grow(minCapacity);\n }\n /**\n * Increases the capacity to ensure that it can hold at least the\n * number of elements specified by the minimum capacity argument.\n *\n * @param minCapacity the desired minimum capacity\n */\n grow(minCapacity) {\n // overflow-conscious code\n let oldCapacity = this.buf.length;\n let newCapacity = oldCapacity << 1;\n if (newCapacity - minCapacity < 0) newCapacity = minCapacity;\n if (newCapacity < 0) {\n if (minCapacity < 0)\n // overflow\n throw new OutOfMemoryError();\n newCapacity = Integer.MAX_VALUE;\n }\n this.buf = Arrays.copyOfUint8Array(this.buf, newCapacity);\n }\n /**\n * Writes the specified byte to this byte array output stream.\n *\n * @param b the byte to be written.\n */\n write(b) {\n this.ensureCapacity(this.count + 1);\n this.buf[this.count] = /*(byte)*/b;\n this.count += 1;\n }\n /**\n * Writes len
bytes from the specified byte array\n * starting at offset off
to this byte array output stream.\n *\n * @param b the data.\n * @param off the start offset in the data.\n * @param len the number of bytes to write.\n */\n writeBytesOffset(b, off, len) {\n if (off < 0 || off > b.length || len < 0 || off + len - b.length > 0) {\n throw new IndexOutOfBoundsException();\n }\n this.ensureCapacity(this.count + len);\n System.arraycopy(b, off, this.buf, this.count, len);\n this.count += len;\n }\n /**\n * Writes the complete contents of this byte array output stream to\n * the specified output stream argument, as if by calling the output\n * stream's write method using out.write(buf, 0, count)
.\n *\n * @param out the output stream to which to write the data.\n * @exception IOException if an I/O error occurs.\n */\n writeTo(out) {\n out.writeBytesOffset(this.buf, 0, this.count);\n }\n /**\n * Resets the count
field of this byte array output\n * stream to zero, so that all currently accumulated output in the\n * output stream is discarded. The output stream can be used again,\n * reusing the already allocated buffer space.\n *\n * @see java.io.ByteArrayInputStream#count\n */\n reset() {\n this.count = 0;\n }\n /**\n * Creates a newly allocated byte array. Its size is the current\n * size of this output stream and the valid contents of the buffer\n * have been copied into it.\n *\n * @return the current contents of this output stream, as a byte array.\n * @see java.io.ByteArrayOutputStream#size()\n */\n toByteArray() {\n return Arrays.copyOfUint8Array(this.buf, this.count);\n }\n /**\n * Returns the current size of the buffer.\n *\n * @return the value of the count
field, which is the number\n * of valid bytes in this output stream.\n * @see java.io.ByteArrayOutputStream#count\n */\n size() {\n return this.count;\n }\n toString(param) {\n if (!param) {\n return this.toString_void();\n }\n if (typeof param === 'string') {\n return this.toString_string(param);\n }\n return this.toString_number(param);\n }\n /**\n * Converts the buffer's contents into a string decoding bytes using the\n * platform's default character set. The length of the new String \n * is a function of the character set, and hence may not be equal to the\n * size of the buffer.\n *\n *
This method always replaces malformed-input and unmappable-character\n * sequences with the default replacement string for the platform's\n * default character set. The {@linkplain java.nio.charset.CharsetDecoder}\n * class should be used when more control over the decoding process is\n * required.\n *\n * @return String decoded from the buffer's contents.\n * @since JDK1.1\n */\n toString_void() {\n return new String(this.buf /*, 0, this.count*/).toString();\n }\n /**\n * Converts the buffer's contents into a string by decoding the bytes using\n * the specified {@link java.nio.charset.Charset charsetName}. The length of\n * the new String is a function of the charset, and hence may not be\n * equal to the length of the byte array.\n *\n *
This method always replaces malformed-input and unmappable-character\n * sequences with this charset's default replacement string. The {@link\n * java.nio.charset.CharsetDecoder} class should be used when more control\n * over the decoding process is required.\n *\n * @param charsetName the name of a supported\n * {@linkplain java.nio.charset.Charset charset}\n * @return String decoded from the buffer's contents.\n * @exception UnsupportedEncodingException\n * If the named charset is not supported\n * @since JDK1.1\n */\n toString_string(charsetName) {\n return new String(this.buf /*, 0, this.count, charsetName*/).toString();\n }\n /**\n * Creates a newly allocated string. Its size is the current size of\n * the output stream and the valid contents of the buffer have been\n * copied into it. Each character c in the resulting string is\n * constructed from the corresponding element b in the byte\n * array such that:\n * \n * c == (char)(((hibyte & 0xff) << 8) | (b & 0xff))\n * \n *\n * @deprecated This method does not properly convert bytes into characters.\n * As of JDK 1.1, the preferred way to do this is via the\n * toString(String enc)
method, which takes an encoding-name\n * argument, or the toString()
method, which uses the\n * platform's default character encoding.\n *\n * @param hibyte the high byte of each resulting Unicode character.\n * @return the current contents of the output stream, as a string.\n * @see java.io.ByteArrayOutputStream#size()\n * @see java.io.ByteArrayOutputStream#toString(String)\n * @see java.io.ByteArrayOutputStream#toString()\n */\n // @Deprecated\n toString_number(hibyte) {\n return new String(this.buf /*, hibyte, 0, this.count*/).toString();\n }\n /**\n * Closing a ByteArrayOutputStream has no effect. The methods in\n * this class can be called after the stream has been closed without\n * generating an IOException .\n * \n *\n * @throws IOException\n */\n close() {}\n }\n\n /*\n * Copyright 2009 ZXing authors\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 /*private*/\n var Mode$2 = /*#__PURE__*/function (Mode) {\n Mode[Mode[\"ALPHA\"] = 0] = \"ALPHA\";\n Mode[Mode[\"LOWER\"] = 1] = \"LOWER\";\n Mode[Mode[\"MIXED\"] = 2] = \"MIXED\";\n Mode[Mode[\"PUNCT\"] = 3] = \"PUNCT\";\n Mode[Mode[\"ALPHA_SHIFT\"] = 4] = \"ALPHA_SHIFT\";\n Mode[Mode[\"PUNCT_SHIFT\"] = 5] = \"PUNCT_SHIFT\";\n return Mode;\n }(Mode$2 || {});\n /**\n * Indirectly access the global BigInt constructor, it\n * allows browsers that doesn't support BigInt to run\n * the library without breaking due to \"undefined BigInt\"\n * errors.\n */\n function getBigIntConstructor() {\n if (typeof window !== 'undefined') {\n return window['BigInt'] || null;\n }\n if (typeof global !== 'undefined') {\n return global['BigInt'] || null;\n }\n if (typeof self !== 'undefined') {\n return self['BigInt'] || null;\n }\n throw new Error('Can\\'t search globals for BigInt!');\n }\n /**\n * Used to store the BigInt constructor.\n */\n let BigInteger;\n /**\n * This function creates a bigint value. It allows browsers\n * that doesn't support BigInt to run the rest of the library\n * by not directly accessing the BigInt constructor.\n */\n function createBigInt(num) {\n if (typeof BigInteger === 'undefined') {\n BigInteger = getBigIntConstructor();\n }\n if (BigInteger === null) {\n throw new Error('BigInt is not supported!');\n }\n return BigInteger(num);\n }\n function getEXP900() {\n // in Java - array with length = 16\n let EXP900 = [];\n EXP900[0] = createBigInt(1);\n let nineHundred = createBigInt(900);\n EXP900[1] = nineHundred;\n // in Java - array with length = 16\n for (let i /*int*/ = 2; i < 16; i++) {\n EXP900[i] = EXP900[i - 1] * nineHundred;\n }\n return EXP900;\n }\n /**\n *
This class contains the methods for decoding the PDF417 codewords.
\n *\n * @author SITA Lab (kevin.osullivan@sita.aero)\n * @author Guenther Grau\n */\n /*final*/\n class DecodedBitStreamParser$2 {\n // private DecodedBitStreamParser() {\n // }\n /**\n *\n * @param codewords\n * @param ecLevel\n *\n * @throws FormatException\n */\n static decode(codewords, ecLevel) {\n // pass encoding to result (will be used for decode symbols in byte mode)\n let result = new StringBuilder('');\n // let encoding: Charset = StandardCharsets.ISO_8859_1;\n let encoding = CharacterSetECI.ISO8859_1;\n /**\n * @note the next command is specific from this TypeScript library\n * because TS can't properly cast some values to char and\n * convert it to string later correctly due to encoding\n * differences from Java version. As reported here:\n * https://github.com/zxing-js/library/pull/264/files#r382831593\n */\n result.enableDecoding(encoding);\n // Get compaction mode\n let codeIndex = 1;\n let code = codewords[codeIndex++];\n let resultMetadata = new PDF417ResultMetadata();\n while (codeIndex < codewords[0]) {\n switch (code) {\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex, result);\n break;\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6:\n codeIndex = DecodedBitStreamParser$2.byteCompaction(code, codewords, encoding, codeIndex, result);\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n result.append( /*(char)*/codewords[codeIndex++]);\n break;\n case DecodedBitStreamParser$2.NUMERIC_COMPACTION_MODE_LATCH:\n codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex, result);\n break;\n case DecodedBitStreamParser$2.ECI_CHARSET:\n let charsetECI = CharacterSetECI.getCharacterSetECIByValue(codewords[codeIndex++]);\n // encoding = Charset.forName(charsetECI.getName());\n break;\n case DecodedBitStreamParser$2.ECI_GENERAL_PURPOSE:\n // Can't do anything with generic ECI; skip its 2 characters\n codeIndex += 2;\n break;\n case DecodedBitStreamParser$2.ECI_USER_DEFINED:\n // Can't do anything with user ECI; skip its 1 character\n codeIndex++;\n break;\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_CONTROL_BLOCK:\n codeIndex = DecodedBitStreamParser$2.decodeMacroBlock(codewords, codeIndex, resultMetadata);\n break;\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:\n case DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR:\n // Should not see these outside a macro block\n throw new FormatException();\n default:\n // Default to text compaction. During testing numerous barcodes\n // appeared to be missing the starting mode. In these cases defaulting\n // to text compaction seems to work.\n codeIndex--;\n codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex, result);\n break;\n }\n if (codeIndex < codewords.length) {\n code = codewords[codeIndex++];\n } else {\n throw FormatException.getFormatInstance();\n }\n }\n if (result.length() === 0) {\n throw FormatException.getFormatInstance();\n }\n let decoderResult = new DecoderResult(null, result.toString(), null, ecLevel);\n decoderResult.setOther(resultMetadata);\n return decoderResult;\n }\n /**\n *\n * @param int\n * @param param1\n * @param codewords\n * @param int\n * @param codeIndex\n * @param PDF417ResultMetadata\n * @param resultMetadata\n *\n * @throws FormatException\n */\n // @SuppressWarnings(\"deprecation\")\n static decodeMacroBlock(codewords, codeIndex, resultMetadata) {\n if (codeIndex + DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS > codewords[0]) {\n // we must have at least two bytes left for the segment index\n throw FormatException.getFormatInstance();\n }\n let segmentIndexArray = new Int32Array(DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS);\n for (let i /*int*/ = 0; i < DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS; i++, codeIndex++) {\n segmentIndexArray[i] = codewords[codeIndex];\n }\n resultMetadata.setSegmentIndex(Integer.parseInt(DecodedBitStreamParser$2.decodeBase900toBase10(segmentIndexArray, DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS)));\n let fileId = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex, fileId);\n resultMetadata.setFileId(fileId.toString());\n let optionalFieldsStart = -1;\n if (codewords[codeIndex] === DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD) {\n optionalFieldsStart = codeIndex + 1;\n }\n while (codeIndex < codewords[0]) {\n switch (codewords[codeIndex]) {\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:\n codeIndex++;\n switch (codewords[codeIndex]) {\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:\n let fileName = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex + 1, fileName);\n resultMetadata.setFileName(fileName.toString());\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_SENDER:\n let sender = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex + 1, sender);\n resultMetadata.setSender(sender.toString());\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:\n let addressee = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex + 1, addressee);\n resultMetadata.setAddressee(addressee.toString());\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:\n let segmentCount = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex + 1, segmentCount);\n resultMetadata.setSegmentCount(Integer.parseInt(segmentCount.toString()));\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:\n let timestamp = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex + 1, timestamp);\n resultMetadata.setTimestamp(Long.parseLong(timestamp.toString()));\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:\n let checksum = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex + 1, checksum);\n resultMetadata.setChecksum(Integer.parseInt(checksum.toString()));\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:\n let fileSize = new StringBuilder();\n codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex + 1, fileSize);\n resultMetadata.setFileSize(Long.parseLong(fileSize.toString()));\n break;\n default:\n throw FormatException.getFormatInstance();\n }\n break;\n case DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR:\n codeIndex++;\n resultMetadata.setLastSegment(true);\n break;\n default:\n throw FormatException.getFormatInstance();\n }\n }\n // copy optional fields to additional options\n if (optionalFieldsStart !== -1) {\n let optionalFieldsLength = codeIndex - optionalFieldsStart;\n if (resultMetadata.isLastSegment()) {\n // do not include terminator\n optionalFieldsLength--;\n }\n resultMetadata.setOptionalData(Arrays.copyOfRange(codewords, optionalFieldsStart, optionalFieldsStart + optionalFieldsLength));\n }\n return codeIndex;\n }\n /**\n * Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be\n * encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as\n * well as selected control characters.\n *\n * @param codewords The array of codewords (data + error)\n * @param codeIndex The current index into the codeword array.\n * @param result The decoded data is appended to the result.\n * @return The next index into the codeword array.\n */\n static textCompaction(codewords, codeIndex, result) {\n // 2 character per codeword\n let textCompactionData = new Int32Array((codewords[0] - codeIndex) * 2);\n // Used to hold the byte compaction value if there is a mode shift\n let byteCompactionData = new Int32Array((codewords[0] - codeIndex) * 2);\n let index = 0;\n let end = false;\n while (codeIndex < codewords[0] && !end) {\n let code = codewords[codeIndex++];\n if (code < DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH) {\n textCompactionData[index] = code / 30;\n textCompactionData[index + 1] = code % 30;\n index += 2;\n } else {\n switch (code) {\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n // reinitialize text compaction mode to alpha sub mode\n textCompactionData[index++] = DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH;\n break;\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6:\n case DecodedBitStreamParser$2.NUMERIC_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_CONTROL_BLOCK:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:\n case DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR:\n codeIndex--;\n end = true;\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n // The Mode Shift codeword 913 shall cause a temporary\n // switch from Text Compaction mode to Byte Compaction mode.\n // This switch shall be in effect for only the next codeword,\n // after which the mode shall revert to the prevailing sub-mode\n // of the Text Compaction mode. Codeword 913 is only available\n // in Text Compaction mode; its use is described in 5.4.2.4.\n textCompactionData[index] = DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE;\n code = codewords[codeIndex++];\n byteCompactionData[index] = code;\n index++;\n break;\n }\n }\n }\n DecodedBitStreamParser$2.decodeTextCompaction(textCompactionData, byteCompactionData, index, result);\n return codeIndex;\n }\n /**\n * The Text Compaction mode includes all the printable ASCII characters\n * (i.e. values from 32 to 126) and three ASCII control characters: HT or tab\n * (9: e), LF or line feed (10: e), and CR or carriage\n * return (13: e). The Text Compaction mode also includes various latch\n * and shift characters which are used exclusively within the mode. The Text\n * Compaction mode encodes up to 2 characters per codeword. The compaction rules\n * for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode\n * switches are defined in 5.4.2.3.\n *\n * @param textCompactionData The text compaction data.\n * @param byteCompactionData The byte compaction data if there\n * was a mode shift.\n * @param length The size of the text compaction and byte compaction data.\n * @param result The decoded data is appended to the result.\n */\n static decodeTextCompaction(textCompactionData, byteCompactionData, length, result) {\n // Beginning from an initial state of the Alpha sub-mode\n // The default compaction mode for PDF417 in effect at the start of each symbol shall always be Text\n // Compaction mode Alpha sub-mode (alphabetic: uppercase). A latch codeword from another mode to the Text\n // Compaction mode shall always switch to the Text Compaction Alpha sub-mode.\n let subMode = Mode$2.ALPHA;\n let priorToShiftMode = Mode$2.ALPHA;\n let i = 0;\n while (i < length) {\n let subModeCh = textCompactionData[i];\n let ch = /*char*/'';\n switch (subMode) {\n case Mode$2.ALPHA:\n // Alpha (alphabetic: uppercase)\n if (subModeCh < 26) {\n // Upper case Alpha Character\n // Note: 65 = 'A' ASCII -> there is byte code of symbol\n ch = /*(char)('A' + subModeCh) */String.fromCharCode(65 + subModeCh);\n } else {\n switch (subModeCh) {\n case 26:\n ch = ' ';\n break;\n case DecodedBitStreamParser$2.LL:\n subMode = Mode$2.LOWER;\n break;\n case DecodedBitStreamParser$2.ML:\n subMode = Mode$2.MIXED;\n break;\n case DecodedBitStreamParser$2.PS:\n // Shift to punctuation\n priorToShiftMode = subMode;\n subMode = Mode$2.PUNCT_SHIFT;\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n result.append( /*(char)*/byteCompactionData[i]);\n break;\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n subMode = Mode$2.ALPHA;\n break;\n }\n }\n break;\n case Mode$2.LOWER:\n // Lower (alphabetic: lowercase)\n if (subModeCh < 26) {\n ch = /*(char)('a' + subModeCh)*/String.fromCharCode(97 + subModeCh);\n } else {\n switch (subModeCh) {\n case 26:\n ch = ' ';\n break;\n case DecodedBitStreamParser$2.AS:\n // Shift to alpha\n priorToShiftMode = subMode;\n subMode = Mode$2.ALPHA_SHIFT;\n break;\n case DecodedBitStreamParser$2.ML:\n subMode = Mode$2.MIXED;\n break;\n case DecodedBitStreamParser$2.PS:\n // Shift to punctuation\n priorToShiftMode = subMode;\n subMode = Mode$2.PUNCT_SHIFT;\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n // TODO Does this need to use the current character encoding? See other occurrences below\n result.append( /*(char)*/byteCompactionData[i]);\n break;\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n subMode = Mode$2.ALPHA;\n break;\n }\n }\n break;\n case Mode$2.MIXED:\n // Mixed (punctuation: e)\n if (subModeCh < DecodedBitStreamParser$2.PL) {\n ch = DecodedBitStreamParser$2.MIXED_CHARS[subModeCh];\n } else {\n switch (subModeCh) {\n case DecodedBitStreamParser$2.PL:\n subMode = Mode$2.PUNCT;\n break;\n case 26:\n ch = ' ';\n break;\n case DecodedBitStreamParser$2.LL:\n subMode = Mode$2.LOWER;\n break;\n case DecodedBitStreamParser$2.AL:\n subMode = Mode$2.ALPHA;\n break;\n case DecodedBitStreamParser$2.PS:\n // Shift to punctuation\n priorToShiftMode = subMode;\n subMode = Mode$2.PUNCT_SHIFT;\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n result.append( /*(char)*/byteCompactionData[i]);\n break;\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n subMode = Mode$2.ALPHA;\n break;\n }\n }\n break;\n case Mode$2.PUNCT:\n // Punctuation\n if (subModeCh < DecodedBitStreamParser$2.PAL) {\n ch = DecodedBitStreamParser$2.PUNCT_CHARS[subModeCh];\n } else {\n switch (subModeCh) {\n case DecodedBitStreamParser$2.PAL:\n subMode = Mode$2.ALPHA;\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n result.append( /*(char)*/byteCompactionData[i]);\n break;\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n subMode = Mode$2.ALPHA;\n break;\n }\n }\n break;\n case Mode$2.ALPHA_SHIFT:\n // Restore sub-mode\n subMode = priorToShiftMode;\n if (subModeCh < 26) {\n ch = /*(char)('A' + subModeCh)*/String.fromCharCode(65 + subModeCh);\n } else {\n switch (subModeCh) {\n case 26:\n ch = ' ';\n break;\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n subMode = Mode$2.ALPHA;\n break;\n }\n }\n break;\n case Mode$2.PUNCT_SHIFT:\n // Restore sub-mode\n subMode = priorToShiftMode;\n if (subModeCh < DecodedBitStreamParser$2.PAL) {\n ch = DecodedBitStreamParser$2.PUNCT_CHARS[subModeCh];\n } else {\n switch (subModeCh) {\n case DecodedBitStreamParser$2.PAL:\n subMode = Mode$2.ALPHA;\n break;\n case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:\n // PS before Shift-to-Byte is used as a padding character,\n // see 5.4.2.4 of the specification\n result.append( /*(char)*/byteCompactionData[i]);\n break;\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n subMode = Mode$2.ALPHA;\n break;\n }\n }\n break;\n }\n // if (ch !== 0) {\n if (ch !== '') {\n // Append decoded character to result\n result.append(ch);\n }\n i++;\n }\n }\n /**\n * Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded.\n * This includes all ASCII characters value 0 to 127 inclusive and provides for international\n * character set support.\n *\n * @param mode The byte compaction mode i.e. 901 or 924\n * @param codewords The array of codewords (data + error)\n * @param encoding Currently active character encoding\n * @param codeIndex The current index into the codeword array.\n * @param result The decoded data is appended to the result.\n * @return The next index into the codeword array.\n */\n static /*int*/byteCompaction(mode, codewords, encoding, codeIndex, result) {\n let decodedBytes = new ByteArrayOutputStream();\n let count = 0;\n let value = /*long*/0;\n let end = false;\n switch (mode) {\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH:\n // Total number of Byte Compaction characters to be encoded\n // is not a multiple of 6\n let byteCompactedCodewords = new Int32Array(6);\n let nextCode = codewords[codeIndex++];\n while (codeIndex < codewords[0] && !end) {\n byteCompactedCodewords[count++] = nextCode;\n // Base 900\n value = 900 * value + nextCode;\n nextCode = codewords[codeIndex++];\n // perhaps it should be ok to check only nextCode >= TEXT_COMPACTION_MODE_LATCH\n switch (nextCode) {\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.NUMERIC_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_CONTROL_BLOCK:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:\n case DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR:\n codeIndex--;\n end = true;\n break;\n default:\n if (count % 5 === 0 && count > 0) {\n // Decode every 5 codewords\n // Convert to Base 256\n for (let j /*int*/ = 0; j < 6; ++j) {\n /* @note\n * JavaScript stores numbers as 64 bits floating point numbers, but all bitwise operations are performed on 32 bits binary numbers.\n * So the next bitwise operation could not be done with simple numbers\n */\n decodedBytes.write( /*(byte)*/Number(createBigInt(value) >> createBigInt(8 * (5 - j))));\n }\n value = 0;\n count = 0;\n }\n break;\n }\n }\n // if the end of all codewords is reached the last codeword needs to be added\n if (codeIndex === codewords[0] && nextCode < DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH) {\n byteCompactedCodewords[count++] = nextCode;\n }\n // If Byte Compaction mode is invoked with codeword 901,\n // the last group of codewords is interpreted directly\n // as one byte per codeword, without compaction.\n for (let i /*int*/ = 0; i < count; i++) {\n decodedBytes.write( /*(byte)*/byteCompactedCodewords[i]);\n }\n break;\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6:\n // Total number of Byte Compaction characters to be encoded\n // is an integer multiple of 6\n while (codeIndex < codewords[0] && !end) {\n let code = codewords[codeIndex++];\n if (code < DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH) {\n count++;\n // Base 900\n value = 900 * value + code;\n } else {\n switch (code) {\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.NUMERIC_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_CONTROL_BLOCK:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:\n case DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR:\n codeIndex--;\n end = true;\n break;\n }\n }\n if (count % 5 === 0 && count > 0) {\n // Decode every 5 codewords\n // Convert to Base 256\n /* @note\n * JavaScript stores numbers as 64 bits floating point numbers, but all bitwise operations are performed on 32 bits binary numbers.\n * So the next bitwise operation could not be done with simple numbers\n */\n for (let j /*int*/ = 0; j < 6; ++j) {\n decodedBytes.write( /*(byte)*/Number(createBigInt(value) >> createBigInt(8 * (5 - j))));\n }\n value = 0;\n count = 0;\n }\n }\n break;\n }\n result.append(StringEncoding.decode(decodedBytes.toByteArray(), encoding));\n return codeIndex;\n }\n /**\n * Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings.\n *\n * @param codewords The array of codewords (data + error)\n * @param codeIndex The current index into the codeword array.\n * @param result The decoded data is appended to the result.\n * @return The next index into the codeword array.\n *\n * @throws FormatException\n */\n static numericCompaction(codewords, codeIndex /*int*/, result) {\n let count = 0;\n let end = false;\n let numericCodewords = new Int32Array(DecodedBitStreamParser$2.MAX_NUMERIC_CODEWORDS);\n while (codeIndex < codewords[0] && !end) {\n let code = codewords[codeIndex++];\n if (codeIndex === codewords[0]) {\n end = true;\n }\n if (code < DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH) {\n numericCodewords[count] = code;\n count++;\n } else {\n switch (code) {\n case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH:\n case DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_CONTROL_BLOCK:\n case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:\n case DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR:\n codeIndex--;\n end = true;\n break;\n }\n }\n if ((count % DecodedBitStreamParser$2.MAX_NUMERIC_CODEWORDS === 0 || code === DecodedBitStreamParser$2.NUMERIC_COMPACTION_MODE_LATCH || end) && count > 0) {\n // Re-invoking Numeric Compaction mode (by using codeword 902\n // while in Numeric Compaction mode) serves to terminate the\n // current Numeric Compaction mode grouping as described in 5.4.4.2,\n // and then to start a new one grouping.\n result.append(DecodedBitStreamParser$2.decodeBase900toBase10(numericCodewords, count));\n count = 0;\n }\n }\n return codeIndex;\n }\n /**\n * Convert a list of Numeric Compacted codewords from Base 900 to Base 10.\n *\n * @param codewords The array of codewords\n * @param count The number of codewords\n * @return The decoded string representing the Numeric data.\n *\n * EXAMPLE\n * Encode the fifteen digit numeric string 000213298174000\n * Prefix the numeric string with a 1 and set the initial value of\n * t = 1 000 213 298 174 000\n * Calculate codeword 0\n * d0 = 1 000 213 298 174 000 mod 900 = 200\n *\n * t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082\n * Calculate codeword 1\n * d1 = 1 111 348 109 082 mod 900 = 282\n *\n * t = 1 111 348 109 082 div 900 = 1 234 831 232\n * Calculate codeword 2\n * d2 = 1 234 831 232 mod 900 = 632\n *\n * t = 1 234 831 232 div 900 = 1 372 034\n * Calculate codeword 3\n * d3 = 1 372 034 mod 900 = 434\n *\n * t = 1 372 034 div 900 = 1 524\n * Calculate codeword 4\n * d4 = 1 524 mod 900 = 624\n *\n * t = 1 524 div 900 = 1\n * Calculate codeword 5\n * d5 = 1 mod 900 = 1\n * t = 1 div 900 = 0\n * Codeword sequence is: 1, 624, 434, 632, 282, 200\n *\n * Decode the above codewords involves\n * 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 +\n * 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000\n *\n * Remove leading 1 => Result is 000213298174000\n *\n * @throws FormatException\n */\n static decodeBase900toBase10(codewords, count) {\n let result = createBigInt(0);\n for (let i /*int*/ = 0; i < count; i++) {\n result += DecodedBitStreamParser$2.EXP900[count - i - 1] * createBigInt(codewords[i]);\n }\n let resultString = result.toString();\n if (resultString.charAt(0) !== '1') {\n throw new FormatException();\n }\n return resultString.substring(1);\n }\n }\n DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH = 900;\n DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH = 901;\n DecodedBitStreamParser$2.NUMERIC_COMPACTION_MODE_LATCH = 902;\n DecodedBitStreamParser$2.BYTE_COMPACTION_MODE_LATCH_6 = 924;\n DecodedBitStreamParser$2.ECI_USER_DEFINED = 925;\n DecodedBitStreamParser$2.ECI_GENERAL_PURPOSE = 926;\n DecodedBitStreamParser$2.ECI_CHARSET = 927;\n DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_CONTROL_BLOCK = 928;\n DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD = 923;\n DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR = 922;\n DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE = 913;\n DecodedBitStreamParser$2.MAX_NUMERIC_CODEWORDS = 15;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME = 0;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT = 1;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP = 2;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_SENDER = 3;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE = 4;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE = 5;\n DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM = 6;\n DecodedBitStreamParser$2.PL = 25;\n DecodedBitStreamParser$2.LL = 27;\n DecodedBitStreamParser$2.AS = 27;\n DecodedBitStreamParser$2.ML = 28;\n DecodedBitStreamParser$2.AL = 28;\n DecodedBitStreamParser$2.PS = 29;\n DecodedBitStreamParser$2.PAL = 29;\n DecodedBitStreamParser$2.PUNCT_CHARS = ';<>@[\\\\]_`~!\\r\\t,:\\n-.$/\"|*()?{}\\'';\n DecodedBitStreamParser$2.MIXED_CHARS = '0123456789&\\r\\t,:#-.$/+%*=^';\n /**\n * Table containing values for the exponent of 900.\n * This is used in the numeric compaction decode algorithm.\n */\n DecodedBitStreamParser$2.EXP900 = getBigIntConstructor() ? getEXP900() : [];\n DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS = 2;\n\n /*\n * Copyright 2013 ZXing authors\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 // import java.util.ArrayList;\n // import java.util.Collection;\n // import java.util.Formatter;\n // import java.util.List;\n /**\n * @author Guenther Grau\n */\n /*public final*/\n class PDF417ScanningDecoder {\n constructor() {}\n /**\n * @TODO don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern\n *\n * columns. That way width can be deducted from the pattern column.\n * This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider\n * than it should be. This can happen if the scanner used a bad blackpoint.\n *\n * @param BitMatrix\n * @param image\n * @param ResultPoint\n * @param imageTopLeft\n * @param ResultPoint\n * @param imageBottomLeft\n * @param ResultPoint\n * @param imageTopRight\n * @param ResultPoint\n * @param imageBottomRight\n * @param int\n * @param minCodewordWidth\n * @param int\n * @param maxCodewordWidth\n *\n * @throws NotFoundException\n * @throws FormatException\n * @throws ChecksumException\n */\n static decode(image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth, maxCodewordWidth) {\n let boundingBox = new BoundingBox(image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight);\n let leftRowIndicatorColumn = null;\n let rightRowIndicatorColumn = null;\n let detectionResult;\n for (let firstPass /*boolean*/ = true;; firstPass = false) {\n if (imageTopLeft != null) {\n leftRowIndicatorColumn = PDF417ScanningDecoder.getRowIndicatorColumn(image, boundingBox, imageTopLeft, true, minCodewordWidth, maxCodewordWidth);\n }\n if (imageTopRight != null) {\n rightRowIndicatorColumn = PDF417ScanningDecoder.getRowIndicatorColumn(image, boundingBox, imageTopRight, false, minCodewordWidth, maxCodewordWidth);\n }\n detectionResult = PDF417ScanningDecoder.merge(leftRowIndicatorColumn, rightRowIndicatorColumn);\n if (detectionResult == null) {\n throw NotFoundException.getNotFoundInstance();\n }\n let resultBox = detectionResult.getBoundingBox();\n if (firstPass && resultBox != null && (resultBox.getMinY() < boundingBox.getMinY() || resultBox.getMaxY() > boundingBox.getMaxY())) {\n boundingBox = resultBox;\n } else {\n break;\n }\n }\n detectionResult.setBoundingBox(boundingBox);\n let maxBarcodeColumn = detectionResult.getBarcodeColumnCount() + 1;\n detectionResult.setDetectionResultColumn(0, leftRowIndicatorColumn);\n detectionResult.setDetectionResultColumn(maxBarcodeColumn, rightRowIndicatorColumn);\n let leftToRight = leftRowIndicatorColumn != null;\n for (let barcodeColumnCount /*int*/ = 1; barcodeColumnCount <= maxBarcodeColumn; barcodeColumnCount++) {\n let barcodeColumn = leftToRight ? barcodeColumnCount : maxBarcodeColumn - barcodeColumnCount;\n if (detectionResult.getDetectionResultColumn(barcodeColumn) !== /* null */undefined) {\n // This will be the case for the opposite row indicator column, which doesn't need to be decoded again.\n continue;\n }\n let detectionResultColumn;\n if (barcodeColumn === 0 || barcodeColumn === maxBarcodeColumn) {\n detectionResultColumn = new DetectionResultRowIndicatorColumn(boundingBox, barcodeColumn === 0);\n } else {\n detectionResultColumn = new DetectionResultColumn(boundingBox);\n }\n detectionResult.setDetectionResultColumn(barcodeColumn, detectionResultColumn);\n let startColumn = -1;\n let previousStartColumn = startColumn;\n // TODO start at a row for which we know the start position, then detect upwards and downwards from there.\n for (let imageRow /*int*/ = boundingBox.getMinY(); imageRow <= boundingBox.getMaxY(); imageRow++) {\n startColumn = PDF417ScanningDecoder.getStartColumn(detectionResult, barcodeColumn, imageRow, leftToRight);\n if (startColumn < 0 || startColumn > boundingBox.getMaxX()) {\n if (previousStartColumn === -1) {\n continue;\n }\n startColumn = previousStartColumn;\n }\n let codeword = PDF417ScanningDecoder.detectCodeword(image, boundingBox.getMinX(), boundingBox.getMaxX(), leftToRight, startColumn, imageRow, minCodewordWidth, maxCodewordWidth);\n if (codeword != null) {\n detectionResultColumn.setCodeword(imageRow, codeword);\n previousStartColumn = startColumn;\n minCodewordWidth = Math.min(minCodewordWidth, codeword.getWidth());\n maxCodewordWidth = Math.max(maxCodewordWidth, codeword.getWidth());\n }\n }\n }\n return PDF417ScanningDecoder.createDecoderResult(detectionResult);\n }\n /**\n *\n * @param leftRowIndicatorColumn\n * @param rightRowIndicatorColumn\n *\n * @throws NotFoundException\n */\n static merge(leftRowIndicatorColumn, rightRowIndicatorColumn) {\n if (leftRowIndicatorColumn == null && rightRowIndicatorColumn == null) {\n return null;\n }\n let barcodeMetadata = PDF417ScanningDecoder.getBarcodeMetadata(leftRowIndicatorColumn, rightRowIndicatorColumn);\n if (barcodeMetadata == null) {\n return null;\n }\n let boundingBox = BoundingBox.merge(PDF417ScanningDecoder.adjustBoundingBox(leftRowIndicatorColumn), PDF417ScanningDecoder.adjustBoundingBox(rightRowIndicatorColumn));\n return new DetectionResult(barcodeMetadata, boundingBox);\n }\n /**\n *\n * @param rowIndicatorColumn\n *\n * @throws NotFoundException\n */\n static adjustBoundingBox(rowIndicatorColumn) {\n if (rowIndicatorColumn == null) {\n return null;\n }\n let rowHeights = rowIndicatorColumn.getRowHeights();\n if (rowHeights == null) {\n return null;\n }\n let maxRowHeight = PDF417ScanningDecoder.getMax(rowHeights);\n let missingStartRows = 0;\n for (let rowHeight /*int*/ of rowHeights) {\n missingStartRows += maxRowHeight - rowHeight;\n if (rowHeight > 0) {\n break;\n }\n }\n let codewords = rowIndicatorColumn.getCodewords();\n for (let row /*int*/ = 0; missingStartRows > 0 && codewords[row] == null; row++) {\n missingStartRows--;\n }\n let missingEndRows = 0;\n for (let row /*int*/ = rowHeights.length - 1; row >= 0; row--) {\n missingEndRows += maxRowHeight - rowHeights[row];\n if (rowHeights[row] > 0) {\n break;\n }\n }\n for (let row /*int*/ = codewords.length - 1; missingEndRows > 0 && codewords[row] == null; row--) {\n missingEndRows--;\n }\n return rowIndicatorColumn.getBoundingBox().addMissingRows(missingStartRows, missingEndRows, rowIndicatorColumn.isLeft());\n }\n static getMax(values) {\n let maxValue = -1;\n for (let value /*int*/ of values) {\n maxValue = Math.max(maxValue, value);\n }\n return maxValue;\n }\n static getBarcodeMetadata(leftRowIndicatorColumn, rightRowIndicatorColumn) {\n let leftBarcodeMetadata;\n if (leftRowIndicatorColumn == null || (leftBarcodeMetadata = leftRowIndicatorColumn.getBarcodeMetadata()) == null) {\n return rightRowIndicatorColumn == null ? null : rightRowIndicatorColumn.getBarcodeMetadata();\n }\n let rightBarcodeMetadata;\n if (rightRowIndicatorColumn == null || (rightBarcodeMetadata = rightRowIndicatorColumn.getBarcodeMetadata()) == null) {\n return leftBarcodeMetadata;\n }\n if (leftBarcodeMetadata.getColumnCount() !== rightBarcodeMetadata.getColumnCount() && leftBarcodeMetadata.getErrorCorrectionLevel() !== rightBarcodeMetadata.getErrorCorrectionLevel() && leftBarcodeMetadata.getRowCount() !== rightBarcodeMetadata.getRowCount()) {\n return null;\n }\n return leftBarcodeMetadata;\n }\n static getRowIndicatorColumn(image, boundingBox, startPoint, leftToRight, minCodewordWidth, maxCodewordWidth) {\n let rowIndicatorColumn = new DetectionResultRowIndicatorColumn(boundingBox, leftToRight);\n for (let i /*int*/ = 0; i < 2; i++) {\n let increment = i === 0 ? 1 : -1;\n let startColumn = Math.trunc(Math.trunc(startPoint.getX()));\n for (let imageRow /*int*/ = Math.trunc(Math.trunc(startPoint.getY())); imageRow <= boundingBox.getMaxY() && imageRow >= boundingBox.getMinY(); imageRow += increment) {\n let codeword = PDF417ScanningDecoder.detectCodeword(image, 0, image.getWidth(), leftToRight, startColumn, imageRow, minCodewordWidth, maxCodewordWidth);\n if (codeword != null) {\n rowIndicatorColumn.setCodeword(imageRow, codeword);\n if (leftToRight) {\n startColumn = codeword.getStartX();\n } else {\n startColumn = codeword.getEndX();\n }\n }\n }\n }\n return rowIndicatorColumn;\n }\n /**\n *\n * @param detectionResult\n * @param BarcodeValue\n * @param param2\n * @param param3\n * @param barcodeMatrix\n *\n * @throws NotFoundException\n */\n static adjustCodewordCount(detectionResult, barcodeMatrix) {\n let barcodeMatrix01 = barcodeMatrix[0][1];\n let numberOfCodewords = barcodeMatrix01.getValue();\n let calculatedNumberOfCodewords = detectionResult.getBarcodeColumnCount() * detectionResult.getBarcodeRowCount() - PDF417ScanningDecoder.getNumberOfECCodeWords(detectionResult.getBarcodeECLevel());\n if (numberOfCodewords.length === 0) {\n if (calculatedNumberOfCodewords < 1 || calculatedNumberOfCodewords > PDF417Common.MAX_CODEWORDS_IN_BARCODE) {\n throw NotFoundException.getNotFoundInstance();\n }\n barcodeMatrix01.setValue(calculatedNumberOfCodewords);\n } else if (numberOfCodewords[0] !== calculatedNumberOfCodewords) {\n // The calculated one is more reliable as it is derived from the row indicator columns\n barcodeMatrix01.setValue(calculatedNumberOfCodewords);\n }\n }\n /**\n *\n * @param detectionResult\n *\n * @throws FormatException\n * @throws ChecksumException\n * @throws NotFoundException\n */\n static createDecoderResult(detectionResult) {\n let barcodeMatrix = PDF417ScanningDecoder.createBarcodeMatrix(detectionResult);\n PDF417ScanningDecoder.adjustCodewordCount(detectionResult, barcodeMatrix);\n let erasures /*Collection*/ = new Array();\n let codewords = new Int32Array(detectionResult.getBarcodeRowCount() * detectionResult.getBarcodeColumnCount());\n let ambiguousIndexValuesList = /*List*/[];\n let ambiguousIndexesList = /*Collection*/new Array();\n for (let row /*int*/ = 0; row < detectionResult.getBarcodeRowCount(); row++) {\n for (let column /*int*/ = 0; column < detectionResult.getBarcodeColumnCount(); column++) {\n let values = barcodeMatrix[row][column + 1].getValue();\n let codewordIndex = row * detectionResult.getBarcodeColumnCount() + column;\n if (values.length === 0) {\n erasures.push(codewordIndex);\n } else if (values.length === 1) {\n codewords[codewordIndex] = values[0];\n } else {\n ambiguousIndexesList.push(codewordIndex);\n ambiguousIndexValuesList.push(values);\n }\n }\n }\n let ambiguousIndexValues = new Array(ambiguousIndexValuesList.length);\n for (let i /*int*/ = 0; i < ambiguousIndexValues.length; i++) {\n ambiguousIndexValues[i] = ambiguousIndexValuesList[i];\n }\n return PDF417ScanningDecoder.createDecoderResultFromAmbiguousValues(detectionResult.getBarcodeECLevel(), codewords, PDF417Common.toIntArray(erasures), PDF417Common.toIntArray(ambiguousIndexesList), ambiguousIndexValues);\n }\n /**\n * This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The\n * current error correction implementation doesn't deal with erasures very well, so it's better to provide a value\n * for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of\n * the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the\n * ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes,\n * so decoding the normal barcodes is not affected by this.\n *\n * @param erasureArray contains the indexes of erasures\n * @param ambiguousIndexes array with the indexes that have more than one most likely value\n * @param ambiguousIndexValues two dimensional array that contains the ambiguous values. The first dimension must\n * be the same length as the ambiguousIndexes array\n *\n * @throws FormatException\n * @throws ChecksumException\n */\n static createDecoderResultFromAmbiguousValues(ecLevel, codewords, erasureArray, ambiguousIndexes, ambiguousIndexValues) {\n let ambiguousIndexCount = new Int32Array(ambiguousIndexes.length);\n let tries = 100;\n while (tries-- > 0) {\n for (let i /*int*/ = 0; i < ambiguousIndexCount.length; i++) {\n codewords[ambiguousIndexes[i]] = ambiguousIndexValues[i][ambiguousIndexCount[i]];\n }\n try {\n return PDF417ScanningDecoder.decodeCodewords(codewords, ecLevel, erasureArray);\n } catch (err) {\n let ignored = err instanceof ChecksumException;\n if (!ignored) {\n throw err;\n }\n }\n if (ambiguousIndexCount.length === 0) {\n throw ChecksumException.getChecksumInstance();\n }\n for (let i /*int*/ = 0; i < ambiguousIndexCount.length; i++) {\n if (ambiguousIndexCount[i] < ambiguousIndexValues[i].length - 1) {\n ambiguousIndexCount[i]++;\n break;\n } else {\n ambiguousIndexCount[i] = 0;\n if (i === ambiguousIndexCount.length - 1) {\n throw ChecksumException.getChecksumInstance();\n }\n }\n }\n }\n throw ChecksumException.getChecksumInstance();\n }\n static createBarcodeMatrix(detectionResult) {\n // let barcodeMatrix: BarcodeValue[][] =\n // new BarcodeValue[detectionResult.getBarcodeRowCount()][detectionResult.getBarcodeColumnCount() + 2];\n let barcodeMatrix = Array.from({\n length: detectionResult.getBarcodeRowCount()\n }, () => new Array(detectionResult.getBarcodeColumnCount() + 2));\n for (let row /*int*/ = 0; row < barcodeMatrix.length; row++) {\n for (let column /*int*/ = 0; column < barcodeMatrix[row].length; column++) {\n barcodeMatrix[row][column] = new BarcodeValue();\n }\n }\n let column = 0;\n for (let detectionResultColumn /*DetectionResultColumn*/ of detectionResult.getDetectionResultColumns()) {\n if (detectionResultColumn != null) {\n for (let codeword /*Codeword*/ of detectionResultColumn.getCodewords()) {\n if (codeword != null) {\n let rowNumber = codeword.getRowNumber();\n if (rowNumber >= 0) {\n if (rowNumber >= barcodeMatrix.length) {\n // We have more rows than the barcode metadata allows for, ignore them.\n continue;\n }\n barcodeMatrix[rowNumber][column].setValue(codeword.getValue());\n }\n }\n }\n }\n column++;\n }\n return barcodeMatrix;\n }\n static isValidBarcodeColumn(detectionResult, barcodeColumn) {\n return barcodeColumn >= 0 && barcodeColumn <= detectionResult.getBarcodeColumnCount() + 1;\n }\n static getStartColumn(detectionResult, barcodeColumn, imageRow, leftToRight) {\n let offset = leftToRight ? 1 : -1;\n let codeword = null;\n if (PDF417ScanningDecoder.isValidBarcodeColumn(detectionResult, barcodeColumn - offset)) {\n codeword = detectionResult.getDetectionResultColumn(barcodeColumn - offset).getCodeword(imageRow);\n }\n if (codeword != null) {\n return leftToRight ? codeword.getEndX() : codeword.getStartX();\n }\n codeword = detectionResult.getDetectionResultColumn(barcodeColumn).getCodewordNearby(imageRow);\n if (codeword != null) {\n return leftToRight ? codeword.getStartX() : codeword.getEndX();\n }\n if (PDF417ScanningDecoder.isValidBarcodeColumn(detectionResult, barcodeColumn - offset)) {\n codeword = detectionResult.getDetectionResultColumn(barcodeColumn - offset).getCodewordNearby(imageRow);\n }\n if (codeword != null) {\n return leftToRight ? codeword.getEndX() : codeword.getStartX();\n }\n let skippedColumns = 0;\n while (PDF417ScanningDecoder.isValidBarcodeColumn(detectionResult, barcodeColumn - offset)) {\n barcodeColumn -= offset;\n for (let previousRowCodeword /*Codeword*/ of detectionResult.getDetectionResultColumn(barcodeColumn).getCodewords()) {\n if (previousRowCodeword != null) {\n return (leftToRight ? previousRowCodeword.getEndX() : previousRowCodeword.getStartX()) + offset * skippedColumns * (previousRowCodeword.getEndX() - previousRowCodeword.getStartX());\n }\n }\n skippedColumns++;\n }\n return leftToRight ? detectionResult.getBoundingBox().getMinX() : detectionResult.getBoundingBox().getMaxX();\n }\n static detectCodeword(image, minColumn, maxColumn, leftToRight, startColumn, imageRow, minCodewordWidth, maxCodewordWidth) {\n startColumn = PDF417ScanningDecoder.adjustCodewordStartColumn(image, minColumn, maxColumn, leftToRight, startColumn, imageRow);\n // we usually know fairly exact now how long a codeword is. We should provide minimum and maximum expected length\n // and try to adjust the read pixels, e.g. remove single pixel errors or try to cut off exceeding pixels.\n // min and maxCodewordWidth should not be used as they are calculated for the whole barcode an can be inaccurate\n // for the current position\n let moduleBitCount = PDF417ScanningDecoder.getModuleBitCount(image, minColumn, maxColumn, leftToRight, startColumn, imageRow);\n if (moduleBitCount == null) {\n return null;\n }\n let endColumn;\n let codewordBitCount = MathUtils.sum(moduleBitCount);\n if (leftToRight) {\n endColumn = startColumn + codewordBitCount;\n } else {\n for (let i /*int*/ = 0; i < moduleBitCount.length / 2; i++) {\n let tmpCount = moduleBitCount[i];\n moduleBitCount[i] = moduleBitCount[moduleBitCount.length - 1 - i];\n moduleBitCount[moduleBitCount.length - 1 - i] = tmpCount;\n }\n endColumn = startColumn;\n startColumn = endColumn - codewordBitCount;\n }\n // TODO implement check for width and correction of black and white bars\n // use start (and maybe stop pattern) to determine if black bars are wider than white bars. If so, adjust.\n // should probably done only for codewords with a lot more than 17 bits.\n // The following fixes 10-1.png, which has wide black bars and small white bars\n // for (let i /*int*/ = 0; i < moduleBitCount.length; i++) {\n // if (i % 2 === 0) {\n // moduleBitCount[i]--;\n // } else {\n // moduleBitCount[i]++;\n // }\n // }\n // We could also use the width of surrounding codewords for more accurate results, but this seems\n // sufficient for now\n if (!PDF417ScanningDecoder.checkCodewordSkew(codewordBitCount, minCodewordWidth, maxCodewordWidth)) {\n // We could try to use the startX and endX position of the codeword in the same column in the previous row,\n // create the bit count from it and normalize it to 8. This would help with single pixel errors.\n return null;\n }\n let decodedValue = PDF417CodewordDecoder.getDecodedValue(moduleBitCount);\n let codeword = PDF417Common.getCodeword(decodedValue);\n if (codeword === -1) {\n return null;\n }\n return new Codeword(startColumn, endColumn, PDF417ScanningDecoder.getCodewordBucketNumber(decodedValue), codeword);\n }\n static getModuleBitCount(image, minColumn, maxColumn, leftToRight, startColumn, imageRow) {\n let imageColumn = startColumn;\n let moduleBitCount = new Int32Array(8);\n let moduleNumber = 0;\n let increment = leftToRight ? 1 : -1;\n let previousPixelValue = leftToRight;\n while ((leftToRight ? imageColumn < maxColumn : imageColumn >= minColumn) && moduleNumber < moduleBitCount.length) {\n if (image.get(imageColumn, imageRow) === previousPixelValue) {\n moduleBitCount[moduleNumber]++;\n imageColumn += increment;\n } else {\n moduleNumber++;\n previousPixelValue = !previousPixelValue;\n }\n }\n if (moduleNumber === moduleBitCount.length || imageColumn === (leftToRight ? maxColumn : minColumn) && moduleNumber === moduleBitCount.length - 1) {\n return moduleBitCount;\n }\n return null;\n }\n static getNumberOfECCodeWords(barcodeECLevel) {\n return 2 << barcodeECLevel;\n }\n static adjustCodewordStartColumn(image, minColumn, maxColumn, leftToRight, codewordStartColumn, imageRow) {\n let correctedStartColumn = codewordStartColumn;\n let increment = leftToRight ? -1 : 1;\n // there should be no black pixels before the start column. If there are, then we need to start earlier.\n for (let i /*int*/ = 0; i < 2; i++) {\n while ((leftToRight ? correctedStartColumn >= minColumn : correctedStartColumn < maxColumn) && leftToRight === image.get(correctedStartColumn, imageRow)) {\n if (Math.abs(codewordStartColumn - correctedStartColumn) > PDF417ScanningDecoder.CODEWORD_SKEW_SIZE) {\n return codewordStartColumn;\n }\n correctedStartColumn += increment;\n }\n increment = -increment;\n leftToRight = !leftToRight;\n }\n return correctedStartColumn;\n }\n static checkCodewordSkew(codewordSize, minCodewordWidth, maxCodewordWidth) {\n return minCodewordWidth - PDF417ScanningDecoder.CODEWORD_SKEW_SIZE <= codewordSize && codewordSize <= maxCodewordWidth + PDF417ScanningDecoder.CODEWORD_SKEW_SIZE;\n }\n /**\n * @throws FormatException,\n * @throws ChecksumException\n */\n static decodeCodewords(codewords, ecLevel, erasures) {\n if (codewords.length === 0) {\n throw FormatException.getFormatInstance();\n }\n let numECCodewords = 1 << ecLevel + 1;\n let correctedErrorsCount = PDF417ScanningDecoder.correctErrors(codewords, erasures, numECCodewords);\n PDF417ScanningDecoder.verifyCodewordCount(codewords, numECCodewords);\n // Decode the codewords\n let decoderResult = DecodedBitStreamParser$2.decode(codewords, '' + ecLevel);\n decoderResult.setErrorsCorrected(correctedErrorsCount);\n decoderResult.setErasures(erasures.length);\n return decoderResult;\n }\n /**\n * Given data and error-correction codewords received, possibly corrupted by errors, attempts to\n * correct the errors in-place.
\n *\n * @param codewords data and error correction codewords\n * @param erasures positions of any known erasures\n * @param numECCodewords number of error correction codewords that are available in codewords\n * @throws ChecksumException if error correction fails\n */\n static correctErrors(codewords, erasures, numECCodewords) {\n if (erasures != null && erasures.length > numECCodewords / 2 + PDF417ScanningDecoder.MAX_ERRORS || numECCodewords < 0 || numECCodewords > PDF417ScanningDecoder.MAX_EC_CODEWORDS) {\n // Too many errors or EC Codewords is corrupted\n throw ChecksumException.getChecksumInstance();\n }\n return PDF417ScanningDecoder.errorCorrection.decode(codewords, numECCodewords, erasures);\n }\n /**\n * Verify that all is OK with the codeword array.\n * @throws FormatException\n */\n static verifyCodewordCount(codewords, numECCodewords) {\n if (codewords.length < 4) {\n // Codeword array size should be at least 4 allowing for\n // Count CW, At least one Data CW, Error Correction CW, Error Correction CW\n throw FormatException.getFormatInstance();\n }\n // The first codeword, the Symbol Length Descriptor, shall always encode the total number of data\n // codewords in the symbol, including the Symbol Length Descriptor itself, data codewords and pad\n // codewords, but excluding the number of error correction codewords.\n let numberOfCodewords = codewords[0];\n if (numberOfCodewords > codewords.length) {\n throw FormatException.getFormatInstance();\n }\n if (numberOfCodewords === 0) {\n // Reset to the length of the array - 8 (Allow for at least level 3 Error Correction (8 Error Codewords)\n if (numECCodewords < codewords.length) {\n codewords[0] = codewords.length - numECCodewords;\n } else {\n throw FormatException.getFormatInstance();\n }\n }\n }\n static getBitCountForCodeword(codeword) {\n let result = new Int32Array(8);\n let previousValue = 0;\n let i = result.length - 1;\n while (true) {\n if ((codeword & 0x1) !== previousValue) {\n previousValue = codeword & 0x1;\n i--;\n if (i < 0) {\n break;\n }\n }\n result[i]++;\n codeword >>= 1;\n }\n return result;\n }\n static getCodewordBucketNumber(codeword) {\n if (codeword instanceof Int32Array) {\n return this.getCodewordBucketNumber_Int32Array(codeword);\n }\n return this.getCodewordBucketNumber_number(codeword);\n }\n static getCodewordBucketNumber_number(codeword) {\n return PDF417ScanningDecoder.getCodewordBucketNumber(PDF417ScanningDecoder.getBitCountForCodeword(codeword));\n }\n static getCodewordBucketNumber_Int32Array(moduleBitCount) {\n return (moduleBitCount[0] - moduleBitCount[2] + moduleBitCount[4] - moduleBitCount[6] + 9) % 9;\n }\n static toString(barcodeMatrix) {\n let formatter = new Formatter();\n // try (let formatter = new Formatter()) {\n for (let row /*int*/ = 0; row < barcodeMatrix.length; row++) {\n formatter.format('Row %2d: ', row);\n for (let column /*int*/ = 0; column < barcodeMatrix[row].length; column++) {\n let barcodeValue = barcodeMatrix[row][column];\n if (barcodeValue.getValue().length === 0) {\n formatter.format(' ', null);\n } else {\n formatter.format('%4d(%2d)', barcodeValue.getValue()[0], barcodeValue.getConfidence(barcodeValue.getValue()[0]));\n }\n }\n formatter.format('%n');\n }\n return formatter.toString();\n // }\n }\n }\n /*final*/\n PDF417ScanningDecoder.CODEWORD_SKEW_SIZE = 2;\n /*final*/\n PDF417ScanningDecoder.MAX_ERRORS = 3;\n /*final*/\n PDF417ScanningDecoder.MAX_EC_CODEWORDS = 512;\n /*final*/\n PDF417ScanningDecoder.errorCorrection = new ErrorCorrection();\n\n /*\n * Copyright 2009 ZXing authors\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 // import java.util.ArrayList;\n // import java.util.List;\n // import java.util.Map;\n /**\n * This implementation can detect and decode PDF417 codes in an image.\n *\n * @author Guenther Grau\n */\n /*public final*/\n class PDF417Reader {\n // private static /*final Result[]*/ EMPTY_RESULT_ARRAY: Result[] = new Result([0]);\n /**\n * Locates and decodes a PDF417 code in an image.\n *\n * @return a String representing the content encoded by the PDF417 code\n * @throws NotFoundException if a PDF417 code cannot be found,\n * @throws FormatException if a PDF417 cannot be decoded\n * @throws ChecksumException\n */\n // @Override\n decode(image, hints = null) {\n let result = PDF417Reader.decode(image, hints, false);\n if (result == null || result.length === 0 || result[0] == null) {\n throw NotFoundException.getNotFoundInstance();\n }\n return result[0];\n }\n /**\n *\n * @param BinaryBitmap\n * @param image\n * @throws NotFoundException\n */\n // @Override\n decodeMultiple(image, hints = null) {\n try {\n return PDF417Reader.decode(image, hints, true);\n } catch (ignored) {\n if (ignored instanceof FormatException || ignored instanceof ChecksumException) {\n throw NotFoundException.getNotFoundInstance();\n }\n throw ignored;\n }\n }\n /**\n *\n * @param image\n * @param hints\n * @param multiple\n *\n * @throws NotFoundException\n * @throws FormatExceptionß\n * @throws ChecksumException\n */\n static decode(image, hints, multiple) {\n const results = new Array();\n const detectorResult = Detector$3.detectMultiple(image, hints, multiple);\n for (const points of detectorResult.getPoints()) {\n const decoderResult = PDF417ScanningDecoder.decode(detectorResult.getBits(), points[4], points[5], points[6], points[7], PDF417Reader.getMinCodewordWidth(points), PDF417Reader.getMaxCodewordWidth(points));\n const result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), undefined, points, BarcodeFormat$1.PDF_417);\n result.putMetadata(ResultMetadataType$1.ERROR_CORRECTION_LEVEL, decoderResult.getECLevel());\n const pdf417ResultMetadata = decoderResult.getOther();\n if (pdf417ResultMetadata != null) {\n result.putMetadata(ResultMetadataType$1.PDF417_EXTRA_METADATA, pdf417ResultMetadata);\n }\n results.push(result);\n }\n return results.map(x => x);\n }\n static getMaxWidth(p1, p2) {\n if (p1 == null || p2 == null) {\n return 0;\n }\n return Math.trunc(Math.abs(p1.getX() - p2.getX()));\n }\n static getMinWidth(p1, p2) {\n if (p1 == null || p2 == null) {\n return Integer.MAX_VALUE;\n }\n return Math.trunc(Math.abs(p1.getX() - p2.getX()));\n }\n static getMaxCodewordWidth(p) {\n return Math.floor(Math.max(Math.max(PDF417Reader.getMaxWidth(p[0], p[4]), PDF417Reader.getMaxWidth(p[6], p[2]) * PDF417Common.MODULES_IN_CODEWORD / PDF417Common.MODULES_IN_STOP_PATTERN), Math.max(PDF417Reader.getMaxWidth(p[1], p[5]), PDF417Reader.getMaxWidth(p[7], p[3]) * PDF417Common.MODULES_IN_CODEWORD / PDF417Common.MODULES_IN_STOP_PATTERN)));\n }\n static getMinCodewordWidth(p) {\n return Math.floor(Math.min(Math.min(PDF417Reader.getMinWidth(p[0], p[4]), PDF417Reader.getMinWidth(p[6], p[2]) * PDF417Common.MODULES_IN_CODEWORD / PDF417Common.MODULES_IN_STOP_PATTERN), Math.min(PDF417Reader.getMinWidth(p[1], p[5]), PDF417Reader.getMinWidth(p[7], p[3]) * PDF417Common.MODULES_IN_CODEWORD / PDF417Common.MODULES_IN_STOP_PATTERN)));\n }\n // @Override\n reset() {\n // nothing needs to be reset\n }\n }\n\n /**\n * Custom Error class of type Exception.\n */\n let ReaderException = /*#__PURE__*/(() => {\n class ReaderException extends Exception {}\n ReaderException.kind = 'ReaderException';\n\n /*\n * Copyright 2009 ZXing authors\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 /*namespace com.google.zxing {*/\n /**\n * MultiFormatReader is a convenience class and the main entry point into the library for most uses.\n * By default it attempts to decode all barcode formats that the library supports. Optionally, you\n * can provide a hints object to request different behavior, for example only decoding QR codes.\n *\n * @author Sean Owen\n * @author dswitkin@google.com (Daniel Switkin)\n */\n return ReaderException;\n })();\n class MultiFormatReader {\n /**\n * Creates an instance of this class\n * \n * @param {Boolean} verbose if 'true' logs will be dumped to console, otherwise hidden.\n * @param hints The hints to use, clearing the previous state.\n */\n constructor(verbose, hints) {\n this.verbose = verbose === true;\n if (hints) {\n this.setHints(hints);\n }\n }\n /**\n * This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it\n * passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly.\n * Use setHints() followed by decodeWithState() for continuous scan applications.\n *\n * @param image The pixel data to decode\n * @return The contents of the image\n *\n * @throws NotFoundException Any errors which occurred\n */\n /*@Override*/\n // public decode(image: BinaryBitmap): Result {\n // setHints(null)\n // return decodeInternal(image)\n // }\n /**\n * Decode an image using the hints provided. Does not honor existing state.\n *\n * @param image The pixel data to decode\n * @param hints The hints to use, clearing the previous state.\n * @return The contents of the image\n *\n * @throws NotFoundException Any errors which occurred\n */\n /*@Override*/\n decode(image, hints) {\n if (hints) {\n this.setHints(hints);\n }\n return this.decodeInternal(image);\n }\n /**\n * Decode an image using the state set up by calling setHints() previously. Continuous scan\n * clients will get a large speed increase by using this instead of decode().\n *\n * @param image The pixel data to decode\n * @return The contents of the image\n *\n * @throws NotFoundException Any errors which occurred\n */\n decodeWithState(image) {\n // Make sure to set up the default state so we don't crash\n if (this.readers === null || this.readers === undefined) {\n this.setHints(null);\n }\n return this.decodeInternal(image);\n }\n /**\n * This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls\n * to decodeWithState(image) can reuse the same set of readers without reallocating memory. This\n * is important for performance in continuous scan clients.\n *\n * @param hints The set of hints to use for subsequent calls to decode(image)\n */\n setHints(hints) {\n this.hints = hints;\n const tryHarder = !isNullOrUndefined(hints) && hints.get(DecodeHintType$1.TRY_HARDER) === true;\n const formats = isNullOrUndefined(hints) ? null : hints.get(DecodeHintType$1.POSSIBLE_FORMATS);\n const readers = new Array();\n if (!isNullOrUndefined(formats)) {\n const addOneDReader = formats.some(f => {\n return f === BarcodeFormat$1.UPC_A || f === BarcodeFormat$1.UPC_E || f === BarcodeFormat$1.EAN_13 || f === BarcodeFormat$1.EAN_8 || f === BarcodeFormat$1.CODABAR || f === BarcodeFormat$1.CODE_39 || f === BarcodeFormat$1.CODE_93 || f === BarcodeFormat$1.CODE_128 || f === BarcodeFormat$1.ITF || f === BarcodeFormat$1.RSS_14 || f === BarcodeFormat$1.RSS_EXPANDED;\n });\n // Put 1D readers upfront in \"normal\" mode\n if (addOneDReader && !tryHarder) {\n readers.push(new MultiFormatOneDReader(hints, this.verbose));\n }\n if (formats.includes(BarcodeFormat$1.QR_CODE)) {\n readers.push(new QRCodeReader());\n }\n if (formats.includes(BarcodeFormat$1.DATA_MATRIX)) {\n readers.push(new DataMatrixReader());\n }\n if (formats.includes(BarcodeFormat$1.AZTEC)) {\n readers.push(new AztecReader());\n }\n if (formats.includes(BarcodeFormat$1.PDF_417)) {\n readers.push(new PDF417Reader());\n }\n // if (formats.includes(BarcodeFormat.MAXICODE)) {\n // readers.push(new MaxiCodeReader())\n // }\n // At end in \"try harder\" mode\n if (addOneDReader && tryHarder) {\n readers.push(new MultiFormatOneDReader(hints, this.verbose));\n }\n }\n if (readers.length === 0) {\n if (!tryHarder) {\n readers.push(new MultiFormatOneDReader(hints, this.verbose));\n }\n readers.push(new QRCodeReader());\n readers.push(new DataMatrixReader());\n readers.push(new AztecReader());\n readers.push(new PDF417Reader());\n // readers.push(new MaxiCodeReader())\n if (tryHarder) {\n readers.push(new MultiFormatOneDReader(hints, this.verbose));\n }\n }\n this.readers = readers; // .toArray(new Reader[readers.size()])\n }\n /*@Override*/\n reset() {\n if (this.readers !== null) {\n for (const reader of this.readers) {\n reader.reset();\n }\n }\n }\n /**\n * @throws NotFoundException\n */\n decodeInternal(image) {\n if (this.readers === null) {\n throw new ReaderException('No readers where selected, nothing can be read.');\n }\n for (const reader of this.readers) {\n // Trying to decode with ${reader} reader.\n try {\n return reader.decode(image, this.hints);\n } catch (ex) {\n if (ex instanceof ReaderException) {\n continue;\n }\n // Bad Exception.\n }\n }\n\n throw new NotFoundException('No MultiFormat Readers were able to detect the code.');\n }\n }\n class BrowserMultiFormatReader extends BrowserCodeReader {\n constructor(hints = null, timeBetweenScansMillis = 500) {\n const reader = new MultiFormatReader();\n reader.setHints(hints);\n super(reader, timeBetweenScansMillis);\n }\n /**\n * Overwrite decodeBitmap to call decodeWithState, which will pay\n * attention to the hints set in the constructor function\n */\n decodeBitmap(binaryBitmap) {\n return this.reader.decodeWithState(binaryBitmap);\n }\n }\n\n /**\n * @deprecated Moving to @zxing/browser\n *\n * QR Code reader to use from browser.\n */\n class BrowserPDF417Reader extends BrowserCodeReader {\n /**\n * Creates an instance of BrowserPDF417Reader.\n * @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries\n */\n constructor(timeBetweenScansMillis = 500) {\n super(new PDF417Reader(), timeBetweenScansMillis);\n }\n }\n\n /**\n * @deprecated Moving to @zxing/browser\n *\n * QR Code reader to use from browser.\n */\n class BrowserQRCodeReader extends BrowserCodeReader {\n /**\n * Creates an instance of BrowserQRCodeReader.\n * @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries\n */\n constructor(timeBetweenScansMillis = 500) {\n super(new QRCodeReader(), timeBetweenScansMillis);\n }\n }\n\n /*\n * Copyright 2009 ZXing authors\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 /*namespace com.google.zxing {*/\n /**\n * These are a set of hints that you may pass to Writers to specify their behavior.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n */\n var EncodeHintType = /*#__PURE__*/function (EncodeHintType) {\n /**\n * Specifies what degree of error correction to use, for example in QR Codes.\n * Type depends on the encoder. For example for QR codes it's type\n * {@link com.google.zxing.qrcode.decoder.ErrorCorrectionLevel ErrorCorrectionLevel}.\n * For Aztec it is of type {@link Integer}, representing the minimal percentage of error correction words.\n * For PDF417 it is of type {@link Integer}, valid values being 0 to 8.\n * In all cases, it can also be a {@link String} representation of the desired value as well.\n * Note: an Aztec symbol should have a minimum of 25% EC words.\n */\n EncodeHintType[EncodeHintType[\"ERROR_CORRECTION\"] = 0] = \"ERROR_CORRECTION\";\n /**\n * Specifies what character encoding to use where applicable (type {@link String})\n */\n EncodeHintType[EncodeHintType[\"CHARACTER_SET\"] = 1] = \"CHARACTER_SET\";\n /**\n * Specifies the matrix shape for Data Matrix (type {@link com.google.zxing.datamatrix.encoder.SymbolShapeHint})\n */\n EncodeHintType[EncodeHintType[\"DATA_MATRIX_SHAPE\"] = 2] = \"DATA_MATRIX_SHAPE\";\n /**\n * Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.\n *\n * @deprecated use width/height params in\n * {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)}\n */\n /*@Deprecated*/\n EncodeHintType[EncodeHintType[\"MIN_SIZE\"] = 3] = \"MIN_SIZE\";\n /**\n * Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.\n *\n * @deprecated without replacement\n */\n /*@Deprecated*/\n EncodeHintType[EncodeHintType[\"MAX_SIZE\"] = 4] = \"MAX_SIZE\";\n /**\n * Specifies margin, in pixels, to use when generating the barcode. The meaning can vary\n * by format; for example it controls margin before and after the barcode horizontally for\n * most 1D formats. (Type {@link Integer}, or {@link String} representation of the integer value).\n */\n EncodeHintType[EncodeHintType[\"MARGIN\"] = 5] = \"MARGIN\";\n /**\n * Specifies whether to use compact mode for PDF417 (type {@link Boolean}, or \"true\" or \"false\"\n * {@link String} value).\n */\n EncodeHintType[EncodeHintType[\"PDF417_COMPACT\"] = 6] = \"PDF417_COMPACT\";\n /**\n * Specifies what compaction mode to use for PDF417 (type\n * {@link com.google.zxing.pdf417.encoder.Compaction Compaction} or {@link String} value of one of its\n * enum values).\n */\n EncodeHintType[EncodeHintType[\"PDF417_COMPACTION\"] = 7] = \"PDF417_COMPACTION\";\n /**\n * Specifies the minimum and maximum number of rows and columns for PDF417 (type\n * {@link com.google.zxing.pdf417.encoder.Dimensions Dimensions}).\n */\n EncodeHintType[EncodeHintType[\"PDF417_DIMENSIONS\"] = 8] = \"PDF417_DIMENSIONS\";\n /**\n * Specifies the required number of layers for an Aztec code.\n * A negative number (-1, -2, -3, -4) specifies a compact Aztec code.\n * 0 indicates to use the minimum number of layers (the default).\n * A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code.\n * (Type {@link Integer}, or {@link String} representation of the integer value).\n */\n EncodeHintType[EncodeHintType[\"AZTEC_LAYERS\"] = 9] = \"AZTEC_LAYERS\";\n /**\n * Specifies the exact version of QR code to be encoded.\n * (Type {@link Integer}, or {@link String} representation of the integer value).\n */\n EncodeHintType[EncodeHintType[\"QR_VERSION\"] = 10] = \"QR_VERSION\";\n return EncodeHintType;\n }(EncodeHintType || {});\n var EncodeHintType$1 = EncodeHintType;\n\n /**\n * Implements Reed-Solomon encoding, as the name implies.
\n *\n * @author Sean Owen\n * @author William Rucklidge\n */\n class ReedSolomonEncoder {\n /**\n * A reed solomon error-correcting encoding constructor is created by\n * passing as Galois Field with of size equal to the number of code\n * words (symbols) in the alphabet (the number of values in each\n * element of arrays that are encoded/decoded).\n * @param field A galois field with a number of elements equal to the size\n * of the alphabet of symbols to encode.\n */\n constructor(field) {\n this.field = field;\n this.cachedGenerators = [];\n this.cachedGenerators.push(new GenericGFPoly(field, Int32Array.from([1])));\n }\n buildGenerator(degree /*int*/) {\n const cachedGenerators = this.cachedGenerators;\n if (degree >= cachedGenerators.length) {\n let lastGenerator = cachedGenerators[cachedGenerators.length - 1];\n const field = this.field;\n for (let d = cachedGenerators.length; d <= degree; d++) {\n const nextGenerator = lastGenerator.multiply(new GenericGFPoly(field, Int32Array.from([1, field.exp(d - 1 + field.getGeneratorBase())])));\n cachedGenerators.push(nextGenerator);\n lastGenerator = nextGenerator;\n }\n }\n return cachedGenerators[degree];\n }\n /**\n * Encode a sequence of code words (symbols) using Reed-Solomon to allow decoders\n * to detect and correct errors that may have been introduced when the resulting\n * data is stored or transmitted.
\n *\n * @param toEncode array used for both and output. Caller initializes the array with\n * the code words (symbols) to be encoded followed by empty elements allocated to make\n * space for error-correction code words in the encoded output. The array contains\n * the encdoded output when encode returns. Code words are encoded as numbers from\n * 0 to n-1, where n is the number of possible code words (symbols), as determined\n * by the size of the Galois Field passed in the constructor of this object.\n * @param ecBytes the number of elements reserved in the array (first parameter)\n * to store error-correction code words. Thus, the number of code words (symbols)\n * to encode in the first parameter is thus toEncode.length - ecBytes.\n * Note, the use of \"bytes\" in the name of this parameter is misleading, as there may\n * be more or fewer than 256 symbols being encoded, as determined by the number of\n * elements in the Galois Field passed as a constructor to this object.\n * @throws IllegalArgumentException thrown in response to validation errros.\n */\n encode(toEncode, ecBytes /*int*/) {\n if (ecBytes === 0) {\n throw new IllegalArgumentException('No error correction bytes');\n }\n const dataBytes = toEncode.length - ecBytes;\n if (dataBytes <= 0) {\n throw new IllegalArgumentException('No data bytes provided');\n }\n const generator = this.buildGenerator(ecBytes);\n const infoCoefficients = new Int32Array(dataBytes);\n System.arraycopy(toEncode, 0, infoCoefficients, 0, dataBytes);\n let info = new GenericGFPoly(this.field, infoCoefficients);\n info = info.multiplyByMonomial(ecBytes, 1);\n const remainder = info.divide(generator)[1];\n const coefficients = remainder.getCoefficients();\n const numZeroCoefficients = ecBytes - coefficients.length;\n for (let i = 0; i < numZeroCoefficients; i++) {\n toEncode[dataBytes + i] = 0;\n }\n System.arraycopy(coefficients, 0, toEncode, dataBytes + numZeroCoefficients, coefficients.length);\n }\n }\n\n /**\n * @author Satoru Takabayashi\n * @author Daniel Switkin\n * @author Sean Owen\n */\n let MaskUtil = /*#__PURE__*/(() => {\n class MaskUtil {\n constructor() {\n // do nothing\n }\n /**\n * Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and\n * give penalty to them. Example: 00000 or 11111.\n */\n static applyMaskPenaltyRule1(matrix) {\n return MaskUtil.applyMaskPenaltyRule1Internal(matrix, true) + MaskUtil.applyMaskPenaltyRule1Internal(matrix, false);\n }\n /**\n * Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give\n * penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a\n * penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block.\n */\n static applyMaskPenaltyRule2(matrix) {\n let penalty = 0;\n const array = matrix.getArray();\n const width = matrix.getWidth();\n const height = matrix.getHeight();\n for (let y = 0; y < height - 1; y++) {\n const arrayY = array[y];\n for (let x = 0; x < width - 1; x++) {\n const value = arrayY[x];\n if (value === arrayY[x + 1] && value === array[y + 1][x] && value === array[y + 1][x + 1]) {\n penalty++;\n }\n }\n }\n return MaskUtil.N2 * penalty;\n }\n /**\n * Apply mask penalty rule 3 and return the penalty. Find consecutive runs of 1:1:3:1:1:4\n * starting with black, or 4:1:1:3:1:1 starting with white, and give penalty to them. If we\n * find patterns like 000010111010000, we give penalty once.\n */\n static applyMaskPenaltyRule3(matrix) {\n let numPenalties = 0;\n const array = matrix.getArray();\n const width = matrix.getWidth();\n const height = matrix.getHeight();\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n const arrayY = array[y]; // We can at least optimize this access\n if (x + 6 < width && arrayY[x] === 1 && arrayY[x + 1] === 0 && arrayY[x + 2] === 1 && arrayY[x + 3] === 1 && arrayY[x + 4] === 1 && arrayY[x + 5] === 0 && arrayY[x + 6] === 1 && (MaskUtil.isWhiteHorizontal(arrayY, x - 4, x) || MaskUtil.isWhiteHorizontal(arrayY, x + 7, x + 11))) {\n numPenalties++;\n }\n if (y + 6 < height && array[y][x] === 1 && array[y + 1][x] === 0 && array[y + 2][x] === 1 && array[y + 3][x] === 1 && array[y + 4][x] === 1 && array[y + 5][x] === 0 && array[y + 6][x] === 1 && (MaskUtil.isWhiteVertical(array, x, y - 4, y) || MaskUtil.isWhiteVertical(array, x, y + 7, y + 11))) {\n numPenalties++;\n }\n }\n }\n return numPenalties * MaskUtil.N3;\n }\n static isWhiteHorizontal(rowArray, from /*int*/, to /*int*/) {\n from = Math.max(from, 0);\n to = Math.min(to, rowArray.length);\n for (let i = from; i < to; i++) {\n if (rowArray[i] === 1) {\n return false;\n }\n }\n return true;\n }\n static isWhiteVertical(array, col /*int*/, from /*int*/, to /*int*/) {\n from = Math.max(from, 0);\n to = Math.min(to, array.length);\n for (let i = from; i < to; i++) {\n if (array[i][col] === 1) {\n return false;\n }\n }\n return true;\n }\n /**\n * Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give\n * penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance.\n */\n static applyMaskPenaltyRule4(matrix) {\n let numDarkCells = 0;\n const array = matrix.getArray();\n const width = matrix.getWidth();\n const height = matrix.getHeight();\n for (let y = 0; y < height; y++) {\n const arrayY = array[y];\n for (let x = 0; x < width; x++) {\n if (arrayY[x] === 1) {\n numDarkCells++;\n }\n }\n }\n const numTotalCells = matrix.getHeight() * matrix.getWidth();\n const fivePercentVariances = Math.floor(Math.abs(numDarkCells * 2 - numTotalCells) * 10 / numTotalCells);\n return fivePercentVariances * MaskUtil.N4;\n }\n /**\n * Return the mask bit for \"getMaskPattern\" at \"x\" and \"y\". See 8.8 of JISX0510:2004 for mask\n * pattern conditions.\n */\n static getDataMaskBit(maskPattern /*int*/, x /*int*/, y /*int*/) {\n let intermediate; /*int*/\n let temp; /*int*/\n switch (maskPattern) {\n case 0:\n intermediate = y + x & 0x1;\n break;\n case 1:\n intermediate = y & 0x1;\n break;\n case 2:\n intermediate = x % 3;\n break;\n case 3:\n intermediate = (y + x) % 3;\n break;\n case 4:\n intermediate = Math.floor(y / 2) + Math.floor(x / 3) & 0x1;\n break;\n case 5:\n temp = y * x;\n intermediate = (temp & 0x1) + temp % 3;\n break;\n case 6:\n temp = y * x;\n intermediate = (temp & 0x1) + temp % 3 & 0x1;\n break;\n case 7:\n temp = y * x;\n intermediate = temp % 3 + (y + x & 0x1) & 0x1;\n break;\n default:\n throw new IllegalArgumentException('Invalid mask pattern: ' + maskPattern);\n }\n return intermediate === 0;\n }\n /**\n * Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both\n * vertical and horizontal orders respectively.\n */\n static applyMaskPenaltyRule1Internal(matrix, isHorizontal) {\n let penalty = 0;\n const iLimit = isHorizontal ? matrix.getHeight() : matrix.getWidth();\n const jLimit = isHorizontal ? matrix.getWidth() : matrix.getHeight();\n const array = matrix.getArray();\n for (let i = 0; i < iLimit; i++) {\n let numSameBitCells = 0;\n let prevBit = -1;\n for (let j = 0; j < jLimit; j++) {\n const bit = isHorizontal ? array[i][j] : array[j][i];\n if (bit === prevBit) {\n numSameBitCells++;\n } else {\n if (numSameBitCells >= 5) {\n penalty += MaskUtil.N1 + (numSameBitCells - 5);\n }\n numSameBitCells = 1; // Include the cell itself.\n prevBit = bit;\n }\n }\n if (numSameBitCells >= 5) {\n penalty += MaskUtil.N1 + (numSameBitCells - 5);\n }\n }\n return penalty;\n }\n }\n // Penalty weights from section 6.8.2.1\n MaskUtil.N1 = 3;\n MaskUtil.N2 = 3;\n MaskUtil.N3 = 40;\n MaskUtil.N4 = 10;\n\n /**\n * JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned\n * -1, 0, and 1, I'm going to use less memory and go with bytes.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n */\n return MaskUtil;\n })();\n class ByteMatrix {\n constructor(width /*int*/, height /*int*/) {\n this.width = width;\n this.height = height;\n const bytes = new Array(height); // [height][width]\n for (let i = 0; i !== height; i++) {\n bytes[i] = new Uint8Array(width);\n }\n this.bytes = bytes;\n }\n getHeight() {\n return this.height;\n }\n getWidth() {\n return this.width;\n }\n get(x /*int*/, y /*int*/) {\n return this.bytes[y][x];\n }\n /**\n * @return an internal representation as bytes, in row-major order. array[y][x] represents point (x,y)\n */\n getArray() {\n return this.bytes;\n }\n // TYPESCRIPTPORT: preffer to let two methods instead of override to avoid type comparison inside\n setNumber(x /*int*/, y /*int*/, value /*byte|int*/) {\n this.bytes[y][x] = value;\n }\n // public set(x: number /*int*/, y: number /*int*/, value: number /*int*/): void {\n // bytes[y][x] = (byte) value\n // }\n setBoolean(x /*int*/, y /*int*/, value) {\n this.bytes[y][x] = /*(byte) */value ? 1 : 0;\n }\n clear(value /*byte*/) {\n for (const aByte of this.bytes) {\n Arrays.fill(aByte, value);\n }\n }\n equals(o) {\n if (!(o instanceof ByteMatrix)) {\n return false;\n }\n const other = o;\n if (this.width !== other.width) {\n return false;\n }\n if (this.height !== other.height) {\n return false;\n }\n for (let y = 0, height = this.height; y < height; ++y) {\n const bytesY = this.bytes[y];\n const otherBytesY = other.bytes[y];\n for (let x = 0, width = this.width; x < width; ++x) {\n if (bytesY[x] !== otherBytesY[x]) {\n return false;\n }\n }\n }\n return true;\n }\n /*@Override*/\n toString() {\n const result = new StringBuilder(); // (2 * width * height + 2)\n for (let y = 0, height = this.height; y < height; ++y) {\n const bytesY = this.bytes[y];\n for (let x = 0, width = this.width; x < width; ++x) {\n switch (bytesY[x]) {\n case 0:\n result.append(' 0');\n break;\n case 1:\n result.append(' 1');\n break;\n default:\n result.append(' ');\n break;\n }\n }\n result.append('\\n');\n }\n return result.toString();\n }\n }\n\n /**\n * @author satorux@google.com (Satoru Takabayashi) - creator\n * @author dswitkin@google.com (Daniel Switkin) - ported from C++\n */\n let QRCode = /*#__PURE__*/(() => {\n class QRCode {\n constructor() {\n this.maskPattern = -1;\n }\n getMode() {\n return this.mode;\n }\n getECLevel() {\n return this.ecLevel;\n }\n getVersion() {\n return this.version;\n }\n getMaskPattern() {\n return this.maskPattern;\n }\n getMatrix() {\n return this.matrix;\n }\n /*@Override*/\n toString() {\n const result = new StringBuilder(); // (200)\n result.append('<<\\n');\n result.append(' mode: ');\n result.append(this.mode ? this.mode.toString() : 'null');\n result.append('\\n ecLevel: ');\n result.append(this.ecLevel ? this.ecLevel.toString() : 'null');\n result.append('\\n version: ');\n result.append(this.version ? this.version.toString() : 'null');\n result.append('\\n maskPattern: ');\n result.append(this.maskPattern.toString());\n if (this.matrix) {\n result.append('\\n matrix:\\n');\n result.append(this.matrix.toString());\n } else {\n result.append('\\n matrix: null\\n');\n }\n result.append('>>\\n');\n return result.toString();\n }\n setMode(value) {\n this.mode = value;\n }\n setECLevel(value) {\n this.ecLevel = value;\n }\n setVersion(version) {\n this.version = version;\n }\n setMaskPattern(value /*int*/) {\n this.maskPattern = value;\n }\n setMatrix(value) {\n this.matrix = value;\n }\n // Check if \"mask_pattern\" is valid.\n static isValidMaskPattern(maskPattern /*int*/) {\n return maskPattern >= 0 && maskPattern < QRCode.NUM_MASK_PATTERNS;\n }\n }\n QRCode.NUM_MASK_PATTERNS = 8;\n\n /**\n * Custom Error class of type Exception.\n */\n return QRCode;\n })();\n let WriterException = /*#__PURE__*/(() => {\n class WriterException extends Exception {}\n WriterException.kind = 'WriterException';\n\n /**\n * @author satorux@google.com (Satoru Takabayashi) - creator\n * @author dswitkin@google.com (Daniel Switkin) - ported from C++\n */\n return WriterException;\n })();\n class MatrixUtil {\n constructor() {\n // do nothing\n }\n // Set all cells to -1 (TYPESCRIPTPORT: 255). -1 (TYPESCRIPTPORT: 255) means that the cell is empty (not set yet).\n //\n // JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding\n // with the ByteMatrix initialized all to zero.\n static clearMatrix(matrix) {\n // TYPESCRIPTPORT: we use UintArray se changed here from -1 to 255\n matrix.clear( /*(byte) */ /*-1*/255);\n }\n // Build 2D matrix of QR Code from \"dataBits\" with \"ecLevel\", \"version\" and \"getMaskPattern\". On\n // success, store the result in \"matrix\" and return true.\n static buildMatrix(dataBits, ecLevel, version, maskPattern /*int*/, matrix) {\n MatrixUtil.clearMatrix(matrix);\n MatrixUtil.embedBasicPatterns(version, matrix);\n // Type information appear with any version.\n MatrixUtil.embedTypeInfo(ecLevel, maskPattern, matrix);\n // Version info appear if version >= 7.\n MatrixUtil.maybeEmbedVersionInfo(version, matrix);\n // Data should be embedded at end.\n MatrixUtil.embedDataBits(dataBits, maskPattern, matrix);\n }\n // Embed basic patterns. On success, modify the matrix and return true.\n // The basic patterns are:\n // - Position detection patterns\n // - Timing patterns\n // - Dark dot at the left bottom corner\n // - Position adjustment patterns, if need be\n static embedBasicPatterns(version, matrix) {\n // Let's get started with embedding big squares at corners.\n MatrixUtil.embedPositionDetectionPatternsAndSeparators(matrix);\n // Then, embed the dark dot at the left bottom corner.\n MatrixUtil.embedDarkDotAtLeftBottomCorner(matrix);\n // Position adjustment patterns appear if version >= 2.\n MatrixUtil.maybeEmbedPositionAdjustmentPatterns(version, matrix);\n // Timing patterns should be embedded after position adj. patterns.\n MatrixUtil.embedTimingPatterns(matrix);\n }\n // Embed type information. On success, modify the matrix.\n static embedTypeInfo(ecLevel, maskPattern /*int*/, matrix) {\n const typeInfoBits = new BitArray();\n MatrixUtil.makeTypeInfoBits(ecLevel, maskPattern, typeInfoBits);\n for (let i = 0, size = typeInfoBits.getSize(); i < size; ++i) {\n // Place bits in LSB to MSB order. LSB (least significant bit) is the last value in\n // \"typeInfoBits\".\n const bit = typeInfoBits.get(typeInfoBits.getSize() - 1 - i);\n // Type info bits at the left top corner. See 8.9 of JISX0510:2004 (p.46).\n const coordinates = MatrixUtil.TYPE_INFO_COORDINATES[i];\n const x1 = coordinates[0];\n const y1 = coordinates[1];\n matrix.setBoolean(x1, y1, bit);\n if (i < 8) {\n // Right top corner.\n const x2 = matrix.getWidth() - i - 1;\n const y2 = 8;\n matrix.setBoolean(x2, y2, bit);\n } else {\n // Left bottom corner.\n const x2 = 8;\n const y2 = matrix.getHeight() - 7 + (i - 8);\n matrix.setBoolean(x2, y2, bit);\n }\n }\n }\n // Embed version information if need be. On success, modify the matrix and return true.\n // See 8.10 of JISX0510:2004 (p.47) for how to embed version information.\n static maybeEmbedVersionInfo(version, matrix) {\n if (version.getVersionNumber() < 7) {\n // Version info is necessary if version >= 7.\n return; // Don't need version info.\n }\n\n const versionInfoBits = new BitArray();\n MatrixUtil.makeVersionInfoBits(version, versionInfoBits);\n let bitIndex = 6 * 3 - 1; // It will decrease from 17 to 0.\n for (let i = 0; i < 6; ++i) {\n for (let j = 0; j < 3; ++j) {\n // Place bits in LSB (least significant bit) to MSB order.\n const bit = versionInfoBits.get(bitIndex);\n bitIndex--;\n // Left bottom corner.\n matrix.setBoolean(i, matrix.getHeight() - 11 + j, bit);\n // Right bottom corner.\n matrix.setBoolean(matrix.getHeight() - 11 + j, i, bit);\n }\n }\n }\n // Embed \"dataBits\" using \"getMaskPattern\". On success, modify the matrix and return true.\n // For debugging purposes, it skips masking process if \"getMaskPattern\" is -1(TYPESCRIPTPORT: 255).\n // See 8.7 of JISX0510:2004 (p.38) for how to embed data bits.\n static embedDataBits(dataBits, maskPattern /*int*/, matrix) {\n let bitIndex = 0;\n let direction = -1;\n // Start from the right bottom cell.\n let x = matrix.getWidth() - 1;\n let y = matrix.getHeight() - 1;\n while (x > 0) {\n // Skip the vertical timing pattern.\n if (x === 6) {\n x -= 1;\n }\n while (y >= 0 && y < matrix.getHeight()) {\n for (let i = 0; i < 2; ++i) {\n const xx = x - i;\n // Skip the cell if it's not empty.\n if (!MatrixUtil.isEmpty(matrix.get(xx, y))) {\n continue;\n }\n let bit;\n if (bitIndex < dataBits.getSize()) {\n bit = dataBits.get(bitIndex);\n ++bitIndex;\n } else {\n // Padding bit. If there is no bit left, we'll fill the left cells with 0, as described\n // in 8.4.9 of JISX0510:2004 (p. 24).\n bit = false;\n }\n // Skip masking if mask_pattern is -1 (TYPESCRIPTPORT: 255).\n if (maskPattern !== 255 && MaskUtil.getDataMaskBit(maskPattern, xx, y)) {\n bit = !bit;\n }\n matrix.setBoolean(xx, y, bit);\n }\n y += direction;\n }\n direction = -direction; // Reverse the direction.\n y += direction;\n x -= 2; // Move to the left.\n }\n // All bits should be consumed.\n if (bitIndex !== dataBits.getSize()) {\n throw new WriterException('Not all bits consumed: ' + bitIndex + '/' + dataBits.getSize());\n }\n }\n // Return the position of the most significant bit set (one: to) in the \"value\". The most\n // significant bit is position 32. If there is no bit set, return 0. Examples:\n // - findMSBSet(0) => 0\n // - findMSBSet(1) => 1\n // - findMSBSet(255) => 8\n static findMSBSet(value /*int*/) {\n return 32 - Integer.numberOfLeadingZeros(value);\n }\n // Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for \"value\" using polynomial \"poly\". The BCH\n // code is used for encoding type information and version information.\n // Example: Calculation of version information of 7.\n // f(x) is created from 7.\n // - 7 = 000111 in 6 bits\n // - f(x) = x^2 + x^1 + x^0\n // g(x) is given by the standard (p. 67)\n // - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1\n // Multiply f(x) by x^(18 - 6)\n // - f'(x) = f(x) * x^(18 - 6)\n // - f'(x) = x^14 + x^13 + x^12\n // Calculate the remainder of f'(x) / g(x)\n // x^2\n // __________________________________________________\n // g(x) )x^14 + x^13 + x^12\n // x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2\n // --------------------------------------------------\n // x^11 + x^10 + x^7 + x^4 + x^2\n //\n // The remainder is x^11 + x^10 + x^7 + x^4 + x^2\n // Encode it in binary: 110010010100\n // The return value is 0xc94 (1100 1001 0100)\n //\n // Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit\n // operations. We don't care if coefficients are positive or negative.\n static calculateBCHCode(value /*int*/, poly /*int*/) {\n if (poly === 0) {\n throw new IllegalArgumentException('0 polynomial');\n }\n // If poly is \"1 1111 0010 0101\" (version info poly), msbSetInPoly is 13. We'll subtract 1\n // from 13 to make it 12.\n const msbSetInPoly = MatrixUtil.findMSBSet(poly);\n value <<= msbSetInPoly - 1;\n // Do the division business using exclusive-or operations.\n while (MatrixUtil.findMSBSet(value) >= msbSetInPoly) {\n value ^= poly << MatrixUtil.findMSBSet(value) - msbSetInPoly;\n }\n // Now the \"value\" is the remainder (i.e. the BCH code)\n return value;\n }\n // Make bit vector of type information. On success, store the result in \"bits\" and return true.\n // Encode error correction level and mask pattern. See 8.9 of\n // JISX0510:2004 (p.45) for details.\n static makeTypeInfoBits(ecLevel, maskPattern /*int*/, bits) {\n if (!QRCode.isValidMaskPattern(maskPattern)) {\n throw new WriterException('Invalid mask pattern');\n }\n const typeInfo = ecLevel.getBits() << 3 | maskPattern;\n bits.appendBits(typeInfo, 5);\n const bchCode = MatrixUtil.calculateBCHCode(typeInfo, MatrixUtil.TYPE_INFO_POLY);\n bits.appendBits(bchCode, 10);\n const maskBits = new BitArray();\n maskBits.appendBits(MatrixUtil.TYPE_INFO_MASK_PATTERN, 15);\n bits.xor(maskBits);\n if (bits.getSize() !== 15) {\n // Just in case.\n throw new WriterException('should not happen but we got: ' + bits.getSize());\n }\n }\n // Make bit vector of version information. On success, store the result in \"bits\" and return true.\n // See 8.10 of JISX0510:2004 (p.45) for details.\n static makeVersionInfoBits(version, bits) {\n bits.appendBits(version.getVersionNumber(), 6);\n const bchCode = MatrixUtil.calculateBCHCode(version.getVersionNumber(), MatrixUtil.VERSION_INFO_POLY);\n bits.appendBits(bchCode, 12);\n if (bits.getSize() !== 18) {\n // Just in case.\n throw new WriterException('should not happen but we got: ' + bits.getSize());\n }\n }\n // Check if \"value\" is empty.\n static isEmpty(value /*int*/) {\n return value === 255; // -1\n }\n\n static embedTimingPatterns(matrix) {\n // -8 is for skipping position detection patterns (7: size), and two horizontal/vertical\n // separation patterns (1: size). Thus, 8 = 7 + 1.\n for (let i = 8; i < matrix.getWidth() - 8; ++i) {\n const bit = (i + 1) % 2;\n // Horizontal line.\n if (MatrixUtil.isEmpty(matrix.get(i, 6))) {\n matrix.setNumber(i, 6, bit);\n }\n // Vertical line.\n if (MatrixUtil.isEmpty(matrix.get(6, i))) {\n matrix.setNumber(6, i, bit);\n }\n }\n }\n // Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46)\n static embedDarkDotAtLeftBottomCorner(matrix) {\n if (matrix.get(8, matrix.getHeight() - 8) === 0) {\n throw new WriterException();\n }\n matrix.setNumber(8, matrix.getHeight() - 8, 1);\n }\n static embedHorizontalSeparationPattern(xStart /*int*/, yStart /*int*/, matrix) {\n for (let x = 0; x < 8; ++x) {\n if (!MatrixUtil.isEmpty(matrix.get(xStart + x, yStart))) {\n throw new WriterException();\n }\n matrix.setNumber(xStart + x, yStart, 0);\n }\n }\n static embedVerticalSeparationPattern(xStart /*int*/, yStart /*int*/, matrix) {\n for (let y = 0; y < 7; ++y) {\n if (!MatrixUtil.isEmpty(matrix.get(xStart, yStart + y))) {\n throw new WriterException();\n }\n matrix.setNumber(xStart, yStart + y, 0);\n }\n }\n static embedPositionAdjustmentPattern(xStart /*int*/, yStart /*int*/, matrix) {\n for (let y = 0; y < 5; ++y) {\n const patternY = MatrixUtil.POSITION_ADJUSTMENT_PATTERN[y];\n for (let x = 0; x < 5; ++x) {\n matrix.setNumber(xStart + x, yStart + y, patternY[x]);\n }\n }\n }\n static embedPositionDetectionPattern(xStart /*int*/, yStart /*int*/, matrix) {\n for (let y = 0; y < 7; ++y) {\n const patternY = MatrixUtil.POSITION_DETECTION_PATTERN[y];\n for (let x = 0; x < 7; ++x) {\n matrix.setNumber(xStart + x, yStart + y, patternY[x]);\n }\n }\n }\n // Embed position detection patterns and surrounding vertical/horizontal separators.\n static embedPositionDetectionPatternsAndSeparators(matrix) {\n // Embed three big squares at corners.\n const pdpWidth = MatrixUtil.POSITION_DETECTION_PATTERN[0].length;\n // Left top corner.\n MatrixUtil.embedPositionDetectionPattern(0, 0, matrix);\n // Right top corner.\n MatrixUtil.embedPositionDetectionPattern(matrix.getWidth() - pdpWidth, 0, matrix);\n // Left bottom corner.\n MatrixUtil.embedPositionDetectionPattern(0, matrix.getWidth() - pdpWidth, matrix);\n // Embed horizontal separation patterns around the squares.\n const hspWidth = 8;\n // Left top corner.\n MatrixUtil.embedHorizontalSeparationPattern(0, hspWidth - 1, matrix);\n // Right top corner.\n MatrixUtil.embedHorizontalSeparationPattern(matrix.getWidth() - hspWidth, hspWidth - 1, matrix);\n // Left bottom corner.\n MatrixUtil.embedHorizontalSeparationPattern(0, matrix.getWidth() - hspWidth, matrix);\n // Embed vertical separation patterns around the squares.\n const vspSize = 7;\n // Left top corner.\n MatrixUtil.embedVerticalSeparationPattern(vspSize, 0, matrix);\n // Right top corner.\n MatrixUtil.embedVerticalSeparationPattern(matrix.getHeight() - vspSize - 1, 0, matrix);\n // Left bottom corner.\n MatrixUtil.embedVerticalSeparationPattern(vspSize, matrix.getHeight() - vspSize, matrix);\n }\n // Embed position adjustment patterns if need be.\n static maybeEmbedPositionAdjustmentPatterns(version, matrix) {\n if (version.getVersionNumber() < 2) {\n // The patterns appear if version >= 2\n return;\n }\n const index = version.getVersionNumber() - 1;\n const coordinates = MatrixUtil.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[index];\n for (let i = 0, length = coordinates.length; i !== length; i++) {\n const y = coordinates[i];\n if (y >= 0) {\n for (let j = 0; j !== length; j++) {\n const x = coordinates[j];\n if (x >= 0 && MatrixUtil.isEmpty(matrix.get(x, y))) {\n // If the cell is unset, we embed the position adjustment pattern here.\n // -2 is necessary since the x/y coordinates point to the center of the pattern, not the\n // left top corner.\n MatrixUtil.embedPositionAdjustmentPattern(x - 2, y - 2, matrix);\n }\n }\n }\n }\n }\n }\n MatrixUtil.POSITION_DETECTION_PATTERN = Array.from([Int32Array.from([1, 1, 1, 1, 1, 1, 1]), Int32Array.from([1, 0, 0, 0, 0, 0, 1]), Int32Array.from([1, 0, 1, 1, 1, 0, 1]), Int32Array.from([1, 0, 1, 1, 1, 0, 1]), Int32Array.from([1, 0, 1, 1, 1, 0, 1]), Int32Array.from([1, 0, 0, 0, 0, 0, 1]), Int32Array.from([1, 1, 1, 1, 1, 1, 1])]);\n MatrixUtil.POSITION_ADJUSTMENT_PATTERN = Array.from([Int32Array.from([1, 1, 1, 1, 1]), Int32Array.from([1, 0, 0, 0, 1]), Int32Array.from([1, 0, 1, 0, 1]), Int32Array.from([1, 0, 0, 0, 1]), Int32Array.from([1, 1, 1, 1, 1])]);\n // From Appendix E. Table 1, JIS0510X:2004 (71: p). The table was double-checked by komatsu.\n MatrixUtil.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE = Array.from([Int32Array.from([-1, -1, -1, -1, -1, -1, -1]), Int32Array.from([6, 18, -1, -1, -1, -1, -1]), Int32Array.from([6, 22, -1, -1, -1, -1, -1]), Int32Array.from([6, 26, -1, -1, -1, -1, -1]), Int32Array.from([6, 30, -1, -1, -1, -1, -1]), Int32Array.from([6, 34, -1, -1, -1, -1, -1]), Int32Array.from([6, 22, 38, -1, -1, -1, -1]), Int32Array.from([6, 24, 42, -1, -1, -1, -1]), Int32Array.from([6, 26, 46, -1, -1, -1, -1]), Int32Array.from([6, 28, 50, -1, -1, -1, -1]), Int32Array.from([6, 30, 54, -1, -1, -1, -1]), Int32Array.from([6, 32, 58, -1, -1, -1, -1]), Int32Array.from([6, 34, 62, -1, -1, -1, -1]), Int32Array.from([6, 26, 46, 66, -1, -1, -1]), Int32Array.from([6, 26, 48, 70, -1, -1, -1]), Int32Array.from([6, 26, 50, 74, -1, -1, -1]), Int32Array.from([6, 30, 54, 78, -1, -1, -1]), Int32Array.from([6, 30, 56, 82, -1, -1, -1]), Int32Array.from([6, 30, 58, 86, -1, -1, -1]), Int32Array.from([6, 34, 62, 90, -1, -1, -1]), Int32Array.from([6, 28, 50, 72, 94, -1, -1]), Int32Array.from([6, 26, 50, 74, 98, -1, -1]), Int32Array.from([6, 30, 54, 78, 102, -1, -1]), Int32Array.from([6, 28, 54, 80, 106, -1, -1]), Int32Array.from([6, 32, 58, 84, 110, -1, -1]), Int32Array.from([6, 30, 58, 86, 114, -1, -1]), Int32Array.from([6, 34, 62, 90, 118, -1, -1]), Int32Array.from([6, 26, 50, 74, 98, 122, -1]), Int32Array.from([6, 30, 54, 78, 102, 126, -1]), Int32Array.from([6, 26, 52, 78, 104, 130, -1]), Int32Array.from([6, 30, 56, 82, 108, 134, -1]), Int32Array.from([6, 34, 60, 86, 112, 138, -1]), Int32Array.from([6, 30, 58, 86, 114, 142, -1]), Int32Array.from([6, 34, 62, 90, 118, 146, -1]), Int32Array.from([6, 30, 54, 78, 102, 126, 150]), Int32Array.from([6, 24, 50, 76, 102, 128, 154]), Int32Array.from([6, 28, 54, 80, 106, 132, 158]), Int32Array.from([6, 32, 58, 84, 110, 136, 162]), Int32Array.from([6, 26, 54, 82, 110, 138, 166]), Int32Array.from([6, 30, 58, 86, 114, 142, 170])]);\n // Type info cells at the left top corner.\n MatrixUtil.TYPE_INFO_COORDINATES = Array.from([Int32Array.from([8, 0]), Int32Array.from([8, 1]), Int32Array.from([8, 2]), Int32Array.from([8, 3]), Int32Array.from([8, 4]), Int32Array.from([8, 5]), Int32Array.from([8, 7]), Int32Array.from([8, 8]), Int32Array.from([7, 8]), Int32Array.from([5, 8]), Int32Array.from([4, 8]), Int32Array.from([3, 8]), Int32Array.from([2, 8]), Int32Array.from([1, 8]), Int32Array.from([0, 8])]);\n // From Appendix D in JISX0510:2004 (p. 67)\n MatrixUtil.VERSION_INFO_POLY = 0x1f25; // 1 1111 0010 0101\n // From Appendix C in JISX0510:2004 (p.65).\n MatrixUtil.TYPE_INFO_POLY = 0x537;\n MatrixUtil.TYPE_INFO_MASK_PATTERN = 0x5412;\n\n /*namespace com.google.zxing.qrcode.encoder {*/\n class BlockPair {\n constructor(dataBytes, errorCorrectionBytes) {\n this.dataBytes = dataBytes;\n this.errorCorrectionBytes = errorCorrectionBytes;\n }\n getDataBytes() {\n return this.dataBytes;\n }\n getErrorCorrectionBytes() {\n return this.errorCorrectionBytes;\n }\n }\n\n /*import java.io.UnsupportedEncodingException;*/\n /*import java.util.ArrayList;*/\n /*import java.util.Collection;*/\n /*import java.util.Map;*/\n /**\n * @author satorux@google.com (Satoru Takabayashi) - creator\n * @author dswitkin@google.com (Daniel Switkin) - ported from C++\n */\n class Encoder {\n // TYPESCRIPTPORT: changed to UTF8, the default for js\n constructor() {}\n // The mask penalty calculation is complicated. See Table 21 of JISX0510:2004 (p.45) for details.\n // Basically it applies four rules and summate all penalties.\n static calculateMaskPenalty(matrix) {\n return MaskUtil.applyMaskPenaltyRule1(matrix) + MaskUtil.applyMaskPenaltyRule2(matrix) + MaskUtil.applyMaskPenaltyRule3(matrix) + MaskUtil.applyMaskPenaltyRule4(matrix);\n }\n /**\n * @param content text to encode\n * @param ecLevel error correction level to use\n * @return {@link QRCode} representing the encoded QR code\n * @throws WriterException if encoding can't succeed, because of for example invalid content\n * or configuration\n */\n // public static encode(content: string, ecLevel: ErrorCorrectionLevel): QRCode /*throws WriterException*/ {\n // return encode(content, ecLevel, null)\n // }\n static encode(content, ecLevel, hints = null) {\n // Determine what character encoding has been specified by the caller, if any\n let encoding = Encoder.DEFAULT_BYTE_MODE_ENCODING;\n const hasEncodingHint = hints !== null && undefined !== hints.get(EncodeHintType$1.CHARACTER_SET);\n if (hasEncodingHint) {\n encoding = hints.get(EncodeHintType$1.CHARACTER_SET).toString();\n }\n // Pick an encoding mode appropriate for the content. Note that this will not attempt to use\n // multiple modes / segments even if that were more efficient. Twould be nice.\n const mode = this.chooseMode(content, encoding);\n // This will store the header information, like mode and\n // length, as well as \"header\" segments like an ECI segment.\n const headerBits = new BitArray();\n // Append ECI segment if applicable\n if (mode === Mode$1.BYTE && (hasEncodingHint || Encoder.DEFAULT_BYTE_MODE_ENCODING !== encoding)) {\n const eci = CharacterSetECI.getCharacterSetECIByName(encoding);\n if (eci !== undefined) {\n this.appendECI(eci, headerBits);\n }\n }\n // (With ECI in place,) Write the mode marker\n this.appendModeInfo(mode, headerBits);\n // Collect data within the main segment, separately, to count its size if needed. Don't add it to\n // main payload yet.\n const dataBits = new BitArray();\n this.appendBytes(content, mode, dataBits, encoding);\n let version;\n if (hints !== null && undefined !== hints.get(EncodeHintType$1.QR_VERSION)) {\n const versionNumber = Number.parseInt(hints.get(EncodeHintType$1.QR_VERSION).toString(), 10);\n version = Version$1.getVersionForNumber(versionNumber);\n const bitsNeeded = this.calculateBitsNeeded(mode, headerBits, dataBits, version);\n if (!this.willFit(bitsNeeded, version, ecLevel)) {\n throw new WriterException('Data too big for requested version');\n }\n } else {\n version = this.recommendVersion(ecLevel, mode, headerBits, dataBits);\n }\n const headerAndDataBits = new BitArray();\n headerAndDataBits.appendBitArray(headerBits);\n // Find \"length\" of main segment and write it\n const numLetters = mode === Mode$1.BYTE ? dataBits.getSizeInBytes() : content.length;\n this.appendLengthInfo(numLetters, version, mode, headerAndDataBits);\n // Put data together into the overall payload\n headerAndDataBits.appendBitArray(dataBits);\n const ecBlocks = version.getECBlocksForLevel(ecLevel);\n const numDataBytes = version.getTotalCodewords() - ecBlocks.getTotalECCodewords();\n // Terminate the bits properly.\n this.terminateBits(numDataBytes, headerAndDataBits);\n // Interleave data bits with error correction code.\n const finalBits = this.interleaveWithECBytes(headerAndDataBits, version.getTotalCodewords(), numDataBytes, ecBlocks.getNumBlocks());\n const qrCode = new QRCode();\n qrCode.setECLevel(ecLevel);\n qrCode.setMode(mode);\n qrCode.setVersion(version);\n // Choose the mask pattern and set to \"qrCode\".\n const dimension = version.getDimensionForVersion();\n const matrix = new ByteMatrix(dimension, dimension);\n const maskPattern = this.chooseMaskPattern(finalBits, ecLevel, version, matrix);\n qrCode.setMaskPattern(maskPattern);\n // Build the matrix and set it to \"qrCode\".\n MatrixUtil.buildMatrix(finalBits, ecLevel, version, maskPattern, matrix);\n qrCode.setMatrix(matrix);\n return qrCode;\n }\n /**\n * Decides the smallest version of QR code that will contain all of the provided data.\n *\n * @throws WriterException if the data cannot fit in any version\n */\n static recommendVersion(ecLevel, mode, headerBits, dataBits) {\n // Hard part: need to know version to know how many bits length takes. But need to know how many\n // bits it takes to know version. First we take a guess at version by assuming version will be\n // the minimum, 1:\n const provisionalBitsNeeded = this.calculateBitsNeeded(mode, headerBits, dataBits, Version$1.getVersionForNumber(1));\n const provisionalVersion = this.chooseVersion(provisionalBitsNeeded, ecLevel);\n // Use that guess to calculate the right version. I am still not sure this works in 100% of cases.\n const bitsNeeded = this.calculateBitsNeeded(mode, headerBits, dataBits, provisionalVersion);\n return this.chooseVersion(bitsNeeded, ecLevel);\n }\n static calculateBitsNeeded(mode, headerBits, dataBits, version) {\n return headerBits.getSize() + mode.getCharacterCountBits(version) + dataBits.getSize();\n }\n /**\n * @return the code point of the table used in alphanumeric mode or\n * -1 if there is no corresponding code in the table.\n */\n static getAlphanumericCode(code /*int*/) {\n if (code < Encoder.ALPHANUMERIC_TABLE.length) {\n return Encoder.ALPHANUMERIC_TABLE[code];\n }\n return -1;\n }\n // public static chooseMode(content: string): Mode {\n // return chooseMode(content, null);\n // }\n /**\n * Choose the best mode by examining the content. Note that 'encoding' is used as a hint;\n * if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}.\n */\n static chooseMode(content, encoding = null) {\n if (CharacterSetECI.SJIS.getName() === encoding && this.isOnlyDoubleByteKanji(content)) {\n // Choose Kanji mode if all input are double-byte characters\n return Mode$1.KANJI;\n }\n let hasNumeric = false;\n let hasAlphanumeric = false;\n for (let i = 0, length = content.length; i < length; ++i) {\n const c = content.charAt(i);\n if (Encoder.isDigit(c)) {\n hasNumeric = true;\n } else if (this.getAlphanumericCode(c.charCodeAt(0)) !== -1) {\n hasAlphanumeric = true;\n } else {\n return Mode$1.BYTE;\n }\n }\n if (hasAlphanumeric) {\n return Mode$1.ALPHANUMERIC;\n }\n if (hasNumeric) {\n return Mode$1.NUMERIC;\n }\n return Mode$1.BYTE;\n }\n static isOnlyDoubleByteKanji(content) {\n let bytes;\n try {\n bytes = StringEncoding.encode(content, CharacterSetECI.SJIS); // content.getBytes(\"Shift_JIS\"))\n } catch (ignored /*: UnsupportedEncodingException*/) {\n return false;\n }\n const length = bytes.length;\n if (length % 2 !== 0) {\n return false;\n }\n for (let i = 0; i < length; i += 2) {\n const byte1 = bytes[i] & 0xFF;\n if ((byte1 < 0x81 || byte1 > 0x9F) && (byte1 < 0xE0 || byte1 > 0xEB)) {\n return false;\n }\n }\n return true;\n }\n static chooseMaskPattern(bits, ecLevel, version, matrix) {\n let minPenalty = Number.MAX_SAFE_INTEGER; // Lower penalty is better.\n let bestMaskPattern = -1;\n // We try all mask patterns to choose the best one.\n for (let maskPattern = 0; maskPattern < QRCode.NUM_MASK_PATTERNS; maskPattern++) {\n MatrixUtil.buildMatrix(bits, ecLevel, version, maskPattern, matrix);\n let penalty = this.calculateMaskPenalty(matrix);\n if (penalty < minPenalty) {\n minPenalty = penalty;\n bestMaskPattern = maskPattern;\n }\n }\n return bestMaskPattern;\n }\n static chooseVersion(numInputBits /*int*/, ecLevel) {\n for (let versionNum = 1; versionNum <= 40; versionNum++) {\n const version = Version$1.getVersionForNumber(versionNum);\n if (Encoder.willFit(numInputBits, version, ecLevel)) {\n return version;\n }\n }\n throw new WriterException('Data too big');\n }\n /**\n * @return true if the number of input bits will fit in a code with the specified version and\n * error correction level.\n */\n static willFit(numInputBits /*int*/, version, ecLevel) {\n // In the following comments, we use numbers of Version 7-H.\n // numBytes = 196\n const numBytes = version.getTotalCodewords();\n // getNumECBytes = 130\n const ecBlocks = version.getECBlocksForLevel(ecLevel);\n const numEcBytes = ecBlocks.getTotalECCodewords();\n // getNumDataBytes = 196 - 130 = 66\n const numDataBytes = numBytes - numEcBytes;\n const totalInputBytes = (numInputBits + 7) / 8;\n return numDataBytes >= totalInputBytes;\n }\n /**\n * Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24).\n */\n static terminateBits(numDataBytes /*int*/, bits) {\n const capacity = numDataBytes * 8;\n if (bits.getSize() > capacity) {\n throw new WriterException('data bits cannot fit in the QR Code' + bits.getSize() + ' > ' + capacity);\n }\n for (let i = 0; i < 4 && bits.getSize() < capacity; ++i) {\n bits.appendBit(false);\n }\n // Append termination bits. See 8.4.8 of JISX0510:2004 (p.24) for details.\n // If the last byte isn't 8-bit aligned, we'll add padding bits.\n const numBitsInLastByte = bits.getSize() & 0x07;\n if (numBitsInLastByte > 0) {\n for (let i = numBitsInLastByte; i < 8; i++) {\n bits.appendBit(false);\n }\n }\n // If we have more space, we'll fill the space with padding patterns defined in 8.4.9 (p.24).\n const numPaddingBytes = numDataBytes - bits.getSizeInBytes();\n for (let i = 0; i < numPaddingBytes; ++i) {\n bits.appendBits((i & 0x01) === 0 ? 0xEC : 0x11, 8);\n }\n if (bits.getSize() !== capacity) {\n throw new WriterException('Bits size does not equal capacity');\n }\n }\n /**\n * Get number of data bytes and number of error correction bytes for block id \"blockID\". Store\n * the result in \"numDataBytesInBlock\", and \"numECBytesInBlock\". See table 12 in 8.5.1 of\n * JISX0510:2004 (p.30)\n */\n static getNumDataBytesAndNumECBytesForBlockID(numTotalBytes /*int*/, numDataBytes /*int*/, numRSBlocks /*int*/, blockID /*int*/, numDataBytesInBlock, numECBytesInBlock) {\n if (blockID >= numRSBlocks) {\n throw new WriterException('Block ID too large');\n }\n // numRsBlocksInGroup2 = 196 % 5 = 1\n const numRsBlocksInGroup2 = numTotalBytes % numRSBlocks;\n // numRsBlocksInGroup1 = 5 - 1 = 4\n const numRsBlocksInGroup1 = numRSBlocks - numRsBlocksInGroup2;\n // numTotalBytesInGroup1 = 196 / 5 = 39\n const numTotalBytesInGroup1 = Math.floor(numTotalBytes / numRSBlocks);\n // numTotalBytesInGroup2 = 39 + 1 = 40\n const numTotalBytesInGroup2 = numTotalBytesInGroup1 + 1;\n // numDataBytesInGroup1 = 66 / 5 = 13\n const numDataBytesInGroup1 = Math.floor(numDataBytes / numRSBlocks);\n // numDataBytesInGroup2 = 13 + 1 = 14\n const numDataBytesInGroup2 = numDataBytesInGroup1 + 1;\n // numEcBytesInGroup1 = 39 - 13 = 26\n const numEcBytesInGroup1 = numTotalBytesInGroup1 - numDataBytesInGroup1;\n // numEcBytesInGroup2 = 40 - 14 = 26\n const numEcBytesInGroup2 = numTotalBytesInGroup2 - numDataBytesInGroup2;\n // Sanity checks.\n // 26 = 26\n if (numEcBytesInGroup1 !== numEcBytesInGroup2) {\n throw new WriterException('EC bytes mismatch');\n }\n // 5 = 4 + 1.\n if (numRSBlocks !== numRsBlocksInGroup1 + numRsBlocksInGroup2) {\n throw new WriterException('RS blocks mismatch');\n }\n // 196 = (13 + 26) * 4 + (14 + 26) * 1\n if (numTotalBytes !== (numDataBytesInGroup1 + numEcBytesInGroup1) * numRsBlocksInGroup1 + (numDataBytesInGroup2 + numEcBytesInGroup2) * numRsBlocksInGroup2) {\n throw new WriterException('Total bytes mismatch');\n }\n if (blockID < numRsBlocksInGroup1) {\n numDataBytesInBlock[0] = numDataBytesInGroup1;\n numECBytesInBlock[0] = numEcBytesInGroup1;\n } else {\n numDataBytesInBlock[0] = numDataBytesInGroup2;\n numECBytesInBlock[0] = numEcBytesInGroup2;\n }\n }\n /**\n * Interleave \"bits\" with corresponding error correction bytes. On success, store the result in\n * \"result\". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details.\n */\n static interleaveWithECBytes(bits, numTotalBytes /*int*/, numDataBytes /*int*/, numRSBlocks /*int*/) {\n // \"bits\" must have \"getNumDataBytes\" bytes of data.\n if (bits.getSizeInBytes() !== numDataBytes) {\n throw new WriterException('Number of bits and data bytes does not match');\n }\n // Step 1. Divide data bytes into blocks and generate error correction bytes for them. We'll\n // store the divided data bytes blocks and error correction bytes blocks into \"blocks\".\n let dataBytesOffset = 0;\n let maxNumDataBytes = 0;\n let maxNumEcBytes = 0;\n // Since, we know the number of reedsolmon blocks, we can initialize the vector with the number.\n const blocks = new Array(); // new Array(numRSBlocks)\n for (let i = 0; i < numRSBlocks; ++i) {\n const numDataBytesInBlock = new Int32Array(1);\n const numEcBytesInBlock = new Int32Array(1);\n Encoder.getNumDataBytesAndNumECBytesForBlockID(numTotalBytes, numDataBytes, numRSBlocks, i, numDataBytesInBlock, numEcBytesInBlock);\n const size = numDataBytesInBlock[0];\n const dataBytes = new Uint8Array(size);\n bits.toBytes(8 * dataBytesOffset, dataBytes, 0, size);\n const ecBytes = Encoder.generateECBytes(dataBytes, numEcBytesInBlock[0]);\n blocks.push(new BlockPair(dataBytes, ecBytes));\n maxNumDataBytes = Math.max(maxNumDataBytes, size);\n maxNumEcBytes = Math.max(maxNumEcBytes, ecBytes.length);\n dataBytesOffset += numDataBytesInBlock[0];\n }\n if (numDataBytes !== dataBytesOffset) {\n throw new WriterException('Data bytes does not match offset');\n }\n const result = new BitArray();\n // First, place data blocks.\n for (let i = 0; i < maxNumDataBytes; ++i) {\n for (const block of blocks) {\n const dataBytes = block.getDataBytes();\n if (i < dataBytes.length) {\n result.appendBits(dataBytes[i], 8);\n }\n }\n }\n // Then, place error correction blocks.\n for (let i = 0; i < maxNumEcBytes; ++i) {\n for (const block of blocks) {\n const ecBytes = block.getErrorCorrectionBytes();\n if (i < ecBytes.length) {\n result.appendBits(ecBytes[i], 8);\n }\n }\n }\n if (numTotalBytes !== result.getSizeInBytes()) {\n // Should be same.\n throw new WriterException('Interleaving error: ' + numTotalBytes + ' and ' + result.getSizeInBytes() + ' differ.');\n }\n return result;\n }\n static generateECBytes(dataBytes, numEcBytesInBlock /*int*/) {\n const numDataBytes = dataBytes.length;\n const toEncode = new Int32Array(numDataBytes + numEcBytesInBlock); // int[numDataBytes + numEcBytesInBlock]\n for (let i = 0; i < numDataBytes; i++) {\n toEncode[i] = dataBytes[i] & 0xFF;\n }\n new ReedSolomonEncoder(GenericGF.QR_CODE_FIELD_256).encode(toEncode, numEcBytesInBlock);\n const ecBytes = new Uint8Array(numEcBytesInBlock);\n for (let i = 0; i < numEcBytesInBlock; i++) {\n ecBytes[i] = /*(byte) */toEncode[numDataBytes + i];\n }\n return ecBytes;\n }\n /**\n * Append mode info. On success, store the result in \"bits\".\n */\n static appendModeInfo(mode, bits) {\n bits.appendBits(mode.getBits(), 4);\n }\n /**\n * Append length info. On success, store the result in \"bits\".\n */\n static appendLengthInfo(numLetters /*int*/, version, mode, bits) {\n const numBits = mode.getCharacterCountBits(version);\n if (numLetters >= 1 << numBits) {\n throw new WriterException(numLetters + ' is bigger than ' + ((1 << numBits) - 1));\n }\n bits.appendBits(numLetters, numBits);\n }\n /**\n * Append \"bytes\" in \"mode\" mode (encoding) into \"bits\". On success, store the result in \"bits\".\n */\n static appendBytes(content, mode, bits, encoding) {\n switch (mode) {\n case Mode$1.NUMERIC:\n Encoder.appendNumericBytes(content, bits);\n break;\n case Mode$1.ALPHANUMERIC:\n Encoder.appendAlphanumericBytes(content, bits);\n break;\n case Mode$1.BYTE:\n Encoder.append8BitBytes(content, bits, encoding);\n break;\n case Mode$1.KANJI:\n Encoder.appendKanjiBytes(content, bits);\n break;\n default:\n throw new WriterException('Invalid mode: ' + mode);\n }\n }\n static getDigit(singleCharacter) {\n return singleCharacter.charCodeAt(0) - 48;\n }\n static isDigit(singleCharacter) {\n const cn = Encoder.getDigit(singleCharacter);\n return cn >= 0 && cn <= 9;\n }\n static appendNumericBytes(content, bits) {\n const length = content.length;\n let i = 0;\n while (i < length) {\n const num1 = Encoder.getDigit(content.charAt(i));\n if (i + 2 < length) {\n // Encode three numeric letters in ten bits.\n const num2 = Encoder.getDigit(content.charAt(i + 1));\n const num3 = Encoder.getDigit(content.charAt(i + 2));\n bits.appendBits(num1 * 100 + num2 * 10 + num3, 10);\n i += 3;\n } else if (i + 1 < length) {\n // Encode two numeric letters in seven bits.\n const num2 = Encoder.getDigit(content.charAt(i + 1));\n bits.appendBits(num1 * 10 + num2, 7);\n i += 2;\n } else {\n // Encode one numeric letter in four bits.\n bits.appendBits(num1, 4);\n i++;\n }\n }\n }\n static appendAlphanumericBytes(content, bits) {\n const length = content.length;\n let i = 0;\n while (i < length) {\n const code1 = Encoder.getAlphanumericCode(content.charCodeAt(i));\n if (code1 === -1) {\n throw new WriterException();\n }\n if (i + 1 < length) {\n const code2 = Encoder.getAlphanumericCode(content.charCodeAt(i + 1));\n if (code2 === -1) {\n throw new WriterException();\n }\n // Encode two alphanumeric letters in 11 bits.\n bits.appendBits(code1 * 45 + code2, 11);\n i += 2;\n } else {\n // Encode one alphanumeric letter in six bits.\n bits.appendBits(code1, 6);\n i++;\n }\n }\n }\n static append8BitBytes(content, bits, encoding) {\n let bytes;\n try {\n bytes = StringEncoding.encode(content, encoding);\n } catch (uee /*: UnsupportedEncodingException*/) {\n throw new WriterException(uee);\n }\n for (let i = 0, length = bytes.length; i !== length; i++) {\n const b = bytes[i];\n bits.appendBits(b, 8);\n }\n }\n /**\n * @throws WriterException\n */\n static appendKanjiBytes(content, bits) {\n let bytes;\n try {\n bytes = StringEncoding.encode(content, CharacterSetECI.SJIS);\n } catch (uee /*: UnsupportedEncodingException*/) {\n throw new WriterException(uee);\n }\n const length = bytes.length;\n for (let i = 0; i < length; i += 2) {\n const byte1 = bytes[i] & 0xFF;\n const byte2 = bytes[i + 1] & 0xFF;\n const code = byte1 << 8 & 0xFFFFFFFF | byte2;\n let subtracted = -1;\n if (code >= 0x8140 && code <= 0x9ffc) {\n subtracted = code - 0x8140;\n } else if (code >= 0xe040 && code <= 0xebbf) {\n subtracted = code - 0xc140;\n }\n if (subtracted === -1) {\n throw new WriterException('Invalid byte sequence');\n }\n const encoded = (subtracted >> 8) * 0xc0 + (subtracted & 0xff);\n bits.appendBits(encoded, 13);\n }\n }\n static appendECI(eci, bits) {\n bits.appendBits(Mode$1.ECI.getBits(), 4);\n // This is correct for values up to 127, which is all we need now.\n bits.appendBits(eci.getValue(), 8);\n }\n }\n // The original table is defined in the table 5 of JISX0510:2004 (p.19).\n Encoder.ALPHANUMERIC_TABLE = Int32Array.from([-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1]);\n Encoder.DEFAULT_BYTE_MODE_ENCODING = CharacterSetECI.UTF8.getName(); // \"ISO-8859-1\"\n\n /**\n * @deprecated Moving to @zxing/browser\n */\n let BrowserQRCodeSvgWriter = /*#__PURE__*/(() => {\n class BrowserQRCodeSvgWriter {\n /**\n * Writes and renders a QRCode SVG element.\n *\n * @param contents\n * @param width\n * @param height\n * @param hints\n */\n write(contents, width, height, hints = null) {\n if (contents.length === 0) {\n throw new IllegalArgumentException('Found empty contents');\n }\n // if (format != BarcodeFormat.QR_CODE) {\n // throw new IllegalArgumentException(\"Can only encode QR_CODE, but got \" + format)\n // }\n if (width < 0 || height < 0) {\n throw new IllegalArgumentException('Requested dimensions are too small: ' + width + 'x' + height);\n }\n let errorCorrectionLevel = ErrorCorrectionLevel.L;\n let quietZone = BrowserQRCodeSvgWriter.QUIET_ZONE_SIZE;\n if (hints !== null) {\n if (undefined !== hints.get(EncodeHintType$1.ERROR_CORRECTION)) {\n errorCorrectionLevel = ErrorCorrectionLevel.fromString(hints.get(EncodeHintType$1.ERROR_CORRECTION).toString());\n }\n if (undefined !== hints.get(EncodeHintType$1.MARGIN)) {\n quietZone = Number.parseInt(hints.get(EncodeHintType$1.MARGIN).toString(), 10);\n }\n }\n const code = Encoder.encode(contents, errorCorrectionLevel, hints);\n return this.renderResult(code, width, height, quietZone);\n }\n /**\n * Renders the result and then appends it to the DOM.\n */\n writeToDom(containerElement, contents, width, height, hints = null) {\n if (typeof containerElement === 'string') {\n containerElement = document.querySelector(containerElement);\n }\n const svgElement = this.write(contents, width, height, hints);\n if (containerElement) containerElement.appendChild(svgElement);\n }\n /**\n * Note that the input matrix uses 0 == white, 1 == black.\n * The output matrix uses 0 == black, 255 == white (i.e. an 8 bit greyscale bitmap).\n */\n renderResult(code, width /*int*/, height /*int*/, quietZone /*int*/) {\n const input = code.getMatrix();\n if (input === null) {\n throw new IllegalStateException();\n }\n const inputWidth = input.getWidth();\n const inputHeight = input.getHeight();\n const qrWidth = inputWidth + quietZone * 2;\n const qrHeight = inputHeight + quietZone * 2;\n const outputWidth = Math.max(width, qrWidth);\n const outputHeight = Math.max(height, qrHeight);\n const multiple = Math.min(Math.floor(outputWidth / qrWidth), Math.floor(outputHeight / qrHeight));\n // Padding includes both the quiet zone and the extra white pixels to accommodate the requested\n // dimensions. For example, if input is 25x25 the QR will be 33x33 including the quiet zone.\n // If the requested size is 200x160, the multiple will be 4, for a QR of 132x132. These will\n // handle all the padding from 100x100 (the actual QR) up to 200x160.\n const leftPadding = Math.floor((outputWidth - inputWidth * multiple) / 2);\n const topPadding = Math.floor((outputHeight - inputHeight * multiple) / 2);\n const svgElement = this.createSVGElement(outputWidth, outputHeight);\n for (let inputY = 0, outputY = topPadding; inputY < inputHeight; inputY++, outputY += multiple) {\n // Write the contents of this row of the barcode\n for (let inputX = 0, outputX = leftPadding; inputX < inputWidth; inputX++, outputX += multiple) {\n if (input.get(inputX, inputY) === 1) {\n const svgRectElement = this.createSvgRectElement(outputX, outputY, multiple, multiple);\n svgElement.appendChild(svgRectElement);\n }\n }\n }\n return svgElement;\n }\n /**\n * Creates a SVG element.\n *\n * @param w SVG's width attribute\n * @param h SVG's height attribute\n */\n createSVGElement(w, h) {\n const svgElement = document.createElementNS(BrowserQRCodeSvgWriter.SVG_NS, 'svg');\n svgElement.setAttributeNS(null, 'height', w.toString());\n svgElement.setAttributeNS(null, 'width', h.toString());\n return svgElement;\n }\n /**\n * Creates a SVG rect element.\n *\n * @param x Element's x coordinate\n * @param y Element's y coordinate\n * @param w Element's width attribute\n * @param h Element's height attribute\n */\n createSvgRectElement(x, y, w, h) {\n const rect = document.createElementNS(BrowserQRCodeSvgWriter.SVG_NS, 'rect');\n rect.setAttributeNS(null, 'x', x.toString());\n rect.setAttributeNS(null, 'y', y.toString());\n rect.setAttributeNS(null, 'height', w.toString());\n rect.setAttributeNS(null, 'width', h.toString());\n rect.setAttributeNS(null, 'fill', '#000000');\n return rect;\n }\n }\n BrowserQRCodeSvgWriter.QUIET_ZONE_SIZE = 4;\n /**\n * SVG markup NameSpace\n */\n BrowserQRCodeSvgWriter.SVG_NS = 'http://www.w3.org/2000/svg';\n\n /*import java.util.Map;*/\n /**\n * This object renders a QR Code as a BitMatrix 2D array of greyscale values.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n */\n return BrowserQRCodeSvgWriter;\n })();\n let QRCodeWriter = /*#__PURE__*/(() => {\n class QRCodeWriter {\n /*@Override*/\n // public encode(contents: string, format: BarcodeFormat, width: number /*int*/, height: number /*int*/): BitMatrix\n // /*throws WriterException */ {\n // return encode(contents, format, width, height, null)\n // }\n /*@Override*/\n encode(contents, format, width /*int*/, height /*int*/, hints) {\n if (contents.length === 0) {\n throw new IllegalArgumentException('Found empty contents');\n }\n if (format !== BarcodeFormat$1.QR_CODE) {\n throw new IllegalArgumentException('Can only encode QR_CODE, but got ' + format);\n }\n if (width < 0 || height < 0) {\n throw new IllegalArgumentException(`Requested dimensions are too small: ${width}x${height}`);\n }\n let errorCorrectionLevel = ErrorCorrectionLevel.L;\n let quietZone = QRCodeWriter.QUIET_ZONE_SIZE;\n if (hints !== null) {\n if (undefined !== hints.get(EncodeHintType$1.ERROR_CORRECTION)) {\n errorCorrectionLevel = ErrorCorrectionLevel.fromString(hints.get(EncodeHintType$1.ERROR_CORRECTION).toString());\n }\n if (undefined !== hints.get(EncodeHintType$1.MARGIN)) {\n quietZone = Number.parseInt(hints.get(EncodeHintType$1.MARGIN).toString(), 10);\n }\n }\n const code = Encoder.encode(contents, errorCorrectionLevel, hints);\n return QRCodeWriter.renderResult(code, width, height, quietZone);\n }\n // Note that the input matrix uses 0 == white, 1 == black, while the output matrix uses\n // 0 == black, 255 == white (i.e. an 8 bit greyscale bitmap).\n static renderResult(code, width /*int*/, height /*int*/, quietZone /*int*/) {\n const input = code.getMatrix();\n if (input === null) {\n throw new IllegalStateException();\n }\n const inputWidth = input.getWidth();\n const inputHeight = input.getHeight();\n const qrWidth = inputWidth + quietZone * 2;\n const qrHeight = inputHeight + quietZone * 2;\n const outputWidth = Math.max(width, qrWidth);\n const outputHeight = Math.max(height, qrHeight);\n const multiple = Math.min(Math.floor(outputWidth / qrWidth), Math.floor(outputHeight / qrHeight));\n // Padding includes both the quiet zone and the extra white pixels to accommodate the requested\n // dimensions. For example, if input is 25x25 the QR will be 33x33 including the quiet zone.\n // If the requested size is 200x160, the multiple will be 4, for a QR of 132x132. These will\n // handle all the padding from 100x100 (the actual QR) up to 200x160.\n const leftPadding = Math.floor((outputWidth - inputWidth * multiple) / 2);\n const topPadding = Math.floor((outputHeight - inputHeight * multiple) / 2);\n const output = new BitMatrix(outputWidth, outputHeight);\n for (let inputY = 0, outputY = topPadding; inputY < inputHeight; inputY++, outputY += multiple) {\n // Write the contents of this row of the barcode\n for (let inputX = 0, outputX = leftPadding; inputX < inputWidth; inputX++, outputX += multiple) {\n if (input.get(inputX, inputY) === 1) {\n output.setRegion(outputX, outputY, multiple, multiple);\n }\n }\n }\n return output;\n }\n }\n QRCodeWriter.QUIET_ZONE_SIZE = 4;\n\n /*import java.util.Map;*/\n /**\n * This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat\n * requested and encodes the barcode with the supplied contents.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n */\n return QRCodeWriter;\n })();\n class MultiFormatWriter {\n /*@Override*/\n // public encode(contents: string,\n // format: BarcodeFormat,\n // width: number /*int*/,\n // height: number /*int*/): BitMatrix /*throws WriterException */ {\n // return encode(contents, format, width, height, null)\n // }\n /*@Override*/\n encode(contents, format, width /*int*/, height /*int*/, hints) {\n let writer;\n switch (format) {\n // case BarcodeFormat.EAN_8:\n // writer = new EAN8Writer()\n // break\n // case BarcodeFormat.UPC_E:\n // writer = new UPCEWriter()\n // break\n // case BarcodeFormat.EAN_13:\n // writer = new EAN13Writer()\n // break\n // case BarcodeFormat.UPC_A:\n // writer = new UPCAWriter()\n // break\n case BarcodeFormat$1.QR_CODE:\n writer = new QRCodeWriter();\n break;\n // case BarcodeFormat.CODE_39:\n // writer = new Code39Writer()\n // break\n // case BarcodeFormat.CODE_93:\n // writer = new Code93Writer()\n // break\n // case BarcodeFormat.CODE_128:\n // writer = new Code128Writer()\n // break\n // case BarcodeFormat.ITF:\n // writer = new ITFWriter()\n // break\n // case BarcodeFormat.PDF_417:\n // writer = new PDF417Writer()\n // break\n // case BarcodeFormat.CODABAR:\n // writer = new CodaBarWriter()\n // break\n // case BarcodeFormat.DATA_MATRIX:\n // writer = new DataMatrixWriter()\n // break\n // case BarcodeFormat.AZTEC:\n // writer = new AztecWriter()\n // break\n default:\n throw new IllegalArgumentException('No encoder available for format ' + format);\n }\n return writer.encode(contents, format, width, height, hints);\n }\n }\n\n /*\n * Copyright 2009 ZXing authors\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 * This object extends LuminanceSource around an array of YUV data returned from the camera driver,\n * with the option to crop to a rectangle within the full data. This can be used to exclude\n * superfluous pixels around the perimeter and speed up decoding.\n *\n * It works for any pixel format where the Y channel is planar and appears first, including\n * YCbCr_420_SP and YCbCr_422_SP.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n */\n let PlanarYUVLuminanceSource = /*#__PURE__*/(() => {\n class PlanarYUVLuminanceSource extends LuminanceSource {\n constructor(yuvData, dataWidth /*int*/, dataHeight /*int*/, left /*int*/, top /*int*/, width /*int*/, height /*int*/, reverseHorizontal) {\n super(width, height);\n this.yuvData = yuvData;\n this.dataWidth = dataWidth;\n this.dataHeight = dataHeight;\n this.left = left;\n this.top = top;\n if (left + width > dataWidth || top + height > dataHeight) {\n throw new IllegalArgumentException('Crop rectangle does not fit within image data.');\n }\n if (reverseHorizontal) {\n this.reverseHorizontal(width, height);\n }\n }\n /*@Override*/\n getRow(y /*int*/, row) {\n if (y < 0 || y >= this.getHeight()) {\n throw new IllegalArgumentException('Requested row is outside the image: ' + y);\n }\n const width = this.getWidth();\n if (row === null || row === undefined || row.length < width) {\n row = new Uint8ClampedArray(width);\n }\n const offset = (y + this.top) * this.dataWidth + this.left;\n System.arraycopy(this.yuvData, offset, row, 0, width);\n return row;\n }\n /*@Override*/\n getMatrix() {\n const width = this.getWidth();\n const height = this.getHeight();\n // If the caller asks for the entire underlying image, save the copy and give them the\n // original data. The docs specifically warn that result.length must be ignored.\n if (width === this.dataWidth && height === this.dataHeight) {\n return this.yuvData;\n }\n const area = width * height;\n const matrix = new Uint8ClampedArray(area);\n let inputOffset = this.top * this.dataWidth + this.left;\n // If the width matches the full width of the underlying data, perform a single copy.\n if (width === this.dataWidth) {\n System.arraycopy(this.yuvData, inputOffset, matrix, 0, area);\n return matrix;\n }\n // Otherwise copy one cropped row at a time.\n for (let y = 0; y < height; y++) {\n const outputOffset = y * width;\n System.arraycopy(this.yuvData, inputOffset, matrix, outputOffset, width);\n inputOffset += this.dataWidth;\n }\n return matrix;\n }\n /*@Override*/\n isCropSupported() {\n return true;\n }\n /*@Override*/\n crop(left /*int*/, top /*int*/, width /*int*/, height /*int*/) {\n return new PlanarYUVLuminanceSource(this.yuvData, this.dataWidth, this.dataHeight, this.left + left, this.top + top, width, height, false);\n }\n renderThumbnail() {\n const width = this.getWidth() / PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;\n const height = this.getHeight() / PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;\n const pixels = new Int32Array(width * height);\n const yuv = this.yuvData;\n let inputOffset = this.top * this.dataWidth + this.left;\n for (let y = 0; y < height; y++) {\n const outputOffset = y * width;\n for (let x = 0; x < width; x++) {\n const grey = yuv[inputOffset + x * PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR] & 0xff;\n pixels[outputOffset + x] = 0xFF000000 | grey * 0x00010101;\n }\n inputOffset += this.dataWidth * PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;\n }\n return pixels;\n }\n /**\n * @return width of image from {@link #renderThumbnail()}\n */\n getThumbnailWidth() {\n return this.getWidth() / PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;\n }\n /**\n * @return height of image from {@link #renderThumbnail()}\n */\n getThumbnailHeight() {\n return this.getHeight() / PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR;\n }\n reverseHorizontal(width /*int*/, height /*int*/) {\n const yuvData = this.yuvData;\n for (let y = 0, rowStart = this.top * this.dataWidth + this.left; y < height; y++, rowStart += this.dataWidth) {\n const middle = rowStart + width / 2;\n for (let x1 = rowStart, x2 = rowStart + width - 1; x1 < middle; x1++, x2--) {\n const temp = yuvData[x1];\n yuvData[x1] = yuvData[x2];\n yuvData[x2] = temp;\n }\n }\n }\n invert() {\n return new InvertedLuminanceSource(this);\n }\n }\n PlanarYUVLuminanceSource.THUMBNAIL_SCALE_FACTOR = 2;\n\n /*\n * Copyright 2009 ZXing authors\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 * This class is used to help decode images from files which arrive as RGB data from\n * an ARGB pixel array. It does not support rotation.\n *\n * @author dswitkin@google.com (Daniel Switkin)\n * @author Betaminos\n */\n return PlanarYUVLuminanceSource;\n })();\n class RGBLuminanceSource extends LuminanceSource {\n constructor(luminances, width /*int*/, height /*int*/, dataWidth /*int*/, dataHeight /*int*/, left /*int*/, top /*int*/) {\n super(width, height);\n this.dataWidth = dataWidth;\n this.dataHeight = dataHeight;\n this.left = left;\n this.top = top;\n if (luminances.BYTES_PER_ELEMENT === 4) {\n // Int32Array\n const size = width * height;\n const luminancesUint8Array = new Uint8ClampedArray(size);\n for (let offset = 0; offset < size; offset++) {\n const pixel = luminances[offset];\n const r = pixel >> 16 & 0xff; // red\n const g2 = pixel >> 7 & 0x1fe; // 2 * green\n const b = pixel & 0xff; // blue\n // Calculate green-favouring average cheaply\n luminancesUint8Array[offset] = /*(byte) */(r + g2 + b) / 4 & 0xFF;\n }\n this.luminances = luminancesUint8Array;\n } else {\n this.luminances = luminances;\n }\n if (undefined === dataWidth) {\n this.dataWidth = width;\n }\n if (undefined === dataHeight) {\n this.dataHeight = height;\n }\n if (undefined === left) {\n this.left = 0;\n }\n if (undefined === top) {\n this.top = 0;\n }\n if (this.left + width > this.dataWidth || this.top + height > this.dataHeight) {\n throw new IllegalArgumentException('Crop rectangle does not fit within image data.');\n }\n }\n /*@Override*/\n getRow(y /*int*/, row) {\n if (y < 0 || y >= this.getHeight()) {\n throw new IllegalArgumentException('Requested row is outside the image: ' + y);\n }\n const width = this.getWidth();\n if (row === null || row === undefined || row.length < width) {\n row = new Uint8ClampedArray(width);\n }\n const offset = (y + this.top) * this.dataWidth + this.left;\n System.arraycopy(this.luminances, offset, row, 0, width);\n return row;\n }\n /*@Override*/\n getMatrix() {\n const width = this.getWidth();\n const height = this.getHeight();\n // If the caller asks for the entire underlying image, save the copy and give them the\n // original data. The docs specifically warn that result.length must be ignored.\n if (width === this.dataWidth && height === this.dataHeight) {\n return this.luminances;\n }\n const area = width * height;\n const matrix = new Uint8ClampedArray(area);\n let inputOffset = this.top * this.dataWidth + this.left;\n // If the width matches the full width of the underlying data, perform a single copy.\n if (width === this.dataWidth) {\n System.arraycopy(this.luminances, inputOffset, matrix, 0, area);\n return matrix;\n }\n // Otherwise copy one cropped row at a time.\n for (let y = 0; y < height; y++) {\n const outputOffset = y * width;\n System.arraycopy(this.luminances, inputOffset, matrix, outputOffset, width);\n inputOffset += this.dataWidth;\n }\n return matrix;\n }\n /*@Override*/\n isCropSupported() {\n return true;\n }\n /*@Override*/\n crop(left /*int*/, top /*int*/, width /*int*/, height /*int*/) {\n return new RGBLuminanceSource(this.luminances, width, height, this.dataWidth, this.dataHeight, this.left + left, this.top + top);\n }\n invert() {\n return new InvertedLuminanceSource(this);\n }\n }\n\n /**\n * Just to make a shortcut between Java code and TS code.\n */\n class Charset extends CharacterSetECI {\n static forName(name) {\n return this.getCharacterSetECIByName(name);\n }\n }\n\n /**\n * Just to make a shortcut between Java code and TS code.\n */\n class StandardCharsets {}\n StandardCharsets.ISO_8859_1 = CharacterSetECI.ISO8859_1;\n\n /*\n * Copyright 2013 ZXing authors\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 * Aztec 2D code representation\n *\n * @author Rustam Abdullaev\n */\n /*public final*/\n class AztecCode {\n /**\n * @return {@code true} if compact instead of full mode\n */\n isCompact() {\n return this.compact;\n }\n setCompact(compact) {\n this.compact = compact;\n }\n /**\n * @return size in pixels (width and height)\n */\n getSize() {\n return this.size;\n }\n setSize(size) {\n this.size = size;\n }\n /**\n * @return number of levels\n */\n getLayers() {\n return this.layers;\n }\n setLayers(layers) {\n this.layers = layers;\n }\n /**\n * @return number of data codewords\n */\n getCodeWords() {\n return this.codeWords;\n }\n setCodeWords(codeWords) {\n this.codeWords = codeWords;\n }\n /**\n * @return the symbol image\n */\n getMatrix() {\n return this.matrix;\n }\n setMatrix(matrix) {\n this.matrix = matrix;\n }\n }\n class Collections {\n /**\n * The singletonList(T) method is used to return an immutable list containing only the specified object.\n */\n static singletonList(item) {\n return [item];\n }\n /**\n * The min(Collection extends T>, Comparator super T>) method is used to return the minimum element of the given collection, according to the order induced by the specified comparator.\n */\n static min(collection, comparator) {\n return collection.sort(comparator)[0];\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\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 class Token {\n constructor(previous) {\n this.previous = previous;\n }\n getPrevious() {\n return this.previous;\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\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 /*final*/\n class SimpleToken extends Token {\n constructor(previous, value, bitCount) {\n super(previous);\n this.value = value;\n this.bitCount = bitCount;\n }\n /**\n * @Override\n */\n appendTo(bitArray, text) {\n bitArray.appendBits(this.value, this.bitCount);\n }\n add(value, bitCount) {\n return new SimpleToken(this, value, bitCount);\n }\n addBinaryShift(start, byteCount) {\n // no-op can't binary shift a simple token\n console.warn('addBinaryShift on SimpleToken, this simply returns a copy of this token');\n return new SimpleToken(this, start, byteCount);\n }\n /**\n * @Override\n */\n toString() {\n let value = this.value & (1 << this.bitCount) - 1;\n value |= 1 << this.bitCount;\n return '<' + Integer.toBinaryString(value | 1 << this.bitCount).substring(1) + '>';\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\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 /*final*/\n class BinaryShiftToken extends SimpleToken {\n constructor(previous, binaryShiftStart, binaryShiftByteCount) {\n super(previous, 0, 0);\n this.binaryShiftStart = binaryShiftStart;\n this.binaryShiftByteCount = binaryShiftByteCount;\n }\n /**\n * @Override\n */\n appendTo(bitArray, text) {\n for (let i = 0; i < this.binaryShiftByteCount; i++) {\n if (i === 0 || i === 31 && this.binaryShiftByteCount <= 62) {\n // We need a header before the first character, and before\n // character 31 when the total byte code is <= 62\n bitArray.appendBits(31, 5); // BINARY_SHIFT\n if (this.binaryShiftByteCount > 62) {\n bitArray.appendBits(this.binaryShiftByteCount - 31, 16);\n } else if (i === 0) {\n // 1 <= binaryShiftByteCode <= 62\n bitArray.appendBits(Math.min(this.binaryShiftByteCount, 31), 5);\n } else {\n // 32 <= binaryShiftCount <= 62 and i == 31\n bitArray.appendBits(this.binaryShiftByteCount - 31, 5);\n }\n }\n bitArray.appendBits(text[this.binaryShiftStart + i], 8);\n }\n }\n addBinaryShift(start, byteCount) {\n // int bitCount = (byteCount * 8) + (byteCount <= 31 ? 10 : byteCount <= 62 ? 20 : 21);\n return new BinaryShiftToken(this, start, byteCount);\n }\n /**\n * @Override\n */\n toString() {\n return '<' + this.binaryShiftStart + '::' + (this.binaryShiftStart + this.binaryShiftByteCount - 1) + '>';\n }\n }\n function addBinaryShift(token, start, byteCount) {\n // int bitCount = (byteCount * 8) + (byteCount <= 31 ? 10 : byteCount <= 62 ? 20 : 21);\n return new BinaryShiftToken(token, start, byteCount);\n }\n function add(token, value, bitCount) {\n return new SimpleToken(token, value, bitCount);\n }\n const /*final*/MODE_NAMES = ['UPPER', 'LOWER', 'DIGIT', 'MIXED', 'PUNCT'];\n const /*final*/MODE_UPPER = 0; // 5 bits\n const /*final*/MODE_LOWER = 1; // 5 bits\n const /*final*/MODE_DIGIT = 2; // 4 bits\n const /*final*/MODE_MIXED = 3; // 5 bits\n const /*final*/MODE_PUNCT = 4; // 5 bits\n const EMPTY_TOKEN = new SimpleToken(null, 0, 0);\n\n // The Latch Table shows, for each pair of Modes, the optimal method for\n // getting from one mode to another. In the worst possible case, this can\n // be up to 14 bits. In the best possible case, we are already there!\n // The high half-word of each entry gives the number of bits.\n // The low half-word of each entry are the actual bits necessary to change\n const LATCH_TABLE = [Int32Array.from([0, (5 << 16) + 28, (5 << 16) + 30, (5 << 16) + 29, (10 << 16) + (29 << 5) + 30 // UPPER -> MIXED -> PUNCT\n ]), Int32Array.from([(9 << 16) + (30 << 4) + 14, 0, (5 << 16) + 30, (5 << 16) + 29, (10 << 16) + (29 << 5) + 30 // LOWER -> MIXED -> PUNCT\n ]), Int32Array.from([(4 << 16) + 14, (9 << 16) + (14 << 5) + 28, 0, (9 << 16) + (14 << 5) + 29, (14 << 16) + (14 << 10) + (29 << 5) + 30\n // DIGIT -> UPPER -> MIXED -> PUNCT\n ]), Int32Array.from([(5 << 16) + 29, (5 << 16) + 28, (10 << 16) + (29 << 5) + 30, 0, (5 << 16) + 30 // MIXED -> PUNCT\n ]), Int32Array.from([(5 << 16) + 31, (10 << 16) + (31 << 5) + 28, (10 << 16) + (31 << 5) + 30, (10 << 16) + (31 << 5) + 29, 0])];\n function static_SHIFT_TABLE(SHIFT_TABLE) {\n for (let table /*Int32Array*/ of SHIFT_TABLE) {\n Arrays.fill(table, -1);\n }\n SHIFT_TABLE[MODE_UPPER][MODE_PUNCT] = 0;\n SHIFT_TABLE[MODE_LOWER][MODE_PUNCT] = 0;\n SHIFT_TABLE[MODE_LOWER][MODE_UPPER] = 28;\n SHIFT_TABLE[MODE_MIXED][MODE_PUNCT] = 0;\n SHIFT_TABLE[MODE_DIGIT][MODE_PUNCT] = 0;\n SHIFT_TABLE[MODE_DIGIT][MODE_UPPER] = 15;\n return SHIFT_TABLE;\n }\n const /*final*/SHIFT_TABLE = static_SHIFT_TABLE(Arrays.createInt32Array(6, 6)); // mode shift codes, per table\n\n /*\n * Copyright 2013 ZXing authors\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 * State represents all information about a sequence necessary to generate the current output.\n * Note that a state is immutable.\n */\n /*final*/\n class State {\n constructor(token, mode, binaryBytes, bitCount) {\n this.token = token;\n this.mode = mode;\n this.binaryShiftByteCount = binaryBytes;\n this.bitCount = bitCount;\n // Make sure we match the token\n // int binaryShiftBitCount = (binaryShiftByteCount * 8) +\n // (binaryShiftByteCount === 0 ? 0 :\n // binaryShiftByteCount <= 31 ? 10 :\n // binaryShiftByteCount <= 62 ? 20 : 21);\n // assert this.bitCount === token.getTotalBitCount() + binaryShiftBitCount;\n }\n\n getMode() {\n return this.mode;\n }\n getToken() {\n return this.token;\n }\n getBinaryShiftByteCount() {\n return this.binaryShiftByteCount;\n }\n getBitCount() {\n return this.bitCount;\n }\n // Create a new state representing this state with a latch to a (not\n // necessary different) mode, and then a code.\n latchAndAppend(mode, value) {\n // assert binaryShiftByteCount === 0;\n let bitCount = this.bitCount;\n let token = this.token;\n if (mode !== this.mode) {\n let latch = LATCH_TABLE[this.mode][mode];\n token = add(token, latch & 0xffff, latch >> 16);\n bitCount += latch >> 16;\n }\n let latchModeBitCount = mode === MODE_DIGIT ? 4 : 5;\n token = add(token, value, latchModeBitCount);\n return new State(token, mode, 0, bitCount + latchModeBitCount);\n }\n // Create a new state representing this state, with a temporary shift\n // to a different mode to output a single value.\n shiftAndAppend(mode, value) {\n // assert binaryShiftByteCount === 0 && this.mode !== mode;\n let token = this.token;\n let thisModeBitCount = this.mode === MODE_DIGIT ? 4 : 5;\n // Shifts exist only to UPPER and PUNCT, both with tokens size 5.\n token = add(token, SHIFT_TABLE[this.mode][mode], thisModeBitCount);\n token = add(token, value, 5);\n return new State(token, this.mode, 0, this.bitCount + thisModeBitCount + 5);\n }\n // Create a new state representing this state, but an additional character\n // output in Binary Shift mode.\n addBinaryShiftChar(index) {\n let token = this.token;\n let mode = this.mode;\n let bitCount = this.bitCount;\n if (this.mode === MODE_PUNCT || this.mode === MODE_DIGIT) {\n // assert binaryShiftByteCount === 0;\n let latch = LATCH_TABLE[mode][MODE_UPPER];\n token = add(token, latch & 0xffff, latch >> 16);\n bitCount += latch >> 16;\n mode = MODE_UPPER;\n }\n let deltaBitCount = this.binaryShiftByteCount === 0 || this.binaryShiftByteCount === 31 ? 18 : this.binaryShiftByteCount === 62 ? 9 : 8;\n let result = new State(token, mode, this.binaryShiftByteCount + 1, bitCount + deltaBitCount);\n if (result.binaryShiftByteCount === 2047 + 31) {\n // The string is as long as it's allowed to be. We should end it.\n result = result.endBinaryShift(index + 1);\n }\n return result;\n }\n // Create the state identical to this one, but we are no longer in\n // Binary Shift mode.\n endBinaryShift(index) {\n if (this.binaryShiftByteCount === 0) {\n return this;\n }\n let token = this.token;\n token = addBinaryShift(token, index - this.binaryShiftByteCount, this.binaryShiftByteCount);\n // assert token.getTotalBitCount() === this.bitCount;\n return new State(token, this.mode, 0, this.bitCount);\n }\n // Returns true if \"this\" state is better (equal: or) to be in than \"that\"\n // state under all possible circumstances.\n isBetterThanOrEqualTo(other) {\n let newModeBitCount = this.bitCount + (LATCH_TABLE[this.mode][other.mode] >> 16);\n if (this.binaryShiftByteCount < other.binaryShiftByteCount) {\n // add additional B/S encoding cost of other, if any\n newModeBitCount += State.calculateBinaryShiftCost(other) - State.calculateBinaryShiftCost(this);\n } else if (this.binaryShiftByteCount > other.binaryShiftByteCount && other.binaryShiftByteCount > 0) {\n // maximum possible additional cost (it: h)\n newModeBitCount += 10;\n }\n return newModeBitCount <= other.bitCount;\n }\n toBitArray(text) {\n // Reverse the tokens, so that they are in the order that they should\n // be output\n let symbols = [];\n for (let token = this.endBinaryShift(text.length).token; token !== null; token = token.getPrevious()) {\n symbols.unshift(token);\n }\n let bitArray = new BitArray();\n // Add each token to the result.\n for (const symbol of symbols) {\n symbol.appendTo(bitArray, text);\n }\n // assert bitArray.getSize() === this.bitCount;\n return bitArray;\n }\n /**\n * @Override\n */\n toString() {\n return StringUtils.format('%s bits=%d bytes=%d', MODE_NAMES[this.mode], this.bitCount, this.binaryShiftByteCount);\n }\n static calculateBinaryShiftCost(state) {\n if (state.binaryShiftByteCount > 62) {\n return 21; // B/S with extended length\n }\n\n if (state.binaryShiftByteCount > 31) {\n return 20; // two B/S\n }\n\n if (state.binaryShiftByteCount > 0) {\n return 10; // one B/S\n }\n\n return 0;\n }\n }\n State.INITIAL_STATE = new State(EMPTY_TOKEN, MODE_UPPER, 0, 0);\n function static_CHAR_MAP(CHAR_MAP) {\n const spaceCharCode = StringUtils.getCharCode(' ');\n const pointCharCode = StringUtils.getCharCode('.');\n const commaCharCode = StringUtils.getCharCode(',');\n CHAR_MAP[MODE_UPPER][spaceCharCode] = 1;\n const zUpperCharCode = StringUtils.getCharCode('Z');\n const aUpperCharCode = StringUtils.getCharCode('A');\n for (let c = aUpperCharCode; c <= zUpperCharCode; c++) {\n CHAR_MAP[MODE_UPPER][c] = c - aUpperCharCode + 2;\n }\n CHAR_MAP[MODE_LOWER][spaceCharCode] = 1;\n const zLowerCharCode = StringUtils.getCharCode('z');\n const aLowerCharCode = StringUtils.getCharCode('a');\n for (let c = aLowerCharCode; c <= zLowerCharCode; c++) {\n CHAR_MAP[MODE_LOWER][c] = c - aLowerCharCode + 2;\n }\n CHAR_MAP[MODE_DIGIT][spaceCharCode] = 1;\n const nineCharCode = StringUtils.getCharCode('9');\n const zeroCharCode = StringUtils.getCharCode('0');\n for (let c = zeroCharCode; c <= nineCharCode; c++) {\n CHAR_MAP[MODE_DIGIT][c] = c - zeroCharCode + 2;\n }\n CHAR_MAP[MODE_DIGIT][commaCharCode] = 12;\n CHAR_MAP[MODE_DIGIT][pointCharCode] = 13;\n const mixedTable = ['\\x00', ' ', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\x07', '\\b', '\\t', '\\n', '\\x0b', '\\f', '\\r', '\\x1b', '\\x1c', '\\x1d', '\\x1e', '\\x1f', '@', '\\\\', '^', '_', '`', '|', '~', '\\x7f'];\n for (let i = 0; i < mixedTable.length; i++) {\n CHAR_MAP[MODE_MIXED][StringUtils.getCharCode(mixedTable[i])] = i;\n }\n const punctTable = ['\\x00', '\\r', '\\x00', '\\x00', '\\x00', '\\x00', '!', '\\'', '#', '$', '%', '&', '\\'', '(', ')', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?', '[', ']', '{', '}'];\n for (let i = 0; i < punctTable.length; i++) {\n if (StringUtils.getCharCode(punctTable[i]) > 0) {\n CHAR_MAP[MODE_PUNCT][StringUtils.getCharCode(punctTable[i])] = i;\n }\n }\n return CHAR_MAP;\n }\n const CHAR_MAP = static_CHAR_MAP(Arrays.createInt32Array(5, 256));\n\n /*\n * Copyright 2013 ZXing authors\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 * This produces nearly optimal encodings of text into the first-level of\n * encoding used by Aztec code.\n *\n * It uses a dynamic algorithm. For each prefix of the string, it determines\n * a set of encodings that could lead to this prefix. We repeatedly add a\n * character and generate a new set of optimal encodings until we have read\n * through the entire input.\n *\n * @author Frank Yellin\n * @author Rustam Abdullaev\n */\n /*public final*/\n class HighLevelEncoder {\n constructor(text) {\n this.text = text;\n }\n /**\n * @return text represented by this encoder encoded as a {@link BitArray}\n */\n encode() {\n const spaceCharCode = StringUtils.getCharCode(' ');\n const lineBreakCharCode = StringUtils.getCharCode('\\n');\n let states = Collections.singletonList(State.INITIAL_STATE);\n for (let index = 0; index < this.text.length; index++) {\n let pairCode;\n let nextChar = index + 1 < this.text.length ? this.text[index + 1] : 0;\n switch (this.text[index]) {\n case StringUtils.getCharCode('\\r'):\n pairCode = nextChar === lineBreakCharCode ? 2 : 0;\n break;\n case StringUtils.getCharCode('.'):\n pairCode = nextChar === spaceCharCode ? 3 : 0;\n break;\n case StringUtils.getCharCode(','):\n pairCode = nextChar === spaceCharCode ? 4 : 0;\n break;\n case StringUtils.getCharCode(':'):\n pairCode = nextChar === spaceCharCode ? 5 : 0;\n break;\n default:\n pairCode = 0;\n }\n if (pairCode > 0) {\n // We have one of the four special PUNCT pairs. Treat them specially.\n // Get a new set of states for the two new characters.\n states = HighLevelEncoder.updateStateListForPair(states, index, pairCode);\n index++;\n } else {\n // Get a new set of states for the new character.\n states = this.updateStateListForChar(states, index);\n }\n }\n // We are left with a set of states. Find the shortest one.\n const minState = Collections.min(states, (a, b) => {\n return a.getBitCount() - b.getBitCount();\n });\n // Convert it to a bit array, and return.\n return minState.toBitArray(this.text);\n }\n // We update a set of states for a new character by updating each state\n // for the new character, merging the results, and then removing the\n // non-optimal states.\n updateStateListForChar(states, index) {\n const result = [];\n for (let state /*State*/ of states) {\n this.updateStateForChar(state, index, result);\n }\n return HighLevelEncoder.simplifyStates(result);\n }\n // Return a set of states that represent the possible ways of updating this\n // state for the next character. The resulting set of states are added to\n // the \"result\" list.\n updateStateForChar(state, index, result) {\n let ch = this.text[index] & 0xff;\n let charInCurrentTable = CHAR_MAP[state.getMode()][ch] > 0;\n let stateNoBinary = null;\n for (let mode /*int*/ = 0; mode <= MODE_PUNCT; mode++) {\n let charInMode = CHAR_MAP[mode][ch];\n if (charInMode > 0) {\n if (stateNoBinary == null) {\n // Only create stateNoBinary the first time it's required.\n stateNoBinary = state.endBinaryShift(index);\n }\n // Try generating the character by latching to its mode\n if (!charInCurrentTable || mode === state.getMode() || mode === MODE_DIGIT) {\n // If the character is in the current table, we don't want to latch to\n // any other mode except possibly digit (which uses only 4 bits). Any\n // other latch would be equally successful *after* this character, and\n // so wouldn't save any bits.\n const latchState = stateNoBinary.latchAndAppend(mode, charInMode);\n result.push(latchState);\n }\n // Try generating the character by switching to its mode.\n if (!charInCurrentTable && SHIFT_TABLE[state.getMode()][mode] >= 0) {\n // It never makes sense to temporarily shift to another mode if the\n // character exists in the current mode. That can never save bits.\n const shiftState = stateNoBinary.shiftAndAppend(mode, charInMode);\n result.push(shiftState);\n }\n }\n }\n if (state.getBinaryShiftByteCount() > 0 || CHAR_MAP[state.getMode()][ch] === 0) {\n // It's never worthwhile to go into binary shift mode if you're not already\n // in binary shift mode, and the character exists in your current mode.\n // That can never save bits over just outputting the char in the current mode.\n let binaryState = state.addBinaryShiftChar(index);\n result.push(binaryState);\n }\n }\n static updateStateListForPair(states, index, pairCode) {\n const result = [];\n for (let state /*State*/ of states) {\n this.updateStateForPair(state, index, pairCode, result);\n }\n return this.simplifyStates(result);\n }\n static updateStateForPair(state, index, pairCode, result) {\n let stateNoBinary = state.endBinaryShift(index);\n // Possibility 1. Latch to C.MODE_PUNCT, and then append this code\n result.push(stateNoBinary.latchAndAppend(MODE_PUNCT, pairCode));\n if (state.getMode() !== MODE_PUNCT) {\n // Possibility 2. Shift to C.MODE_PUNCT, and then append this code.\n // Every state except C.MODE_PUNCT (handled above) can shift\n result.push(stateNoBinary.shiftAndAppend(MODE_PUNCT, pairCode));\n }\n if (pairCode === 3 || pairCode === 4) {\n // both characters are in DIGITS. Sometimes better to just add two digits\n let digitState = stateNoBinary.latchAndAppend(MODE_DIGIT, 16 - pairCode) // period or comma in DIGIT\n .latchAndAppend(MODE_DIGIT, 1); // space in DIGIT\n result.push(digitState);\n }\n if (state.getBinaryShiftByteCount() > 0) {\n // It only makes sense to do the characters as binary if we're already\n // in binary mode.\n let binaryState = state.addBinaryShiftChar(index).addBinaryShiftChar(index + 1);\n result.push(binaryState);\n }\n }\n static simplifyStates(states) {\n let result = [];\n for (const newState of states) {\n let add = true;\n for (const oldState of result) {\n if (oldState.isBetterThanOrEqualTo(newState)) {\n add = false;\n break;\n }\n if (newState.isBetterThanOrEqualTo(oldState)) {\n // iterator.remove();\n result = result.filter(x => x !== oldState); // remove old state\n }\n }\n\n if (add) {\n result.push(newState);\n }\n }\n return result;\n }\n }\n\n /*\n * Copyright 2013 ZXing authors\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 // package com.google.zxing.aztec.encoder;\n // import com.google.zxing.common.BitArray;\n // import com.google.zxing.common.BitMatrix;\n // import com.google.zxing.common.reedsolomon.GenericGF;\n // import com.google.zxing.common.reedsolomon.ReedSolomonEncoder;\n /**\n * Generates Aztec 2D barcodes.\n *\n * @author Rustam Abdullaev\n */\n /*public final*/\n class Encoder$1 {\n constructor() {}\n /**\n * Encodes the given binary content as an Aztec symbol\n *\n * @param data input data string\n * @return Aztec symbol matrix with metadata\n */\n static encodeBytes(data) {\n return Encoder$1.encode(data, Encoder$1.DEFAULT_EC_PERCENT, Encoder$1.DEFAULT_AZTEC_LAYERS);\n }\n /**\n * Encodes the given binary content as an Aztec symbol\n *\n * @param data input data string\n * @param minECCPercent minimal percentage of error check words (According to ISO/IEC 24778:2008,\n * a minimum of 23% + 3 words is recommended)\n * @param userSpecifiedLayers if non-zero, a user-specified value for the number of layers\n * @return Aztec symbol matrix with metadata\n */\n static encode(data, minECCPercent, userSpecifiedLayers) {\n // High-level encode\n let bits = new HighLevelEncoder(data).encode();\n // stuff bits and choose symbol size\n let eccBits = Integer.truncDivision(bits.getSize() * minECCPercent, 100) + 11;\n let totalSizeBits = bits.getSize() + eccBits;\n let compact;\n let layers;\n let totalBitsInLayer;\n let wordSize;\n let stuffedBits;\n if (userSpecifiedLayers !== Encoder$1.DEFAULT_AZTEC_LAYERS) {\n compact = userSpecifiedLayers < 0;\n layers = Math.abs(userSpecifiedLayers);\n if (layers > (compact ? Encoder$1.MAX_NB_BITS_COMPACT : Encoder$1.MAX_NB_BITS)) {\n throw new IllegalArgumentException(StringUtils.format('Illegal value %s for layers', userSpecifiedLayers));\n }\n totalBitsInLayer = Encoder$1.totalBitsInLayer(layers, compact);\n wordSize = Encoder$1.WORD_SIZE[layers];\n let usableBitsInLayers = totalBitsInLayer - totalBitsInLayer % wordSize;\n stuffedBits = Encoder$1.stuffBits(bits, wordSize);\n if (stuffedBits.getSize() + eccBits > usableBitsInLayers) {\n throw new IllegalArgumentException('Data to large for user specified layer');\n }\n if (compact && stuffedBits.getSize() > wordSize * 64) {\n // Compact format only allows 64 data words, though C4 can hold more words than that\n throw new IllegalArgumentException('Data to large for user specified layer');\n }\n } else {\n wordSize = 0;\n stuffedBits = null;\n // We look at the possible table sizes in the order Compact1, Compact2, Compact3,\n // Compact4, Normal4,... Normal(i) for i < 4 isn't typically used since Compact(i+1)\n // is the same size, but has more data.\n for (let i /*int*/ = 0;; i++) {\n if (i > Encoder$1.MAX_NB_BITS) {\n throw new IllegalArgumentException('Data too large for an Aztec code');\n }\n compact = i <= 3;\n layers = compact ? i + 1 : i;\n totalBitsInLayer = Encoder$1.totalBitsInLayer(layers, compact);\n if (totalSizeBits > totalBitsInLayer) {\n continue;\n }\n // [Re]stuff the bits if this is the first opportunity, or if the\n // wordSize has changed\n if (stuffedBits == null || wordSize !== Encoder$1.WORD_SIZE[layers]) {\n wordSize = Encoder$1.WORD_SIZE[layers];\n stuffedBits = Encoder$1.stuffBits(bits, wordSize);\n }\n let usableBitsInLayers = totalBitsInLayer - totalBitsInLayer % wordSize;\n if (compact && stuffedBits.getSize() > wordSize * 64) {\n // Compact format only allows 64 data words, though C4 can hold more words than that\n continue;\n }\n if (stuffedBits.getSize() + eccBits <= usableBitsInLayers) {\n break;\n }\n }\n }\n let messageBits = Encoder$1.generateCheckWords(stuffedBits, totalBitsInLayer, wordSize);\n // generate mode message\n let messageSizeInWords = stuffedBits.getSize() / wordSize;\n let modeMessage = Encoder$1.generateModeMessage(compact, layers, messageSizeInWords);\n // allocate symbol\n let baseMatrixSize = (compact ? 11 : 14) + layers * 4; // not including alignment lines\n let alignmentMap = new Int32Array(baseMatrixSize);\n let matrixSize;\n if (compact) {\n // no alignment marks in compact mode, alignmentMap is a no-op\n matrixSize = baseMatrixSize;\n for (let i /*int*/ = 0; i < alignmentMap.length; i++) {\n alignmentMap[i] = i;\n }\n } else {\n matrixSize = baseMatrixSize + 1 + 2 * Integer.truncDivision(Integer.truncDivision(baseMatrixSize, 2) - 1, 15);\n let origCenter = Integer.truncDivision(baseMatrixSize, 2);\n let center = Integer.truncDivision(matrixSize, 2);\n for (let i /*int*/ = 0; i < origCenter; i++) {\n let newOffset = i + Integer.truncDivision(i, 15);\n alignmentMap[origCenter - i - 1] = center - newOffset - 1;\n alignmentMap[origCenter + i] = center + newOffset + 1;\n }\n }\n let matrix = new BitMatrix(matrixSize);\n // draw data bits\n for (let i /*int*/ = 0, rowOffset = 0; i < layers; i++) {\n let rowSize = (layers - i) * 4 + (compact ? 9 : 12);\n for (let j /*int*/ = 0; j < rowSize; j++) {\n let columnOffset = j * 2;\n for (let k /*int*/ = 0; k < 2; k++) {\n if (messageBits.get(rowOffset + columnOffset + k)) {\n matrix.set(alignmentMap[i * 2 + k], alignmentMap[i * 2 + j]);\n }\n if (messageBits.get(rowOffset + rowSize * 2 + columnOffset + k)) {\n matrix.set(alignmentMap[i * 2 + j], alignmentMap[baseMatrixSize - 1 - i * 2 - k]);\n }\n if (messageBits.get(rowOffset + rowSize * 4 + columnOffset + k)) {\n matrix.set(alignmentMap[baseMatrixSize - 1 - i * 2 - k], alignmentMap[baseMatrixSize - 1 - i * 2 - j]);\n }\n if (messageBits.get(rowOffset + rowSize * 6 + columnOffset + k)) {\n matrix.set(alignmentMap[baseMatrixSize - 1 - i * 2 - j], alignmentMap[i * 2 + k]);\n }\n }\n }\n rowOffset += rowSize * 8;\n }\n // draw mode message\n Encoder$1.drawModeMessage(matrix, compact, matrixSize, modeMessage);\n // draw alignment marks\n if (compact) {\n Encoder$1.drawBullsEye(matrix, Integer.truncDivision(matrixSize, 2), 5);\n } else {\n Encoder$1.drawBullsEye(matrix, Integer.truncDivision(matrixSize, 2), 7);\n for (let i /*int*/ = 0, j = 0; i < Integer.truncDivision(baseMatrixSize, 2) - 1; i += 15, j += 16) {\n for (let k /*int*/ = Integer.truncDivision(matrixSize, 2) & 1; k < matrixSize; k += 2) {\n matrix.set(Integer.truncDivision(matrixSize, 2) - j, k);\n matrix.set(Integer.truncDivision(matrixSize, 2) + j, k);\n matrix.set(k, Integer.truncDivision(matrixSize, 2) - j);\n matrix.set(k, Integer.truncDivision(matrixSize, 2) + j);\n }\n }\n }\n let aztec = new AztecCode();\n aztec.setCompact(compact);\n aztec.setSize(matrixSize);\n aztec.setLayers(layers);\n aztec.setCodeWords(messageSizeInWords);\n aztec.setMatrix(matrix);\n return aztec;\n }\n static drawBullsEye(matrix, center, size) {\n for (let i /*int*/ = 0; i < size; i += 2) {\n for (let j /*int*/ = center - i; j <= center + i; j++) {\n matrix.set(j, center - i);\n matrix.set(j, center + i);\n matrix.set(center - i, j);\n matrix.set(center + i, j);\n }\n }\n matrix.set(center - size, center - size);\n matrix.set(center - size + 1, center - size);\n matrix.set(center - size, center - size + 1);\n matrix.set(center + size, center - size);\n matrix.set(center + size, center - size + 1);\n matrix.set(center + size, center + size - 1);\n }\n static generateModeMessage(compact, layers, messageSizeInWords) {\n let modeMessage = new BitArray();\n if (compact) {\n modeMessage.appendBits(layers - 1, 2);\n modeMessage.appendBits(messageSizeInWords - 1, 6);\n modeMessage = Encoder$1.generateCheckWords(modeMessage, 28, 4);\n } else {\n modeMessage.appendBits(layers - 1, 5);\n modeMessage.appendBits(messageSizeInWords - 1, 11);\n modeMessage = Encoder$1.generateCheckWords(modeMessage, 40, 4);\n }\n return modeMessage;\n }\n static drawModeMessage(matrix, compact, matrixSize, modeMessage) {\n let center = Integer.truncDivision(matrixSize, 2);\n if (compact) {\n for (let i /*int*/ = 0; i < 7; i++) {\n let offset = center - 3 + i;\n if (modeMessage.get(i)) {\n matrix.set(offset, center - 5);\n }\n if (modeMessage.get(i + 7)) {\n matrix.set(center + 5, offset);\n }\n if (modeMessage.get(20 - i)) {\n matrix.set(offset, center + 5);\n }\n if (modeMessage.get(27 - i)) {\n matrix.set(center - 5, offset);\n }\n }\n } else {\n for (let i /*int*/ = 0; i < 10; i++) {\n let offset = center - 5 + i + Integer.truncDivision(i, 5);\n if (modeMessage.get(i)) {\n matrix.set(offset, center - 7);\n }\n if (modeMessage.get(i + 10)) {\n matrix.set(center + 7, offset);\n }\n if (modeMessage.get(29 - i)) {\n matrix.set(offset, center + 7);\n }\n if (modeMessage.get(39 - i)) {\n matrix.set(center - 7, offset);\n }\n }\n }\n }\n static generateCheckWords(bitArray, totalBits, wordSize) {\n // bitArray is guaranteed to be a multiple of the wordSize, so no padding needed\n let messageSizeInWords = bitArray.getSize() / wordSize;\n let rs = new ReedSolomonEncoder(Encoder$1.getGF(wordSize));\n let totalWords = Integer.truncDivision(totalBits, wordSize);\n let messageWords = Encoder$1.bitsToWords(bitArray, wordSize, totalWords);\n rs.encode(messageWords, totalWords - messageSizeInWords);\n let startPad = totalBits % wordSize;\n let messageBits = new BitArray();\n messageBits.appendBits(0, startPad);\n for (const messageWord /*: int*/ of Array.from(messageWords)) {\n messageBits.appendBits(messageWord, wordSize);\n }\n return messageBits;\n }\n static bitsToWords(stuffedBits, wordSize, totalWords) {\n let message = new Int32Array(totalWords);\n let i;\n let n;\n for (i = 0, n = stuffedBits.getSize() / wordSize; i < n; i++) {\n let value = 0;\n for (let j /*int*/ = 0; j < wordSize; j++) {\n value |= stuffedBits.get(i * wordSize + j) ? 1 << wordSize - j - 1 : 0;\n }\n message[i] = value;\n }\n return message;\n }\n static getGF(wordSize) {\n switch (wordSize) {\n case 4:\n return GenericGF.AZTEC_PARAM;\n case 6:\n return GenericGF.AZTEC_DATA_6;\n case 8:\n return GenericGF.AZTEC_DATA_8;\n case 10:\n return GenericGF.AZTEC_DATA_10;\n case 12:\n return GenericGF.AZTEC_DATA_12;\n default:\n throw new IllegalArgumentException('Unsupported word size ' + wordSize);\n }\n }\n static stuffBits(bits, wordSize) {\n let out = new BitArray();\n let n = bits.getSize();\n let mask = (1 << wordSize) - 2;\n for (let i /*int*/ = 0; i < n; i += wordSize) {\n let word = 0;\n for (let j /*int*/ = 0; j < wordSize; j++) {\n if (i + j >= n || bits.get(i + j)) {\n word |= 1 << wordSize - 1 - j;\n }\n }\n if ((word & mask) === mask) {\n out.appendBits(word & mask, wordSize);\n i--;\n } else if ((word & mask) === 0) {\n out.appendBits(word | 1, wordSize);\n i--;\n } else {\n out.appendBits(word, wordSize);\n }\n }\n return out;\n }\n static totalBitsInLayer(layers, compact) {\n return ((compact ? 88 : 112) + 16 * layers) * layers;\n }\n }\n Encoder$1.DEFAULT_EC_PERCENT = 33; // default minimal percentage of error check words\n Encoder$1.DEFAULT_AZTEC_LAYERS = 0;\n Encoder$1.MAX_NB_BITS = 32;\n Encoder$1.MAX_NB_BITS_COMPACT = 4;\n Encoder$1.WORD_SIZE = Int32Array.from([4, 6, 6, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12]);\n\n /*\n * Copyright 2013 ZXing authors\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 * Renders an Aztec code as a {@link BitMatrix}.\n */\n /*public final*/\n class AztecWriter {\n // @Override\n encode(contents, format, width, height) {\n return this.encodeWithHints(contents, format, width, height, null);\n }\n // @Override\n encodeWithHints(contents, format, width, height, hints) {\n let charset = StandardCharsets.ISO_8859_1;\n let eccPercent = Encoder$1.DEFAULT_EC_PERCENT;\n let layers = Encoder$1.DEFAULT_AZTEC_LAYERS;\n if (hints != null) {\n if (hints.has(EncodeHintType$1.CHARACTER_SET)) {\n charset = Charset.forName(hints.get(EncodeHintType$1.CHARACTER_SET).toString());\n }\n if (hints.has(EncodeHintType$1.ERROR_CORRECTION)) {\n eccPercent = Integer.parseInt(hints.get(EncodeHintType$1.ERROR_CORRECTION).toString());\n }\n if (hints.has(EncodeHintType$1.AZTEC_LAYERS)) {\n layers = Integer.parseInt(hints.get(EncodeHintType$1.AZTEC_LAYERS).toString());\n }\n }\n return AztecWriter.encodeLayers(contents, format, width, height, charset, eccPercent, layers);\n }\n static encodeLayers(contents, format, width, height, charset, eccPercent, layers) {\n if (format !== BarcodeFormat$1.AZTEC) {\n throw new IllegalArgumentException('Can only encode AZTEC, but got ' + format);\n }\n let aztec = Encoder$1.encode(StringUtils.getBytes(contents, charset), eccPercent, layers);\n return AztecWriter.renderResult(aztec, width, height);\n }\n static renderResult(code, width, height) {\n let input = code.getMatrix();\n if (input == null) {\n throw new IllegalStateException();\n }\n let inputWidth = input.getWidth();\n let inputHeight = input.getHeight();\n let outputWidth = Math.max(width, inputWidth);\n let outputHeight = Math.max(height, inputHeight);\n let multiple = Math.min(outputWidth / inputWidth, outputHeight / inputHeight);\n let leftPadding = (outputWidth - inputWidth * multiple) / 2;\n let topPadding = (outputHeight - inputHeight * multiple) / 2;\n let output = new BitMatrix(outputWidth, outputHeight);\n for (let inputY /*int*/ = 0, outputY = topPadding; inputY < inputHeight; inputY++, outputY += multiple) {\n // Write the contents of this row of the barcode\n for (let inputX /*int*/ = 0, outputX = leftPadding; inputX < inputWidth; inputX++, outputX += multiple) {\n if (input.get(inputX, inputY)) {\n output.setRegion(outputX, outputY, multiple, multiple);\n }\n }\n }\n return output;\n }\n }\n exports.AbstractExpandedDecoder = AbstractExpandedDecoder;\n exports.ArgumentException = ArgumentException;\n exports.ArithmeticException = ArithmeticException;\n exports.AztecCode = AztecCode;\n exports.AztecCodeReader = AztecReader;\n exports.AztecCodeWriter = AztecWriter;\n exports.AztecDecoder = Decoder;\n exports.AztecDetector = Detector;\n exports.AztecDetectorResult = AztecDetectorResult;\n exports.AztecEncoder = Encoder$1;\n exports.AztecHighLevelEncoder = HighLevelEncoder;\n exports.AztecPoint = Point;\n exports.BarcodeFormat = BarcodeFormat$1;\n exports.Binarizer = Binarizer;\n exports.BinaryBitmap = BinaryBitmap;\n exports.BitArray = BitArray;\n exports.BitMatrix = BitMatrix;\n exports.BitSource = BitSource;\n exports.BrowserAztecCodeReader = BrowserAztecCodeReader;\n exports.BrowserBarcodeReader = BrowserBarcodeReader;\n exports.BrowserCodeReader = BrowserCodeReader;\n exports.BrowserDatamatrixCodeReader = BrowserDatamatrixCodeReader;\n exports.BrowserMultiFormatReader = BrowserMultiFormatReader;\n exports.BrowserPDF417Reader = BrowserPDF417Reader;\n exports.BrowserQRCodeReader = BrowserQRCodeReader;\n exports.BrowserQRCodeSvgWriter = BrowserQRCodeSvgWriter;\n exports.CharacterSetECI = CharacterSetECI;\n exports.ChecksumException = ChecksumException;\n exports.Code128Reader = Code128Reader;\n exports.Code39Reader = Code39Reader;\n exports.DataMatrixDecodedBitStreamParser = DecodedBitStreamParser;\n exports.DataMatrixReader = DataMatrixReader;\n exports.DecodeHintType = DecodeHintType$1;\n exports.DecoderResult = DecoderResult;\n exports.DefaultGridSampler = DefaultGridSampler;\n exports.DetectorResult = DetectorResult;\n exports.EAN13Reader = EAN13Reader;\n exports.EncodeHintType = EncodeHintType$1;\n exports.Exception = Exception;\n exports.FormatException = FormatException;\n exports.GenericGF = GenericGF;\n exports.GenericGFPoly = GenericGFPoly;\n exports.GlobalHistogramBinarizer = GlobalHistogramBinarizer;\n exports.GridSampler = GridSampler;\n exports.GridSamplerInstance = GridSamplerInstance;\n exports.HTMLCanvasElementLuminanceSource = HTMLCanvasElementLuminanceSource;\n exports.HybridBinarizer = HybridBinarizer;\n exports.ITFReader = ITFReader;\n exports.IllegalArgumentException = IllegalArgumentException;\n exports.IllegalStateException = IllegalStateException;\n exports.InvertedLuminanceSource = InvertedLuminanceSource;\n exports.LuminanceSource = LuminanceSource;\n exports.MathUtils = MathUtils;\n exports.MultiFormatOneDReader = MultiFormatOneDReader;\n exports.MultiFormatReader = MultiFormatReader;\n exports.MultiFormatWriter = MultiFormatWriter;\n exports.NotFoundException = NotFoundException;\n exports.OneDReader = OneDReader;\n exports.PDF417DecodedBitStreamParser = DecodedBitStreamParser$2;\n exports.PDF417DecoderErrorCorrection = ErrorCorrection;\n exports.PDF417Reader = PDF417Reader;\n exports.PDF417ResultMetadata = PDF417ResultMetadata;\n exports.PerspectiveTransform = PerspectiveTransform;\n exports.PlanarYUVLuminanceSource = PlanarYUVLuminanceSource;\n exports.QRCodeByteMatrix = ByteMatrix;\n exports.QRCodeDataMask = DataMask;\n exports.QRCodeDecodedBitStreamParser = DecodedBitStreamParser$1;\n exports.QRCodeDecoderErrorCorrectionLevel = ErrorCorrectionLevel;\n exports.QRCodeDecoderFormatInformation = FormatInformation;\n exports.QRCodeEncoder = Encoder;\n exports.QRCodeEncoderQRCode = QRCode;\n exports.QRCodeMaskUtil = MaskUtil;\n exports.QRCodeMatrixUtil = MatrixUtil;\n exports.QRCodeMode = Mode$1;\n exports.QRCodeReader = QRCodeReader;\n exports.QRCodeVersion = Version$1;\n exports.QRCodeWriter = QRCodeWriter;\n exports.RGBLuminanceSource = RGBLuminanceSource;\n exports.RSS14Reader = RSS14Reader;\n exports.RSSExpandedReader = RSSExpandedReader;\n exports.ReaderException = ReaderException;\n exports.ReedSolomonDecoder = ReedSolomonDecoder;\n exports.ReedSolomonEncoder = ReedSolomonEncoder;\n exports.ReedSolomonException = ReedSolomonException;\n exports.Result = Result;\n exports.ResultMetadataType = ResultMetadataType$1;\n exports.ResultPoint = ResultPoint;\n exports.StringUtils = StringUtils;\n exports.UnsupportedOperationException = UnsupportedOperationException;\n exports.VideoInputDevice = VideoInputDevice;\n exports.WhiteRectangleDetector = WhiteRectangleDetector;\n exports.WriterException = WriterException;\n exports.ZXingArrays = Arrays;\n exports.ZXingCharset = Charset;\n exports.ZXingInteger = Integer;\n exports.ZXingStandardCharsets = StandardCharsets;\n exports.ZXingStringBuilder = StringBuilder;\n exports.ZXingStringEncoding = StringEncoding;\n exports.ZXingSystem = System;\n exports.createAbstractExpandedDecoder = createDecoder;\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n});\n","import * as i1$2 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { forwardRef, Directive, Inject, EventEmitter, Optional, Output, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, InjectionToken, TemplateRef, ContentChild, ContentChildren, QueryList, Attribute, NgModule } from '@angular/core';\nimport * as i5 from '@angular/material/core';\nimport { mixinDisabled, mixinColor, mixinDisableRipple, mixinTabIndex, MAT_RIPPLE_GLOBAL_OPTIONS, MatCommonModule, MatRippleModule } from '@angular/material/core';\nimport * as i2 from '@angular/cdk/portal';\nimport { CdkPortalOutlet, CdkPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport * as i5$1 from '@angular/cdk/observers';\nimport { ObserversModule } from '@angular/cdk/observers';\nimport * as i4 from '@angular/cdk/a11y';\nimport { FocusKeyManager, A11yModule } from '@angular/cdk/a11y';\nimport * as i1 from '@angular/cdk/bidi';\nimport { Subscription, Subject, fromEvent, of, merge, EMPTY, Observable, timer, BehaviorSubject } from 'rxjs';\nimport { startWith, distinctUntilChanged, takeUntil, take, switchMap, skip, filter } from 'rxjs/operators';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport * as i1$1 from '@angular/cdk/scrolling';\nimport * as i3 from '@angular/cdk/platform';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport { hasModifierKey, SPACE, ENTER } from '@angular/cdk/keycodes';\n\n/**\n * Animations used by the Material tabs.\n * @docs-private\n */\nfunction MatTabBody_ng_template_2_Template(rf, ctx) {}\nconst _c0 = a0 => ({\n animationDuration: a0\n});\nconst _c1 = (a0, a1) => ({\n value: a0,\n params: a1\n});\nfunction MatTab_ng_template_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojection(0);\n }\n}\nconst _c2 = [\"*\"];\nconst _c3 = [\"tabListContainer\"];\nconst _c4 = [\"tabList\"];\nconst _c5 = [\"tabListInner\"];\nconst _c6 = [\"nextPaginator\"];\nconst _c7 = [\"previousPaginator\"];\nconst _c8 = [\"tabBodyWrapper\"];\nconst _c9 = [\"tabHeader\"];\nfunction MatTabGroup_div_2_ng_template_6_ng_template_0_Template(rf, ctx) {}\nfunction MatTabGroup_div_2_ng_template_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, MatTabGroup_div_2_ng_template_6_ng_template_0_Template, 0, 0, \"ng-template\", 14);\n }\n if (rf & 2) {\n const tab_r4 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵproperty(\"cdkPortalOutlet\", tab_r4.templateLabel);\n }\n}\nfunction MatTabGroup_div_2_ng_template_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0);\n }\n if (rf & 2) {\n const tab_r4 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵtextInterpolate(tab_r4.textLabel);\n }\n}\nfunction MatTabGroup_div_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r14 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 6, 7);\n i0.ɵɵlistener(\"click\", function MatTabGroup_div_2_Template_div_click_0_listener() {\n const restoredCtx = i0.ɵɵrestoreView(_r14);\n const tab_r4 = restoredCtx.$implicit;\n const i_r5 = restoredCtx.index;\n const ctx_r13 = i0.ɵɵnextContext();\n const _r0 = i0.ɵɵreference(1);\n return i0.ɵɵresetView(ctx_r13._handleClick(tab_r4, _r0, i_r5));\n })(\"cdkFocusChange\", function MatTabGroup_div_2_Template_div_cdkFocusChange_0_listener($event) {\n const restoredCtx = i0.ɵɵrestoreView(_r14);\n const i_r5 = restoredCtx.index;\n const ctx_r15 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r15._tabFocusChanged($event, i_r5));\n });\n i0.ɵɵelement(2, \"span\", 8)(3, \"div\", 9);\n i0.ɵɵelementStart(4, \"span\", 10)(5, \"span\", 11);\n i0.ɵɵtemplate(6, MatTabGroup_div_2_ng_template_6_Template, 1, 1, \"ng-template\", 12)(7, MatTabGroup_div_2_ng_template_7_Template, 1, 1, \"ng-template\", null, 13, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n const tab_r4 = ctx.$implicit;\n const i_r5 = ctx.index;\n const _r6 = i0.ɵɵreference(1);\n const _r9 = i0.ɵɵreference(8);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"mdc-tab--active\", ctx_r1.selectedIndex === i_r5);\n i0.ɵɵproperty(\"id\", ctx_r1._getTabLabelId(i_r5))(\"ngClass\", tab_r4.labelClass)(\"disabled\", tab_r4.disabled)(\"fitInkBarToContent\", ctx_r1.fitInkBarToContent);\n i0.ɵɵattribute(\"tabIndex\", ctx_r1._getTabIndex(i_r5))(\"aria-posinset\", i_r5 + 1)(\"aria-setsize\", ctx_r1._tabs.length)(\"aria-controls\", ctx_r1._getTabContentId(i_r5))(\"aria-selected\", ctx_r1.selectedIndex === i_r5)(\"aria-label\", tab_r4.ariaLabel || null)(\"aria-labelledby\", !tab_r4.ariaLabel && tab_r4.ariaLabelledby ? tab_r4.ariaLabelledby : null);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"matRippleTrigger\", _r6)(\"matRippleDisabled\", tab_r4.disabled || ctx_r1.disableRipple);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", tab_r4.templateLabel)(\"ngIfElse\", _r9);\n }\n}\nfunction MatTabGroup_mat_tab_body_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r19 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"mat-tab-body\", 15);\n i0.ɵɵlistener(\"_onCentered\", function MatTabGroup_mat_tab_body_5_Template_mat_tab_body__onCentered_0_listener() {\n i0.ɵɵrestoreView(_r19);\n const ctx_r18 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r18._removeTabBodyWrapperHeight());\n })(\"_onCentering\", function MatTabGroup_mat_tab_body_5_Template_mat_tab_body__onCentering_0_listener($event) {\n i0.ɵɵrestoreView(_r19);\n const ctx_r20 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r20._setTabBodyWrapperHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const tab_r16 = ctx.$implicit;\n const i_r17 = ctx.index;\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"mat-mdc-tab-body-active\", ctx_r3.selectedIndex === i_r17);\n i0.ɵɵproperty(\"id\", ctx_r3._getTabContentId(i_r17))(\"ngClass\", tab_r16.bodyClass)(\"content\", tab_r16.content)(\"position\", tab_r16.position)(\"origin\", tab_r16.origin)(\"animationDuration\", ctx_r3.animationDuration)(\"preserveContent\", ctx_r3.preserveContent);\n i0.ɵɵattribute(\"tabindex\", ctx_r3.contentTabIndex != null && ctx_r3.selectedIndex === i_r17 ? ctx_r3.contentTabIndex : null)(\"aria-labelledby\", ctx_r3._getTabLabelId(i_r17));\n }\n}\nconst _c10 = [\"mat-tab-nav-bar\", \"\"];\nconst _c11 = [\"mat-tab-link\", \"\"];\nconst matTabsAnimations = {\n /** Animation translates a tab along the X axis. */\n translateTab: /*#__PURE__*/trigger('translateTab', [\n /*#__PURE__*/\n // Transitions to `none` instead of 0, because some browsers might blur the content.\n state('center, void, left-origin-center, right-origin-center', /*#__PURE__*/style({\n transform: 'none'\n })),\n /*#__PURE__*/\n // If the tab is either on the left or right, we additionally add a `min-height` of 1px\n // in order to ensure that the element has a height before its state changes. This is\n // necessary because Chrome does seem to skip the transition in RTL mode if the element does\n // not have a static height and is not rendered. See related issue: #9465\n state('left', /*#__PURE__*/style({\n transform: 'translate3d(-100%, 0, 0)',\n minHeight: '1px',\n // Normally this is redundant since we detach the content from the DOM, but if the user\n // opted into keeping the content in the DOM, we have to hide it so it isn't focusable.\n visibility: 'hidden'\n })), /*#__PURE__*/state('right', /*#__PURE__*/style({\n transform: 'translate3d(100%, 0, 0)',\n minHeight: '1px',\n visibility: 'hidden'\n })), /*#__PURE__*/transition('* => left, * => right, left => center, right => center', /*#__PURE__*/animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')), /*#__PURE__*/transition('void => left-origin-center', [/*#__PURE__*/style({\n transform: 'translate3d(-100%, 0, 0)',\n visibility: 'hidden'\n }), /*#__PURE__*/animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')]), /*#__PURE__*/transition('void => right-origin-center', [/*#__PURE__*/style({\n transform: 'translate3d(100%, 0, 0)',\n visibility: 'hidden'\n }), /*#__PURE__*/animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')])])\n};\n\n/**\n * The portal host directive for the contents of the tab.\n * @docs-private\n */\nlet MatTabBodyPortal = /*#__PURE__*/(() => {\n class MatTabBodyPortal extends CdkPortalOutlet {\n constructor(componentFactoryResolver, viewContainerRef, _host, _document) {\n super(componentFactoryResolver, viewContainerRef, _document);\n this._host = _host;\n /** Subscription to events for when the tab body begins centering. */\n this._centeringSub = Subscription.EMPTY;\n /** Subscription to events for when the tab body finishes leaving from center position. */\n this._leavingSub = Subscription.EMPTY;\n }\n /** Set initial visibility or set up subscription for changing visibility. */\n ngOnInit() {\n super.ngOnInit();\n this._centeringSub = this._host._beforeCentering.pipe(startWith(this._host._isCenterPosition(this._host._position))).subscribe(isCentering => {\n if (isCentering && !this.hasAttached()) {\n this.attach(this._host._content);\n }\n });\n this._leavingSub = this._host._afterLeavingCenter.subscribe(() => {\n if (!this._host.preserveContent) {\n this.detach();\n }\n });\n }\n /** Clean up centering subscription. */\n ngOnDestroy() {\n super.ngOnDestroy();\n this._centeringSub.unsubscribe();\n this._leavingSub.unsubscribe();\n }\n static {\n this.ɵfac = function MatTabBodyPortal_Factory(t) {\n return new (t || MatTabBodyPortal)(i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(forwardRef(() => MatTabBody)), i0.ɵɵdirectiveInject(DOCUMENT));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatTabBodyPortal,\n selectors: [[\"\", \"matTabBodyHost\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatTabBodyPortal;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Base class with all of the `MatTabBody` functionality.\n * @docs-private\n */\nlet _MatTabBodyBase = /*#__PURE__*/(() => {\n class _MatTabBodyBase {\n /** The shifted index position of the tab body, where zero represents the active center tab. */\n set position(position) {\n this._positionIndex = position;\n this._computePositionAnimationState();\n }\n constructor(_elementRef, _dir, changeDetectorRef) {\n this._elementRef = _elementRef;\n this._dir = _dir;\n /** Subscription to the directionality change observable. */\n this._dirChangeSubscription = Subscription.EMPTY;\n /** Emits when an animation on the tab is complete. */\n this._translateTabComplete = new Subject();\n /** Event emitted when the tab begins to animate towards the center as the active tab. */\n this._onCentering = new EventEmitter();\n /** Event emitted before the centering of the tab begins. */\n this._beforeCentering = new EventEmitter();\n /** Event emitted before the centering of the tab begins. */\n this._afterLeavingCenter = new EventEmitter();\n /** Event emitted when the tab completes its animation towards the center. */\n this._onCentered = new EventEmitter(true);\n // Note that the default value will always be overwritten by `MatTabBody`, but we need one\n // anyway to prevent the animations module from throwing an error if the body is used on its own.\n /** Duration for the tab's animation. */\n this.animationDuration = '500ms';\n /** Whether the tab's content should be kept in the DOM while it's off-screen. */\n this.preserveContent = false;\n if (_dir) {\n this._dirChangeSubscription = _dir.change.subscribe(dir => {\n this._computePositionAnimationState(dir);\n changeDetectorRef.markForCheck();\n });\n }\n // Ensure that we get unique animation events, because the `.done` callback can get\n // invoked twice in some browsers. See https://github.com/angular/angular/issues/24084.\n this._translateTabComplete.pipe(distinctUntilChanged((x, y) => {\n return x.fromState === y.fromState && x.toState === y.toState;\n })).subscribe(event => {\n // If the transition to the center is complete, emit an event.\n if (this._isCenterPosition(event.toState) && this._isCenterPosition(this._position)) {\n this._onCentered.emit();\n }\n if (this._isCenterPosition(event.fromState) && !this._isCenterPosition(this._position)) {\n this._afterLeavingCenter.emit();\n }\n });\n }\n /**\n * After initialized, check if the content is centered and has an origin. If so, set the\n * special position states that transition the tab from the left or right before centering.\n */\n ngOnInit() {\n if (this._position == 'center' && this.origin != null) {\n this._position = this._computePositionFromOrigin(this.origin);\n }\n }\n ngOnDestroy() {\n this._dirChangeSubscription.unsubscribe();\n this._translateTabComplete.complete();\n }\n _onTranslateTabStarted(event) {\n const isCentering = this._isCenterPosition(event.toState);\n this._beforeCentering.emit(isCentering);\n if (isCentering) {\n this._onCentering.emit(this._elementRef.nativeElement.clientHeight);\n }\n }\n /** The text direction of the containing app. */\n _getLayoutDirection() {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n /** Whether the provided position state is considered center, regardless of origin. */\n _isCenterPosition(position) {\n return position == 'center' || position == 'left-origin-center' || position == 'right-origin-center';\n }\n /** Computes the position state that will be used for the tab-body animation trigger. */\n _computePositionAnimationState(dir = this._getLayoutDirection()) {\n if (this._positionIndex < 0) {\n this._position = dir == 'ltr' ? 'left' : 'right';\n } else if (this._positionIndex > 0) {\n this._position = dir == 'ltr' ? 'right' : 'left';\n } else {\n this._position = 'center';\n }\n }\n /**\n * Computes the position state based on the specified origin position. This is used if the\n * tab is becoming visible immediately after creation.\n */\n _computePositionFromOrigin(origin) {\n const dir = this._getLayoutDirection();\n if (dir == 'ltr' && origin <= 0 || dir == 'rtl' && origin > 0) {\n return 'left-origin-center';\n }\n return 'right-origin-center';\n }\n static {\n this.ɵfac = function _MatTabBodyBase_Factory(t) {\n return new (t || _MatTabBodyBase)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.Directionality, 8), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: _MatTabBodyBase,\n inputs: {\n _content: [\"content\", \"_content\"],\n origin: \"origin\",\n animationDuration: \"animationDuration\",\n preserveContent: \"preserveContent\",\n position: \"position\"\n },\n outputs: {\n _onCentering: \"_onCentering\",\n _beforeCentering: \"_beforeCentering\",\n _afterLeavingCenter: \"_afterLeavingCenter\",\n _onCentered: \"_onCentered\"\n }\n });\n }\n }\n return _MatTabBodyBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Wrapper for the contents of a tab.\n * @docs-private\n */\nlet MatTabBody = /*#__PURE__*/(() => {\n class MatTabBody extends _MatTabBodyBase {\n constructor(elementRef, dir, changeDetectorRef) {\n super(elementRef, dir, changeDetectorRef);\n }\n static {\n this.ɵfac = function MatTabBody_Factory(t) {\n return new (t || MatTabBody)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.Directionality, 8), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTabBody,\n selectors: [[\"mat-tab-body\"]],\n viewQuery: function MatTabBody_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(CdkPortalOutlet, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._portalHost = _t.first);\n }\n },\n hostAttrs: [1, \"mat-mdc-tab-body\"],\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 3,\n vars: 6,\n consts: [[\"cdkScrollable\", \"\", 1, \"mat-mdc-tab-body-content\"], [\"content\", \"\"], [\"matTabBodyHost\", \"\"]],\n template: function MatTabBody_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0, 1);\n i0.ɵɵlistener(\"@translateTab.start\", function MatTabBody_Template_div_animation_translateTab_start_0_listener($event) {\n return ctx._onTranslateTabStarted($event);\n })(\"@translateTab.done\", function MatTabBody_Template_div_animation_translateTab_done_0_listener($event) {\n return ctx._translateTabComplete.next($event);\n });\n i0.ɵɵtemplate(2, MatTabBody_ng_template_2_Template, 0, 0, \"ng-template\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"@translateTab\", i0.ɵɵpureFunction2(3, _c1, ctx._position, i0.ɵɵpureFunction1(1, _c0, ctx.animationDuration)));\n }\n },\n dependencies: [MatTabBodyPortal],\n styles: [\".mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-mdc-tab-body-content[style*=\\\"visibility: hidden\\\"]{display:none}\"],\n encapsulation: 2,\n data: {\n animation: [matTabsAnimations.translateTab]\n }\n });\n }\n }\n return MatTabBody;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `MatTabContent`. It serves as\n * alternative token to the actual `MatTabContent` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_TAB_CONTENT = /*#__PURE__*/new InjectionToken('MatTabContent');\n/** Decorates the `ng-template` tags and reads out the template from it. */\nlet MatTabContent = /*#__PURE__*/(() => {\n class MatTabContent {\n constructor( /** Content for the tab. */template) {\n this.template = template;\n }\n static {\n this.ɵfac = function MatTabContent_Factory(t) {\n return new (t || MatTabContent)(i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatTabContent,\n selectors: [[\"\", \"matTabContent\", \"\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: MAT_TAB_CONTENT,\n useExisting: MatTabContent\n }])]\n });\n }\n }\n return MatTabContent;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `MatTabLabel`. It serves as\n * alternative token to the actual `MatTabLabel` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_TAB_LABEL = /*#__PURE__*/new InjectionToken('MatTabLabel');\n/**\n * Used to provide a tab label to a tab without causing a circular dependency.\n * @docs-private\n */\nconst MAT_TAB = /*#__PURE__*/new InjectionToken('MAT_TAB');\n/** Used to flag tab labels for use with the portal directive */\nlet MatTabLabel = /*#__PURE__*/(() => {\n class MatTabLabel extends CdkPortal {\n constructor(templateRef, viewContainerRef, _closestTab) {\n super(templateRef, viewContainerRef);\n this._closestTab = _closestTab;\n }\n static {\n this.ɵfac = function MatTabLabel_Factory(t) {\n return new (t || MatTabLabel)(i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(MAT_TAB, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatTabLabel,\n selectors: [[\"\", \"mat-tab-label\", \"\"], [\"\", \"matTabLabel\", \"\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: MAT_TAB_LABEL,\n useExisting: MatTabLabel\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatTabLabel;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Class that is applied when a tab indicator is active. */\nconst ACTIVE_CLASS = 'mdc-tab-indicator--active';\n/** Class that is applied when the tab indicator should not transition. */\nconst NO_TRANSITION_CLASS = 'mdc-tab-indicator--no-transition';\n/**\n * Abstraction around the MDC tab indicator that acts as the tab header's ink bar.\n * @docs-private\n */\nclass MatInkBar {\n constructor(_items) {\n this._items = _items;\n }\n /** Hides the ink bar. */\n hide() {\n this._items.forEach(item => item.deactivateInkBar());\n }\n /** Aligns the ink bar to a DOM node. */\n alignToElement(element) {\n const correspondingItem = this._items.find(item => item.elementRef.nativeElement === element);\n const currentItem = this._currentItem;\n currentItem?.deactivateInkBar();\n if (correspondingItem) {\n const clientRect = currentItem?.elementRef.nativeElement.getBoundingClientRect?.();\n // The ink bar won't animate unless we give it the `ClientRect` of the previous item.\n correspondingItem.activateInkBar(clientRect);\n this._currentItem = correspondingItem;\n }\n }\n}\n/**\n * Mixin that can be used to apply the `MatInkBarItem` behavior to a class.\n * Base on MDC's `MDCSlidingTabIndicatorFoundation`:\n * https://github.com/material-components/material-components-web/blob/c0a11ef0d000a098fd0c372be8f12d6a99302855/packages/mdc-tab-indicator/sliding-foundation.ts\n * @docs-private\n */\nfunction mixinInkBarItem(base) {\n return class extends base {\n constructor(...args) {\n super(...args);\n this._fitToContent = false;\n }\n /** Whether the ink bar should fit to the entire tab or just its content. */\n get fitInkBarToContent() {\n return this._fitToContent;\n }\n set fitInkBarToContent(v) {\n const newValue = coerceBooleanProperty(v);\n if (this._fitToContent !== newValue) {\n this._fitToContent = newValue;\n if (this._inkBarElement) {\n this._appendInkBarElement();\n }\n }\n }\n /** Aligns the ink bar to the current item. */\n activateInkBar(previousIndicatorClientRect) {\n const element = this.elementRef.nativeElement;\n // Early exit if no indicator is present to handle cases where an indicator\n // may be activated without a prior indicator state\n if (!previousIndicatorClientRect || !element.getBoundingClientRect || !this._inkBarContentElement) {\n element.classList.add(ACTIVE_CLASS);\n return;\n }\n // This animation uses the FLIP approach. You can read more about it at the link below:\n // https://aerotwist.com/blog/flip-your-animations/\n // Calculate the dimensions based on the dimensions of the previous indicator\n const currentClientRect = element.getBoundingClientRect();\n const widthDelta = previousIndicatorClientRect.width / currentClientRect.width;\n const xPosition = previousIndicatorClientRect.left - currentClientRect.left;\n element.classList.add(NO_TRANSITION_CLASS);\n this._inkBarContentElement.style.setProperty('transform', `translateX(${xPosition}px) scaleX(${widthDelta})`);\n // Force repaint before updating classes and transform to ensure the transform properly takes effect\n element.getBoundingClientRect();\n element.classList.remove(NO_TRANSITION_CLASS);\n element.classList.add(ACTIVE_CLASS);\n this._inkBarContentElement.style.setProperty('transform', '');\n }\n /** Removes the ink bar from the current item. */\n deactivateInkBar() {\n this.elementRef.nativeElement.classList.remove(ACTIVE_CLASS);\n }\n /** Initializes the foundation. */\n ngOnInit() {\n this._createInkBarElement();\n }\n /** Destroys the foundation. */\n ngOnDestroy() {\n this._inkBarElement?.remove();\n this._inkBarElement = this._inkBarContentElement = null;\n }\n /** Creates and appends the ink bar element. */\n _createInkBarElement() {\n const documentNode = this.elementRef.nativeElement.ownerDocument || document;\n this._inkBarElement = documentNode.createElement('span');\n this._inkBarContentElement = documentNode.createElement('span');\n this._inkBarElement.className = 'mdc-tab-indicator';\n this._inkBarContentElement.className = 'mdc-tab-indicator__content mdc-tab-indicator__content--underline';\n this._inkBarElement.appendChild(this._inkBarContentElement);\n this._appendInkBarElement();\n }\n /**\n * Appends the ink bar to the tab host element or content, depending on whether\n * the ink bar should fit to content.\n */\n _appendInkBarElement() {\n if (!this._inkBarElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Ink bar element has not been created and cannot be appended');\n }\n const parentElement = this._fitToContent ? this.elementRef.nativeElement.querySelector('.mdc-tab__content') : this.elementRef.nativeElement;\n if (!parentElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Missing element to host the ink bar');\n }\n parentElement.appendChild(this._inkBarElement);\n }\n };\n}\n/**\n * The default positioner function for the MatInkBar.\n * @docs-private\n */\nfunction _MAT_INK_BAR_POSITIONER_FACTORY() {\n const method = element => ({\n left: element ? (element.offsetLeft || 0) + 'px' : '0',\n width: element ? (element.offsetWidth || 0) + 'px' : '0'\n });\n return method;\n}\n/** Injection token for the MatInkBar's Positioner. */\nconst _MAT_INK_BAR_POSITIONER = /*#__PURE__*/new InjectionToken('MatInkBarPositioner', {\n providedIn: 'root',\n factory: _MAT_INK_BAR_POSITIONER_FACTORY\n});\n\n// Boilerplate for applying mixins to MatTabLabelWrapper.\n/** @docs-private */\nconst _MatTabLabelWrapperMixinBase = /*#__PURE__*/mixinDisabled(class {});\n/**\n * Used in the `mat-tab-group` view to display tab labels.\n * @docs-private\n */\nlet _MatTabLabelWrapperBase = /*#__PURE__*/(() => {\n class _MatTabLabelWrapperBase extends _MatTabLabelWrapperMixinBase {\n constructor(elementRef) {\n super();\n this.elementRef = elementRef;\n }\n /** Sets focus on the wrapper element */\n focus() {\n this.elementRef.nativeElement.focus();\n }\n getOffsetLeft() {\n return this.elementRef.nativeElement.offsetLeft;\n }\n getOffsetWidth() {\n return this.elementRef.nativeElement.offsetWidth;\n }\n static {\n this.ɵfac = function _MatTabLabelWrapperBase_Factory(t) {\n return new (t || _MatTabLabelWrapperBase)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: _MatTabLabelWrapperBase,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return _MatTabLabelWrapperBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst _MatTabLabelWrapperBaseWithInkBarItem = /*#__PURE__*/mixinInkBarItem(_MatTabLabelWrapperBase);\n/**\n * Used in the `mat-tab-group` view to display tab labels.\n * @docs-private\n */\nlet MatTabLabelWrapper = /*#__PURE__*/(() => {\n class MatTabLabelWrapper extends _MatTabLabelWrapperBaseWithInkBarItem {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatTabLabelWrapper_BaseFactory;\n return function MatTabLabelWrapper_Factory(t) {\n return (ɵMatTabLabelWrapper_BaseFactory || (ɵMatTabLabelWrapper_BaseFactory = i0.ɵɵgetInheritedFactory(MatTabLabelWrapper)))(t || MatTabLabelWrapper);\n };\n })();\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatTabLabelWrapper,\n selectors: [[\"\", \"matTabLabelWrapper\", \"\"]],\n hostVars: 3,\n hostBindings: function MatTabLabelWrapper_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-disabled\", !!ctx.disabled);\n i0.ɵɵclassProp(\"mat-mdc-tab-disabled\", ctx.disabled);\n }\n },\n inputs: {\n disabled: \"disabled\",\n fitInkBarToContent: \"fitInkBarToContent\"\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatTabLabelWrapper;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// Boilerplate for applying mixins to MatTab.\n/** @docs-private */\nconst _MatTabMixinBase = /*#__PURE__*/mixinDisabled(class {});\n/**\n * Used to provide a tab group to a tab without causing a circular dependency.\n * @docs-private\n */\nconst MAT_TAB_GROUP = /*#__PURE__*/new InjectionToken('MAT_TAB_GROUP');\n/** @docs-private */\nlet _MatTabBase = /*#__PURE__*/(() => {\n class _MatTabBase extends _MatTabMixinBase {\n /** @docs-private */\n get content() {\n return this._contentPortal;\n }\n constructor(_viewContainerRef, _closestTabGroup) {\n super();\n this._viewContainerRef = _viewContainerRef;\n this._closestTabGroup = _closestTabGroup;\n /** Plain text label for the tab, used when there is no template label. */\n this.textLabel = '';\n /** Portal that will be the hosted content of the tab */\n this._contentPortal = null;\n /** Emits whenever the internal state of the tab changes. */\n this._stateChanges = new Subject();\n /**\n * The relatively indexed position where 0 represents the center, negative is left, and positive\n * represents the right.\n */\n this.position = null;\n /**\n * The initial relatively index origin of the tab if it was created and selected after there\n * was already a selected tab. Provides context of what position the tab should originate from.\n */\n this.origin = null;\n /**\n * Whether the tab is currently active.\n */\n this.isActive = false;\n }\n ngOnChanges(changes) {\n if (changes.hasOwnProperty('textLabel') || changes.hasOwnProperty('disabled')) {\n this._stateChanges.next();\n }\n }\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n ngOnInit() {\n this._contentPortal = new TemplatePortal(this._explicitContent || this._implicitContent, this._viewContainerRef);\n }\n /**\n * This has been extracted to a util because of TS 4 and VE.\n * View Engine doesn't support property rename inheritance.\n * TS 4.0 doesn't allow properties to override accessors or vice-versa.\n * @docs-private\n */\n _setTemplateLabelInput(value) {\n // Only update the label if the query managed to find one. This works around an issue where a\n // user may have manually set `templateLabel` during creation mode, which would then get\n // clobbered by `undefined` when the query resolves. Also note that we check that the closest\n // tab matches the current one so that we don't pick up labels from nested tabs.\n if (value && value._closestTab === this) {\n this._templateLabel = value;\n }\n }\n static {\n this.ɵfac = function _MatTabBase_Factory(t) {\n return new (t || _MatTabBase)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(MAT_TAB_GROUP, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: _MatTabBase,\n viewQuery: function _MatTabBase_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(TemplateRef, 7);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._implicitContent = _t.first);\n }\n },\n inputs: {\n textLabel: [\"label\", \"textLabel\"],\n ariaLabel: [\"aria-label\", \"ariaLabel\"],\n ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"],\n labelClass: \"labelClass\",\n bodyClass: \"bodyClass\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return _MatTabBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatTab = /*#__PURE__*/(() => {\n class MatTab extends _MatTabBase {\n constructor() {\n super(...arguments);\n /**\n * Template provided in the tab content that will be used if present, used to enable lazy-loading\n */\n this._explicitContent = undefined;\n }\n /** Content for the tab label given by ``. */\n get templateLabel() {\n return this._templateLabel;\n }\n set templateLabel(value) {\n this._setTemplateLabelInput(value);\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatTab_BaseFactory;\n return function MatTab_Factory(t) {\n return (ɵMatTab_BaseFactory || (ɵMatTab_BaseFactory = i0.ɵɵgetInheritedFactory(MatTab)))(t || MatTab);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTab,\n selectors: [[\"mat-tab\"]],\n contentQueries: function MatTab_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatTabContent, 7, TemplateRef);\n i0.ɵɵcontentQuery(dirIndex, MatTabLabel, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._explicitContent = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templateLabel = _t.first);\n }\n },\n inputs: {\n disabled: \"disabled\"\n },\n exportAs: [\"matTab\"],\n features: [i0.ɵɵProvidersFeature([{\n provide: MAT_TAB,\n useExisting: MatTab\n }]), i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c2,\n decls: 1,\n vars: 0,\n template: function MatTab_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, MatTab_ng_template_0_Template, 1, 0, \"ng-template\");\n }\n },\n encapsulation: 2\n });\n }\n }\n return MatTab;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Config used to bind passive event listeners */\nconst passiveEventListenerOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: true\n});\n/**\n * Amount of milliseconds to wait before starting to scroll the header automatically.\n * Set a little conservatively in order to handle fake events dispatched on touch devices.\n */\nconst HEADER_SCROLL_DELAY = 650;\n/**\n * Interval in milliseconds at which to scroll the header\n * while the user is holding their pointer.\n */\nconst HEADER_SCROLL_INTERVAL = 100;\n/**\n * Base class for a tab header that supported pagination.\n * @docs-private\n */\nlet MatPaginatedTabHeader = /*#__PURE__*/(() => {\n class MatPaginatedTabHeader {\n /**\n * Whether pagination should be disabled. This can be used to avoid unnecessary\n * layout recalculations if it's known that pagination won't be required.\n */\n get disablePagination() {\n return this._disablePagination;\n }\n set disablePagination(value) {\n this._disablePagination = coerceBooleanProperty(value);\n }\n /** The index of the active tab. */\n get selectedIndex() {\n return this._selectedIndex;\n }\n set selectedIndex(value) {\n value = coerceNumberProperty(value);\n if (this._selectedIndex != value) {\n this._selectedIndexChanged = true;\n this._selectedIndex = value;\n if (this._keyManager) {\n this._keyManager.updateActiveItem(value);\n }\n }\n }\n constructor(_elementRef, _changeDetectorRef, _viewportRuler, _dir, _ngZone, _platform, _animationMode) {\n this._elementRef = _elementRef;\n this._changeDetectorRef = _changeDetectorRef;\n this._viewportRuler = _viewportRuler;\n this._dir = _dir;\n this._ngZone = _ngZone;\n this._platform = _platform;\n this._animationMode = _animationMode;\n /** The distance in pixels that the tab labels should be translated to the left. */\n this._scrollDistance = 0;\n /** Whether the header should scroll to the selected index after the view has been checked. */\n this._selectedIndexChanged = false;\n /** Emits when the component is destroyed. */\n this._destroyed = new Subject();\n /** Whether the controls for pagination should be displayed */\n this._showPaginationControls = false;\n /** Whether the tab list can be scrolled more towards the end of the tab label list. */\n this._disableScrollAfter = true;\n /** Whether the tab list can be scrolled more towards the beginning of the tab label list. */\n this._disableScrollBefore = true;\n /** Stream that will stop the automated scrolling. */\n this._stopScrolling = new Subject();\n this._disablePagination = false;\n this._selectedIndex = 0;\n /** Event emitted when the option is selected. */\n this.selectFocusedIndex = new EventEmitter();\n /** Event emitted when a label is focused. */\n this.indexFocused = new EventEmitter();\n // Bind the `mouseleave` event on the outside since it doesn't change anything in the view.\n _ngZone.runOutsideAngular(() => {\n fromEvent(_elementRef.nativeElement, 'mouseleave').pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._stopInterval();\n });\n });\n }\n ngAfterViewInit() {\n // We need to handle these events manually, because we want to bind passive event listeners.\n fromEvent(this._previousPaginator.nativeElement, 'touchstart', passiveEventListenerOptions).pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._handlePaginatorPress('before');\n });\n fromEvent(this._nextPaginator.nativeElement, 'touchstart', passiveEventListenerOptions).pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._handlePaginatorPress('after');\n });\n }\n ngAfterContentInit() {\n const dirChange = this._dir ? this._dir.change : of('ltr');\n const resize = this._viewportRuler.change(150);\n const realign = () => {\n this.updatePagination();\n this._alignInkBarToSelectedTab();\n };\n this._keyManager = new FocusKeyManager(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap()\n // Allow focus to land on disabled tabs, as per https://w3c.github.io/aria-practices/#kbd_disabled_controls\n .skipPredicate(() => false);\n this._keyManager.updateActiveItem(this._selectedIndex);\n // Defer the first call in order to allow for slower browsers to lay out the elements.\n // This helps in cases where the user lands directly on a page with paginated tabs.\n // Note that we use `onStable` instead of `requestAnimationFrame`, because the latter\n // can hold up tests that are in a background tab.\n this._ngZone.onStable.pipe(take(1)).subscribe(realign);\n // On dir change or window resize, realign the ink bar and update the orientation of\n // the key manager if the direction has changed.\n merge(dirChange, resize, this._items.changes, this._itemsResized()).pipe(takeUntil(this._destroyed)).subscribe(() => {\n // We need to defer this to give the browser some time to recalculate\n // the element dimensions. The call has to be wrapped in `NgZone.run`,\n // because the viewport change handler runs outside of Angular.\n this._ngZone.run(() => {\n Promise.resolve().then(() => {\n // Clamp the scroll distance, because it can change with the number of tabs.\n this._scrollDistance = Math.max(0, Math.min(this._getMaxScrollDistance(), this._scrollDistance));\n realign();\n });\n });\n this._keyManager.withHorizontalOrientation(this._getLayoutDirection());\n });\n // If there is a change in the focus key manager we need to emit the `indexFocused`\n // event in order to provide a public event that notifies about focus changes. Also we realign\n // the tabs container by scrolling the new focused tab into the visible section.\n this._keyManager.change.subscribe(newFocusIndex => {\n this.indexFocused.emit(newFocusIndex);\n this._setTabFocus(newFocusIndex);\n });\n }\n /** Sends any changes that could affect the layout of the items. */\n _itemsResized() {\n if (typeof ResizeObserver !== 'function') {\n return EMPTY;\n }\n return this._items.changes.pipe(startWith(this._items), switchMap(tabItems => new Observable(observer => this._ngZone.runOutsideAngular(() => {\n const resizeObserver = new ResizeObserver(entries => observer.next(entries));\n tabItems.forEach(item => resizeObserver.observe(item.elementRef.nativeElement));\n return () => {\n resizeObserver.disconnect();\n };\n }))),\n // Skip the first emit since the resize observer emits when an item\n // is observed for new items when the tab is already inserted\n skip(1),\n // Skip emissions where all the elements are invisible since we don't want\n // the header to try and re-render with invalid measurements. See #25574.\n filter(entries => entries.some(e => e.contentRect.width > 0 && e.contentRect.height > 0)));\n }\n ngAfterContentChecked() {\n // If the number of tab labels have changed, check if scrolling should be enabled\n if (this._tabLabelCount != this._items.length) {\n this.updatePagination();\n this._tabLabelCount = this._items.length;\n this._changeDetectorRef.markForCheck();\n }\n // If the selected index has changed, scroll to the label and check if the scrolling controls\n // should be disabled.\n if (this._selectedIndexChanged) {\n this._scrollToLabel(this._selectedIndex);\n this._checkScrollingControls();\n this._alignInkBarToSelectedTab();\n this._selectedIndexChanged = false;\n this._changeDetectorRef.markForCheck();\n }\n // If the scroll distance has been changed (tab selected, focused, scroll controls activated),\n // then translate the header to reflect this.\n if (this._scrollDistanceChanged) {\n this._updateTabScrollPosition();\n this._scrollDistanceChanged = false;\n this._changeDetectorRef.markForCheck();\n }\n }\n ngOnDestroy() {\n this._keyManager?.destroy();\n this._destroyed.next();\n this._destroyed.complete();\n this._stopScrolling.complete();\n }\n /** Handles keyboard events on the header. */\n _handleKeydown(event) {\n // We don't handle any key bindings with a modifier key.\n if (hasModifierKey(event)) {\n return;\n }\n switch (event.keyCode) {\n case ENTER:\n case SPACE:\n if (this.focusIndex !== this.selectedIndex) {\n const item = this._items.get(this.focusIndex);\n if (item && !item.disabled) {\n this.selectFocusedIndex.emit(this.focusIndex);\n this._itemSelected(event);\n }\n }\n break;\n default:\n this._keyManager.onKeydown(event);\n }\n }\n /**\n * Callback for when the MutationObserver detects that the content has changed.\n */\n _onContentChanges() {\n const textContent = this._elementRef.nativeElement.textContent;\n // We need to diff the text content of the header, because the MutationObserver callback\n // will fire even if the text content didn't change which is inefficient and is prone\n // to infinite loops if a poorly constructed expression is passed in (see #14249).\n if (textContent !== this._currentTextContent) {\n this._currentTextContent = textContent || '';\n // The content observer runs outside the `NgZone` by default, which\n // means that we need to bring the callback back in ourselves.\n this._ngZone.run(() => {\n this.updatePagination();\n this._alignInkBarToSelectedTab();\n this._changeDetectorRef.markForCheck();\n });\n }\n }\n /**\n * Updates the view whether pagination should be enabled or not.\n *\n * WARNING: Calling this method can be very costly in terms of performance. It should be called\n * as infrequently as possible from outside of the Tabs component as it causes a reflow of the\n * page.\n */\n updatePagination() {\n this._checkPaginationEnabled();\n this._checkScrollingControls();\n this._updateTabScrollPosition();\n }\n /** Tracks which element has focus; used for keyboard navigation */\n get focusIndex() {\n return this._keyManager ? this._keyManager.activeItemIndex : 0;\n }\n /** When the focus index is set, we must manually send focus to the correct label */\n set focusIndex(value) {\n if (!this._isValidIndex(value) || this.focusIndex === value || !this._keyManager) {\n return;\n }\n this._keyManager.setActiveItem(value);\n }\n /**\n * Determines if an index is valid. If the tabs are not ready yet, we assume that the user is\n * providing a valid index and return true.\n */\n _isValidIndex(index) {\n return this._items ? !!this._items.toArray()[index] : true;\n }\n /**\n * Sets focus on the HTML element for the label wrapper and scrolls it into the view if\n * scrolling is enabled.\n */\n _setTabFocus(tabIndex) {\n if (this._showPaginationControls) {\n this._scrollToLabel(tabIndex);\n }\n if (this._items && this._items.length) {\n this._items.toArray()[tabIndex].focus();\n // Do not let the browser manage scrolling to focus the element, this will be handled\n // by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width\n // should be the full width minus the offset width.\n const containerEl = this._tabListContainer.nativeElement;\n const dir = this._getLayoutDirection();\n if (dir == 'ltr') {\n containerEl.scrollLeft = 0;\n } else {\n containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;\n }\n }\n }\n /** The layout direction of the containing app. */\n _getLayoutDirection() {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n /** Performs the CSS transformation on the tab list that will cause the list to scroll. */\n _updateTabScrollPosition() {\n if (this.disablePagination) {\n return;\n }\n const scrollDistance = this.scrollDistance;\n const translateX = this._getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;\n // Don't use `translate3d` here because we don't want to create a new layer. A new layer\n // seems to cause flickering and overflow in Internet Explorer. For example, the ink bar\n // and ripples will exceed the boundaries of the visible tab bar.\n // See: https://github.com/angular/components/issues/10276\n // We round the `transform` here, because transforms with sub-pixel precision cause some\n // browsers to blur the content of the element.\n this._tabList.nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;\n // Setting the `transform` on IE will change the scroll offset of the parent, causing the\n // position to be thrown off in some cases. We have to reset it ourselves to ensure that\n // it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing\n // with the scroll position throws off Chrome 71+ in RTL mode (see #14689).\n if (this._platform.TRIDENT || this._platform.EDGE) {\n this._tabListContainer.nativeElement.scrollLeft = 0;\n }\n }\n /** Sets the distance in pixels that the tab header should be transformed in the X-axis. */\n get scrollDistance() {\n return this._scrollDistance;\n }\n set scrollDistance(value) {\n this._scrollTo(value);\n }\n /**\n * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or\n * the end of the list, respectively). The distance to scroll is computed to be a third of the\n * length of the tab list view window.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _scrollHeader(direction) {\n const viewLength = this._tabListContainer.nativeElement.offsetWidth;\n // Move the scroll distance one-third the length of the tab list's viewport.\n const scrollAmount = (direction == 'before' ? -1 : 1) * viewLength / 3;\n return this._scrollTo(this._scrollDistance + scrollAmount);\n }\n /** Handles click events on the pagination arrows. */\n _handlePaginatorClick(direction) {\n this._stopInterval();\n this._scrollHeader(direction);\n }\n /**\n * Moves the tab list such that the desired tab label (marked by index) is moved into view.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _scrollToLabel(labelIndex) {\n if (this.disablePagination) {\n return;\n }\n const selectedLabel = this._items ? this._items.toArray()[labelIndex] : null;\n if (!selectedLabel) {\n return;\n }\n // The view length is the visible width of the tab labels.\n const viewLength = this._tabListContainer.nativeElement.offsetWidth;\n const {\n offsetLeft,\n offsetWidth\n } = selectedLabel.elementRef.nativeElement;\n let labelBeforePos, labelAfterPos;\n if (this._getLayoutDirection() == 'ltr') {\n labelBeforePos = offsetLeft;\n labelAfterPos = labelBeforePos + offsetWidth;\n } else {\n labelAfterPos = this._tabListInner.nativeElement.offsetWidth - offsetLeft;\n labelBeforePos = labelAfterPos - offsetWidth;\n }\n const beforeVisiblePos = this.scrollDistance;\n const afterVisiblePos = this.scrollDistance + viewLength;\n if (labelBeforePos < beforeVisiblePos) {\n // Scroll header to move label to the before direction\n this.scrollDistance -= beforeVisiblePos - labelBeforePos;\n } else if (labelAfterPos > afterVisiblePos) {\n // Scroll header to move label to the after direction\n this.scrollDistance += Math.min(labelAfterPos - afterVisiblePos, labelBeforePos - beforeVisiblePos);\n }\n }\n /**\n * Evaluate whether the pagination controls should be displayed. If the scroll width of the\n * tab list is wider than the size of the header container, then the pagination controls should\n * be shown.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _checkPaginationEnabled() {\n if (this.disablePagination) {\n this._showPaginationControls = false;\n } else {\n const isEnabled = this._tabListInner.nativeElement.scrollWidth > this._elementRef.nativeElement.offsetWidth;\n if (!isEnabled) {\n this.scrollDistance = 0;\n }\n if (isEnabled !== this._showPaginationControls) {\n this._changeDetectorRef.markForCheck();\n }\n this._showPaginationControls = isEnabled;\n }\n }\n /**\n * Evaluate whether the before and after controls should be enabled or disabled.\n * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the\n * before button. If the header is at the end of the list (scroll distance is equal to the\n * maximum distance we can scroll), then disable the after button.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _checkScrollingControls() {\n if (this.disablePagination) {\n this._disableScrollAfter = this._disableScrollBefore = true;\n } else {\n // Check if the pagination arrows should be activated.\n this._disableScrollBefore = this.scrollDistance == 0;\n this._disableScrollAfter = this.scrollDistance == this._getMaxScrollDistance();\n this._changeDetectorRef.markForCheck();\n }\n }\n /**\n * Determines what is the maximum length in pixels that can be set for the scroll distance. This\n * is equal to the difference in width between the tab list container and tab header container.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _getMaxScrollDistance() {\n const lengthOfTabList = this._tabListInner.nativeElement.scrollWidth;\n const viewLength = this._tabListContainer.nativeElement.offsetWidth;\n return lengthOfTabList - viewLength || 0;\n }\n /** Tells the ink-bar to align itself to the current label wrapper */\n _alignInkBarToSelectedTab() {\n const selectedItem = this._items && this._items.length ? this._items.toArray()[this.selectedIndex] : null;\n const selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;\n if (selectedLabelWrapper) {\n this._inkBar.alignToElement(selectedLabelWrapper);\n } else {\n this._inkBar.hide();\n }\n }\n /** Stops the currently-running paginator interval. */\n _stopInterval() {\n this._stopScrolling.next();\n }\n /**\n * Handles the user pressing down on one of the paginators.\n * Starts scrolling the header after a certain amount of time.\n * @param direction In which direction the paginator should be scrolled.\n */\n _handlePaginatorPress(direction, mouseEvent) {\n // Don't start auto scrolling for right mouse button clicks. Note that we shouldn't have to\n // null check the `button`, but we do it so we don't break tests that use fake events.\n if (mouseEvent && mouseEvent.button != null && mouseEvent.button !== 0) {\n return;\n }\n // Avoid overlapping timers.\n this._stopInterval();\n // Start a timer after the delay and keep firing based on the interval.\n timer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL)\n // Keep the timer going until something tells it to stop or the component is destroyed.\n .pipe(takeUntil(merge(this._stopScrolling, this._destroyed))).subscribe(() => {\n const {\n maxScrollDistance,\n distance\n } = this._scrollHeader(direction);\n // Stop the timer if we've reached the start or the end.\n if (distance === 0 || distance >= maxScrollDistance) {\n this._stopInterval();\n }\n });\n }\n /**\n * Scrolls the header to a given position.\n * @param position Position to which to scroll.\n * @returns Information on the current scroll distance and the maximum.\n */\n _scrollTo(position) {\n if (this.disablePagination) {\n return {\n maxScrollDistance: 0,\n distance: 0\n };\n }\n const maxScrollDistance = this._getMaxScrollDistance();\n this._scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));\n // Mark that the scroll distance has changed so that after the view is checked, the CSS\n // transformation can move the header.\n this._scrollDistanceChanged = true;\n this._checkScrollingControls();\n return {\n maxScrollDistance,\n distance: this._scrollDistance\n };\n }\n static {\n this.ɵfac = function MatPaginatedTabHeader_Factory(t) {\n return new (t || MatPaginatedTabHeader)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$1.ViewportRuler), i0.ɵɵdirectiveInject(i1.Directionality, 8), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i3.Platform), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatPaginatedTabHeader,\n inputs: {\n disablePagination: \"disablePagination\"\n }\n });\n }\n }\n return MatPaginatedTabHeader;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Base class with all of the `MatTabHeader` functionality.\n * @docs-private\n */\nlet _MatTabHeaderBase = /*#__PURE__*/(() => {\n class _MatTabHeaderBase extends MatPaginatedTabHeader {\n /** Whether the ripple effect is disabled or not. */\n get disableRipple() {\n return this._disableRipple;\n }\n set disableRipple(value) {\n this._disableRipple = coerceBooleanProperty(value);\n }\n constructor(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode) {\n super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode);\n this._disableRipple = false;\n }\n _itemSelected(event) {\n event.preventDefault();\n }\n static {\n this.ɵfac = function _MatTabHeaderBase_Factory(t) {\n return new (t || _MatTabHeaderBase)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$1.ViewportRuler), i0.ɵɵdirectiveInject(i1.Directionality, 8), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i3.Platform), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: _MatTabHeaderBase,\n inputs: {\n disableRipple: \"disableRipple\"\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return _MatTabHeaderBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * The header of the tab group which displays a list of all the tabs in the tab group. Includes\n * an ink bar that follows the currently selected tab. When the tabs list's width exceeds the\n * width of the header container, then arrows will be displayed to allow the user to scroll\n * left and right across the header.\n * @docs-private\n */\nlet MatTabHeader = /*#__PURE__*/(() => {\n class MatTabHeader extends _MatTabHeaderBase {\n constructor(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode) {\n super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode);\n }\n ngAfterContentInit() {\n this._inkBar = new MatInkBar(this._items);\n super.ngAfterContentInit();\n }\n static {\n this.ɵfac = function MatTabHeader_Factory(t) {\n return new (t || MatTabHeader)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$1.ViewportRuler), i0.ɵɵdirectiveInject(i1.Directionality, 8), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i3.Platform), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTabHeader,\n selectors: [[\"mat-tab-header\"]],\n contentQueries: function MatTabHeader_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatTabLabelWrapper, 4);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._items = _t);\n }\n },\n viewQuery: function MatTabHeader_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c3, 7);\n i0.ɵɵviewQuery(_c4, 7);\n i0.ɵɵviewQuery(_c5, 7);\n i0.ɵɵviewQuery(_c6, 5);\n i0.ɵɵviewQuery(_c7, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabListContainer = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabList = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabListInner = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._nextPaginator = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._previousPaginator = _t.first);\n }\n },\n hostAttrs: [1, \"mat-mdc-tab-header\"],\n hostVars: 4,\n hostBindings: function MatTabHeader_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-mdc-tab-header-pagination-controls-enabled\", ctx._showPaginationControls)(\"mat-mdc-tab-header-rtl\", ctx._getLayoutDirection() == \"rtl\");\n }\n },\n inputs: {\n selectedIndex: \"selectedIndex\"\n },\n outputs: {\n selectFocusedIndex: \"selectFocusedIndex\",\n indexFocused: \"indexFocused\"\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c2,\n decls: 13,\n vars: 10,\n consts: [[\"aria-hidden\", \"true\", \"type\", \"button\", \"mat-ripple\", \"\", \"tabindex\", \"-1\", 1, \"mat-mdc-tab-header-pagination\", \"mat-mdc-tab-header-pagination-before\", 3, \"matRippleDisabled\", \"disabled\", \"click\", \"mousedown\", \"touchend\"], [\"previousPaginator\", \"\"], [1, \"mat-mdc-tab-header-pagination-chevron\"], [1, \"mat-mdc-tab-label-container\", 3, \"keydown\"], [\"tabListContainer\", \"\"], [\"role\", \"tablist\", 1, \"mat-mdc-tab-list\", 3, \"cdkObserveContent\"], [\"tabList\", \"\"], [1, \"mat-mdc-tab-labels\"], [\"tabListInner\", \"\"], [\"aria-hidden\", \"true\", \"type\", \"button\", \"mat-ripple\", \"\", \"tabindex\", \"-1\", 1, \"mat-mdc-tab-header-pagination\", \"mat-mdc-tab-header-pagination-after\", 3, \"matRippleDisabled\", \"disabled\", \"mousedown\", \"click\", \"touchend\"], [\"nextPaginator\", \"\"]],\n template: function MatTabHeader_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"button\", 0, 1);\n i0.ɵɵlistener(\"click\", function MatTabHeader_Template_button_click_0_listener() {\n return ctx._handlePaginatorClick(\"before\");\n })(\"mousedown\", function MatTabHeader_Template_button_mousedown_0_listener($event) {\n return ctx._handlePaginatorPress(\"before\", $event);\n })(\"touchend\", function MatTabHeader_Template_button_touchend_0_listener() {\n return ctx._stopInterval();\n });\n i0.ɵɵelement(2, \"div\", 2);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"div\", 3, 4);\n i0.ɵɵlistener(\"keydown\", function MatTabHeader_Template_div_keydown_3_listener($event) {\n return ctx._handleKeydown($event);\n });\n i0.ɵɵelementStart(5, \"div\", 5, 6);\n i0.ɵɵlistener(\"cdkObserveContent\", function MatTabHeader_Template_div_cdkObserveContent_5_listener() {\n return ctx._onContentChanges();\n });\n i0.ɵɵelementStart(7, \"div\", 7, 8);\n i0.ɵɵprojection(9);\n i0.ɵɵelementEnd()()();\n i0.ɵɵelementStart(10, \"button\", 9, 10);\n i0.ɵɵlistener(\"mousedown\", function MatTabHeader_Template_button_mousedown_10_listener($event) {\n return ctx._handlePaginatorPress(\"after\", $event);\n })(\"click\", function MatTabHeader_Template_button_click_10_listener() {\n return ctx._handlePaginatorClick(\"after\");\n })(\"touchend\", function MatTabHeader_Template_button_touchend_10_listener() {\n return ctx._stopInterval();\n });\n i0.ɵɵelement(12, \"div\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-mdc-tab-header-pagination-disabled\", ctx._disableScrollBefore);\n i0.ɵɵproperty(\"matRippleDisabled\", ctx._disableScrollBefore || ctx.disableRipple)(\"disabled\", ctx._disableScrollBefore || null);\n i0.ɵɵadvance(3);\n i0.ɵɵclassProp(\"_mat-animation-noopable\", ctx._animationMode === \"NoopAnimations\");\n i0.ɵɵadvance(7);\n i0.ɵɵclassProp(\"mat-mdc-tab-header-pagination-disabled\", ctx._disableScrollAfter);\n i0.ɵɵproperty(\"matRippleDisabled\", ctx._disableScrollAfter || ctx.disableRipple)(\"disabled\", ctx._disableScrollAfter || null);\n }\n },\n dependencies: [i5.MatRipple, i5$1.CdkObserveContent],\n styles: [\".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0;--mdc-tab-indicator-active-indicator-height:2px;--mdc-tab-indicator-active-indicator-shape:0;--mdc-secondary-navigation-tab-container-height:48px}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color)}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}._mat-animation-noopable span.mdc-tab-indicator__content,._mat-animation-noopable span.mdc-tab__text-label{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.mat-mdc-tab::before{margin:5px}.cdk-high-contrast-active .mat-mdc-tab[aria-disabled=true]{color:GrayText}\"],\n encapsulation: 2\n });\n }\n }\n return MatTabHeader;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Injection token that can be used to provide the default options the tabs module. */\nconst MAT_TABS_CONFIG = /*#__PURE__*/new InjectionToken('MAT_TABS_CONFIG');\n\n/** Used to generate unique ID's for each tab component */\nlet nextId = 0;\n// Boilerplate for applying mixins to MatTabGroup.\n/** @docs-private */\nconst _MatTabGroupMixinBase = /*#__PURE__*/mixinColor( /*#__PURE__*/mixinDisableRipple(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}), 'primary');\n/**\n * Base class with all of the `MatTabGroupBase` functionality.\n * @docs-private\n */\nlet _MatTabGroupBase = /*#__PURE__*/(() => {\n class _MatTabGroupBase extends _MatTabGroupMixinBase {\n /** Whether the tab group should grow to the size of the active tab. */\n get dynamicHeight() {\n return this._dynamicHeight;\n }\n set dynamicHeight(value) {\n this._dynamicHeight = coerceBooleanProperty(value);\n }\n /** The index of the active tab. */\n get selectedIndex() {\n return this._selectedIndex;\n }\n set selectedIndex(value) {\n this._indexToSelect = coerceNumberProperty(value, null);\n }\n /** Duration for the tab animation. Will be normalized to milliseconds if no units are set. */\n get animationDuration() {\n return this._animationDuration;\n }\n set animationDuration(value) {\n this._animationDuration = /^\\d+$/.test(value + '') ? value + 'ms' : value;\n }\n /**\n * `tabindex` to be set on the inner element that wraps the tab content. Can be used for improved\n * accessibility when the tab does not have focusable elements or if it has scrollable content.\n * The `tabindex` will be removed automatically for inactive tabs.\n * Read more at https://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-2/tabs.html\n */\n get contentTabIndex() {\n return this._contentTabIndex;\n }\n set contentTabIndex(value) {\n this._contentTabIndex = coerceNumberProperty(value, null);\n }\n /**\n * Whether pagination should be disabled. This can be used to avoid unnecessary\n * layout recalculations if it's known that pagination won't be required.\n */\n get disablePagination() {\n return this._disablePagination;\n }\n set disablePagination(value) {\n this._disablePagination = coerceBooleanProperty(value);\n }\n /**\n * By default tabs remove their content from the DOM while it's off-screen.\n * Setting this to `true` will keep it in the DOM which will prevent elements\n * like iframes and videos from reloading next time it comes back into the view.\n */\n get preserveContent() {\n return this._preserveContent;\n }\n set preserveContent(value) {\n this._preserveContent = coerceBooleanProperty(value);\n }\n /** Background color of the tab group. */\n get backgroundColor() {\n return this._backgroundColor;\n }\n set backgroundColor(value) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove('mat-tabs-with-background', `mat-background-${this.backgroundColor}`);\n if (value) {\n classList.add('mat-tabs-with-background', `mat-background-${value}`);\n }\n this._backgroundColor = value;\n }\n constructor(elementRef, _changeDetectorRef, defaultConfig, _animationMode) {\n super(elementRef);\n this._changeDetectorRef = _changeDetectorRef;\n this._animationMode = _animationMode;\n /** All of the tabs that belong to the group. */\n this._tabs = new QueryList();\n /** The tab index that should be selected after the content has been checked. */\n this._indexToSelect = 0;\n /** Index of the tab that was focused last. */\n this._lastFocusedTabIndex = null;\n /** Snapshot of the height of the tab body wrapper before another tab is activated. */\n this._tabBodyWrapperHeight = 0;\n /** Subscription to tabs being added/removed. */\n this._tabsSubscription = Subscription.EMPTY;\n /** Subscription to changes in the tab labels. */\n this._tabLabelSubscription = Subscription.EMPTY;\n this._dynamicHeight = false;\n this._selectedIndex = null;\n /** Position of the tab header. */\n this.headerPosition = 'above';\n this._disablePagination = false;\n this._preserveContent = false;\n /** Output to enable support for two-way binding on `[(selectedIndex)]` */\n this.selectedIndexChange = new EventEmitter();\n /** Event emitted when focus has changed within a tab group. */\n this.focusChange = new EventEmitter();\n /** Event emitted when the body animation has completed */\n this.animationDone = new EventEmitter();\n /** Event emitted when the tab selection has changed. */\n this.selectedTabChange = new EventEmitter(true);\n this._groupId = nextId++;\n this.animationDuration = defaultConfig && defaultConfig.animationDuration ? defaultConfig.animationDuration : '500ms';\n this.disablePagination = defaultConfig && defaultConfig.disablePagination != null ? defaultConfig.disablePagination : false;\n this.dynamicHeight = defaultConfig && defaultConfig.dynamicHeight != null ? defaultConfig.dynamicHeight : false;\n this.contentTabIndex = defaultConfig?.contentTabIndex ?? null;\n this.preserveContent = !!defaultConfig?.preserveContent;\n }\n /**\n * After the content is checked, this component knows what tabs have been defined\n * and what the selected index should be. This is where we can know exactly what position\n * each tab should be in according to the new selected index, and additionally we know how\n * a new selected tab should transition in (from the left or right).\n */\n ngAfterContentChecked() {\n // Don't clamp the `indexToSelect` immediately in the setter because it can happen that\n // the amount of tabs changes before the actual change detection runs.\n const indexToSelect = this._indexToSelect = this._clampTabIndex(this._indexToSelect);\n // If there is a change in selected index, emit a change event. Should not trigger if\n // the selected index has not yet been initialized.\n if (this._selectedIndex != indexToSelect) {\n const isFirstRun = this._selectedIndex == null;\n if (!isFirstRun) {\n this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));\n // Preserve the height so page doesn't scroll up during tab change.\n // Fixes https://stackblitz.com/edit/mat-tabs-scroll-page-top-on-tab-change\n const wrapper = this._tabBodyWrapper.nativeElement;\n wrapper.style.minHeight = wrapper.clientHeight + 'px';\n }\n // Changing these values after change detection has run\n // since the checked content may contain references to them.\n Promise.resolve().then(() => {\n this._tabs.forEach((tab, index) => tab.isActive = index === indexToSelect);\n if (!isFirstRun) {\n this.selectedIndexChange.emit(indexToSelect);\n // Clear the min-height, this was needed during tab change to avoid\n // unnecessary scrolling.\n this._tabBodyWrapper.nativeElement.style.minHeight = '';\n }\n });\n }\n // Setup the position for each tab and optionally setup an origin on the next selected tab.\n this._tabs.forEach((tab, index) => {\n tab.position = index - indexToSelect;\n // If there is already a selected tab, then set up an origin for the next selected tab\n // if it doesn't have one already.\n if (this._selectedIndex != null && tab.position == 0 && !tab.origin) {\n tab.origin = indexToSelect - this._selectedIndex;\n }\n });\n if (this._selectedIndex !== indexToSelect) {\n this._selectedIndex = indexToSelect;\n this._lastFocusedTabIndex = null;\n this._changeDetectorRef.markForCheck();\n }\n }\n ngAfterContentInit() {\n this._subscribeToAllTabChanges();\n this._subscribeToTabLabels();\n // Subscribe to changes in the amount of tabs, in order to be\n // able to re-render the content as new tabs are added or removed.\n this._tabsSubscription = this._tabs.changes.subscribe(() => {\n const indexToSelect = this._clampTabIndex(this._indexToSelect);\n // Maintain the previously-selected tab if a new tab is added or removed and there is no\n // explicit change that selects a different tab.\n if (indexToSelect === this._selectedIndex) {\n const tabs = this._tabs.toArray();\n let selectedTab;\n for (let i = 0; i < tabs.length; i++) {\n if (tabs[i].isActive) {\n // Assign both to the `_indexToSelect` and `_selectedIndex` so we don't fire a changed\n // event, otherwise the consumer may end up in an infinite loop in some edge cases like\n // adding a tab within the `selectedIndexChange` event.\n this._indexToSelect = this._selectedIndex = i;\n this._lastFocusedTabIndex = null;\n selectedTab = tabs[i];\n break;\n }\n }\n // If we haven't found an active tab and a tab exists at the selected index, it means\n // that the active tab was swapped out. Since this won't be picked up by the rendering\n // loop in `ngAfterContentChecked`, we need to sync it up manually.\n if (!selectedTab && tabs[indexToSelect]) {\n Promise.resolve().then(() => {\n tabs[indexToSelect].isActive = true;\n this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));\n });\n }\n }\n this._changeDetectorRef.markForCheck();\n });\n }\n /** Listens to changes in all of the tabs. */\n _subscribeToAllTabChanges() {\n // Since we use a query with `descendants: true` to pick up the tabs, we may end up catching\n // some that are inside of nested tab groups. We filter them out manually by checking that\n // the closest group to the tab is the current one.\n this._allTabs.changes.pipe(startWith(this._allTabs)).subscribe(tabs => {\n this._tabs.reset(tabs.filter(tab => {\n return tab._closestTabGroup === this || !tab._closestTabGroup;\n }));\n this._tabs.notifyOnChanges();\n });\n }\n ngOnDestroy() {\n this._tabs.destroy();\n this._tabsSubscription.unsubscribe();\n this._tabLabelSubscription.unsubscribe();\n }\n /** Re-aligns the ink bar to the selected tab element. */\n realignInkBar() {\n if (this._tabHeader) {\n this._tabHeader._alignInkBarToSelectedTab();\n }\n }\n /**\n * Recalculates the tab group's pagination dimensions.\n *\n * WARNING: Calling this method can be very costly in terms of performance. It should be called\n * as infrequently as possible from outside of the Tabs component as it causes a reflow of the\n * page.\n */\n updatePagination() {\n if (this._tabHeader) {\n this._tabHeader.updatePagination();\n }\n }\n /**\n * Sets focus to a particular tab.\n * @param index Index of the tab to be focused.\n */\n focusTab(index) {\n const header = this._tabHeader;\n if (header) {\n header.focusIndex = index;\n }\n }\n _focusChanged(index) {\n this._lastFocusedTabIndex = index;\n this.focusChange.emit(this._createChangeEvent(index));\n }\n _createChangeEvent(index) {\n const event = new MatTabChangeEvent();\n event.index = index;\n if (this._tabs && this._tabs.length) {\n event.tab = this._tabs.toArray()[index];\n }\n return event;\n }\n /**\n * Subscribes to changes in the tab labels. This is needed, because the @Input for the label is\n * on the MatTab component, whereas the data binding is inside the MatTabGroup. In order for the\n * binding to be updated, we need to subscribe to changes in it and trigger change detection\n * manually.\n */\n _subscribeToTabLabels() {\n if (this._tabLabelSubscription) {\n this._tabLabelSubscription.unsubscribe();\n }\n this._tabLabelSubscription = merge(...this._tabs.map(tab => tab._stateChanges)).subscribe(() => this._changeDetectorRef.markForCheck());\n }\n /** Clamps the given index to the bounds of 0 and the tabs length. */\n _clampTabIndex(index) {\n // Note the `|| 0`, which ensures that values like NaN can't get through\n // and which would otherwise throw the component into an infinite loop\n // (since Math.max(NaN, 0) === NaN).\n return Math.min(this._tabs.length - 1, Math.max(index || 0, 0));\n }\n /** Returns a unique id for each tab label element */\n _getTabLabelId(i) {\n return `mat-tab-label-${this._groupId}-${i}`;\n }\n /** Returns a unique id for each tab content element */\n _getTabContentId(i) {\n return `mat-tab-content-${this._groupId}-${i}`;\n }\n /**\n * Sets the height of the body wrapper to the height of the activating tab if dynamic\n * height property is true.\n */\n _setTabBodyWrapperHeight(tabHeight) {\n if (!this._dynamicHeight || !this._tabBodyWrapperHeight) {\n return;\n }\n const wrapper = this._tabBodyWrapper.nativeElement;\n wrapper.style.height = this._tabBodyWrapperHeight + 'px';\n // This conditional forces the browser to paint the height so that\n // the animation to the new height can have an origin.\n if (this._tabBodyWrapper.nativeElement.offsetHeight) {\n wrapper.style.height = tabHeight + 'px';\n }\n }\n /** Removes the height of the tab body wrapper. */\n _removeTabBodyWrapperHeight() {\n const wrapper = this._tabBodyWrapper.nativeElement;\n this._tabBodyWrapperHeight = wrapper.clientHeight;\n wrapper.style.height = '';\n this.animationDone.emit();\n }\n /** Handle click events, setting new selected index if appropriate. */\n _handleClick(tab, tabHeader, index) {\n tabHeader.focusIndex = index;\n if (!tab.disabled) {\n this.selectedIndex = index;\n }\n }\n /** Retrieves the tabindex for the tab. */\n _getTabIndex(index) {\n const targetIndex = this._lastFocusedTabIndex ?? this.selectedIndex;\n return index === targetIndex ? 0 : -1;\n }\n /** Callback for when the focused state of a tab has changed. */\n _tabFocusChanged(focusOrigin, index) {\n // Mouse/touch focus happens during the `mousedown`/`touchstart` phase which\n // can cause the tab to be moved out from under the pointer, interrupting the\n // click sequence (see #21898). We don't need to scroll the tab into view for\n // such cases anyway, because it will be done when the tab becomes selected.\n if (focusOrigin && focusOrigin !== 'mouse' && focusOrigin !== 'touch') {\n this._tabHeader.focusIndex = index;\n }\n }\n static {\n this.ɵfac = function _MatTabGroupBase_Factory(t) {\n return new (t || _MatTabGroupBase)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(MAT_TABS_CONFIG, 8), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: _MatTabGroupBase,\n inputs: {\n dynamicHeight: \"dynamicHeight\",\n selectedIndex: \"selectedIndex\",\n headerPosition: \"headerPosition\",\n animationDuration: \"animationDuration\",\n contentTabIndex: \"contentTabIndex\",\n disablePagination: \"disablePagination\",\n preserveContent: \"preserveContent\",\n backgroundColor: \"backgroundColor\"\n },\n outputs: {\n selectedIndexChange: \"selectedIndexChange\",\n focusChange: \"focusChange\",\n animationDone: \"animationDone\",\n selectedTabChange: \"selectedTabChange\"\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return _MatTabGroupBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Material design tab-group component. Supports basic tab pairs (label + content) and includes\n * animated ink-bar, keyboard navigation, and screen reader.\n * See: https://material.io/design/components/tabs.html\n */\nlet MatTabGroup = /*#__PURE__*/(() => {\n class MatTabGroup extends _MatTabGroupBase {\n /** Whether the ink bar should fit its width to the size of the tab label content. */\n get fitInkBarToContent() {\n return this._fitInkBarToContent;\n }\n set fitInkBarToContent(v) {\n this._fitInkBarToContent = coerceBooleanProperty(v);\n this._changeDetectorRef.markForCheck();\n }\n /** Whether tabs should be stretched to fill the header. */\n get stretchTabs() {\n return this._stretchTabs;\n }\n set stretchTabs(v) {\n this._stretchTabs = coerceBooleanProperty(v);\n }\n constructor(elementRef, changeDetectorRef, defaultConfig, animationMode) {\n super(elementRef, changeDetectorRef, defaultConfig, animationMode);\n this._fitInkBarToContent = false;\n this._stretchTabs = true;\n this.fitInkBarToContent = defaultConfig && defaultConfig.fitInkBarToContent != null ? defaultConfig.fitInkBarToContent : false;\n this.stretchTabs = defaultConfig && defaultConfig.stretchTabs != null ? defaultConfig.stretchTabs : true;\n }\n static {\n this.ɵfac = function MatTabGroup_Factory(t) {\n return new (t || MatTabGroup)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(MAT_TABS_CONFIG, 8), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTabGroup,\n selectors: [[\"mat-tab-group\"]],\n contentQueries: function MatTabGroup_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatTab, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._allTabs = _t);\n }\n },\n viewQuery: function MatTabGroup_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c8, 5);\n i0.ɵɵviewQuery(_c9, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabBodyWrapper = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabHeader = _t.first);\n }\n },\n hostAttrs: [\"ngSkipHydration\", \"true\", 1, \"mat-mdc-tab-group\"],\n hostVars: 6,\n hostBindings: function MatTabGroup_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-mdc-tab-group-dynamic-height\", ctx.dynamicHeight)(\"mat-mdc-tab-group-inverted-header\", ctx.headerPosition === \"below\")(\"mat-mdc-tab-group-stretch-tabs\", ctx.stretchTabs);\n }\n },\n inputs: {\n color: \"color\",\n disableRipple: \"disableRipple\",\n fitInkBarToContent: \"fitInkBarToContent\",\n stretchTabs: [\"mat-stretch-tabs\", \"stretchTabs\"]\n },\n exportAs: [\"matTabGroup\"],\n features: [i0.ɵɵProvidersFeature([{\n provide: MAT_TAB_GROUP,\n useExisting: MatTabGroup\n }]), i0.ɵɵInheritDefinitionFeature],\n decls: 6,\n vars: 7,\n consts: [[3, \"selectedIndex\", \"disableRipple\", \"disablePagination\", \"indexFocused\", \"selectFocusedIndex\"], [\"tabHeader\", \"\"], [\"class\", \"mdc-tab mat-mdc-tab mat-mdc-focus-indicator\", \"role\", \"tab\", \"matTabLabelWrapper\", \"\", \"cdkMonitorElementFocus\", \"\", 3, \"id\", \"mdc-tab--active\", \"ngClass\", \"disabled\", \"fitInkBarToContent\", \"click\", \"cdkFocusChange\", 4, \"ngFor\", \"ngForOf\"], [1, \"mat-mdc-tab-body-wrapper\"], [\"tabBodyWrapper\", \"\"], [\"role\", \"tabpanel\", 3, \"id\", \"mat-mdc-tab-body-active\", \"ngClass\", \"content\", \"position\", \"origin\", \"animationDuration\", \"preserveContent\", \"_onCentered\", \"_onCentering\", 4, \"ngFor\", \"ngForOf\"], [\"role\", \"tab\", \"matTabLabelWrapper\", \"\", \"cdkMonitorElementFocus\", \"\", 1, \"mdc-tab\", \"mat-mdc-tab\", \"mat-mdc-focus-indicator\", 3, \"id\", \"ngClass\", \"disabled\", \"fitInkBarToContent\", \"click\", \"cdkFocusChange\"], [\"tabNode\", \"\"], [1, \"mdc-tab__ripple\"], [\"mat-ripple\", \"\", 1, \"mat-mdc-tab-ripple\", 3, \"matRippleTrigger\", \"matRippleDisabled\"], [1, \"mdc-tab__content\"], [1, \"mdc-tab__text-label\"], [3, \"ngIf\", \"ngIfElse\"], [\"tabTextLabel\", \"\"], [3, \"cdkPortalOutlet\"], [\"role\", \"tabpanel\", 3, \"id\", \"ngClass\", \"content\", \"position\", \"origin\", \"animationDuration\", \"preserveContent\", \"_onCentered\", \"_onCentering\"]],\n template: function MatTabGroup_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"mat-tab-header\", 0, 1);\n i0.ɵɵlistener(\"indexFocused\", function MatTabGroup_Template_mat_tab_header_indexFocused_0_listener($event) {\n return ctx._focusChanged($event);\n })(\"selectFocusedIndex\", function MatTabGroup_Template_mat_tab_header_selectFocusedIndex_0_listener($event) {\n return ctx.selectedIndex = $event;\n });\n i0.ɵɵtemplate(2, MatTabGroup_div_2_Template, 9, 17, \"div\", 2);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"div\", 3, 4);\n i0.ɵɵtemplate(5, MatTabGroup_mat_tab_body_5_Template, 1, 11, \"mat-tab-body\", 5);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"selectedIndex\", ctx.selectedIndex || 0)(\"disableRipple\", ctx.disableRipple)(\"disablePagination\", ctx.disablePagination);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngForOf\", ctx._tabs);\n i0.ɵɵadvance(1);\n i0.ɵɵclassProp(\"_mat-animation-noopable\", ctx._animationMode === \"NoopAnimations\");\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngForOf\", ctx._tabs);\n }\n },\n dependencies: [i1$2.NgClass, i1$2.NgForOf, i1$2.NgIf, i2.CdkPortalOutlet, i5.MatRipple, i4.CdkMonitorFocus, MatTabBody, MatTabLabelWrapper, MatTabHeader],\n styles: [\".mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab[hidden]{display:none}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;font-family:var(--mat-tab-header-label-text-font);font-size:var(--mat-tab-header-label-text-size);letter-spacing:var(--mat-tab-header-label-text-letter-spacing);line-height:var(--mat-tab-header-label-text-line-height);font-weight:var(--mat-tab-header-label-text-weight)}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color)}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-top-width:var(--mdc-tab-indicator-active-indicator-height)}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.mat-mdc-tab:not(.mdc-tab--stacked){height:var(--mdc-secondary-navigation-tab-container-height)}.mat-mdc-tab:not(:disabled).mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):hover.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):focus.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):active.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:disabled.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):hover:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):focus:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):active:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:disabled:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-header-inactive-hover-label-text-color)}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-header-inactive-focus-label-text-color)}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color)}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-header-active-ripple-color)}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-header-active-hover-label-text-color)}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-hover-indicator-color)}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-header-active-focus-label-text-color)}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-focus-indicator-color)}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-header-disabled-ripple-color)}.mat-mdc-tab .mdc-tab__ripple::before{content:\\\"\\\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-inactive-label-text-color);display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-header-with-background-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-focus-indicator::before{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}\"],\n encapsulation: 2\n });\n }\n }\n return MatTabGroup;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/** A simple change event emitted on focus or selection changes. */\nclass MatTabChangeEvent {}\n\n// Increasing integer for generating unique ids for tab nav components.\nlet nextUniqueId = 0;\n/**\n * Base class with all of the `MatTabNav` functionality.\n * @docs-private\n */\nlet _MatTabNavBase = /*#__PURE__*/(() => {\n class _MatTabNavBase extends MatPaginatedTabHeader {\n /** Background color of the tab nav. */\n get backgroundColor() {\n return this._backgroundColor;\n }\n set backgroundColor(value) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove('mat-tabs-with-background', `mat-background-${this.backgroundColor}`);\n if (value) {\n classList.add('mat-tabs-with-background', `mat-background-${value}`);\n }\n this._backgroundColor = value;\n }\n /** Whether the ripple effect is disabled or not. */\n get disableRipple() {\n return this._disableRipple;\n }\n set disableRipple(value) {\n this._disableRipple = coerceBooleanProperty(value);\n }\n constructor(elementRef, dir, ngZone, changeDetectorRef, viewportRuler, platform, animationMode) {\n super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode);\n this._disableRipple = false;\n /** Theme color of the nav bar. */\n this.color = 'primary';\n }\n _itemSelected() {\n // noop\n }\n ngAfterContentInit() {\n // We need this to run before the `changes` subscription in parent to ensure that the\n // selectedIndex is up-to-date by the time the super class starts looking for it.\n this._items.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => {\n this.updateActiveLink();\n });\n super.ngAfterContentInit();\n }\n /** Notifies the component that the active link has been changed. */\n updateActiveLink() {\n if (!this._items) {\n return;\n }\n const items = this._items.toArray();\n for (let i = 0; i < items.length; i++) {\n if (items[i].active) {\n this.selectedIndex = i;\n this._changeDetectorRef.markForCheck();\n if (this.tabPanel) {\n this.tabPanel._activeTabId = items[i].id;\n }\n return;\n }\n }\n // The ink bar should hide itself if no items are active.\n this.selectedIndex = -1;\n this._inkBar.hide();\n }\n _getRole() {\n return this.tabPanel ? 'tablist' : this._elementRef.nativeElement.getAttribute('role');\n }\n static {\n this.ɵfac = function _MatTabNavBase_Factory(t) {\n return new (t || _MatTabNavBase)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.Directionality, 8), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$1.ViewportRuler), i0.ɵɵdirectiveInject(i3.Platform), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: _MatTabNavBase,\n inputs: {\n backgroundColor: \"backgroundColor\",\n disableRipple: \"disableRipple\",\n color: \"color\",\n tabPanel: \"tabPanel\"\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return _MatTabNavBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n// Boilerplate for applying mixins to MatTabLink.\nconst _MatTabLinkMixinBase = /*#__PURE__*/mixinTabIndex( /*#__PURE__*/mixinDisableRipple( /*#__PURE__*/mixinDisabled(class {})));\n/** Base class with all of the `MatTabLink` functionality. */\nlet _MatTabLinkBase = /*#__PURE__*/(() => {\n class _MatTabLinkBase extends _MatTabLinkMixinBase {\n /** Whether the link is active. */\n get active() {\n return this._isActive;\n }\n set active(value) {\n const newValue = coerceBooleanProperty(value);\n if (newValue !== this._isActive) {\n this._isActive = newValue;\n this._tabNavBar.updateActiveLink();\n }\n }\n /**\n * Whether ripples are disabled on interaction.\n * @docs-private\n */\n get rippleDisabled() {\n return this.disabled || this.disableRipple || this._tabNavBar.disableRipple || !!this.rippleConfig.disabled;\n }\n constructor(_tabNavBar, /** @docs-private */elementRef, globalRippleOptions, tabIndex, _focusMonitor, animationMode) {\n super();\n this._tabNavBar = _tabNavBar;\n this.elementRef = elementRef;\n this._focusMonitor = _focusMonitor;\n /** Whether the tab link is active or not. */\n this._isActive = false;\n /** Unique id for the tab. */\n this.id = `mat-tab-link-${nextUniqueId++}`;\n this.rippleConfig = globalRippleOptions || {};\n this.tabIndex = parseInt(tabIndex) || 0;\n if (animationMode === 'NoopAnimations') {\n this.rippleConfig.animation = {\n enterDuration: 0,\n exitDuration: 0\n };\n }\n }\n /** Focuses the tab link. */\n focus() {\n this.elementRef.nativeElement.focus();\n }\n ngAfterViewInit() {\n this._focusMonitor.monitor(this.elementRef);\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this.elementRef);\n }\n _handleFocus() {\n // Since we allow navigation through tabbing in the nav bar, we\n // have to update the focused index whenever the link receives focus.\n this._tabNavBar.focusIndex = this._tabNavBar._items.toArray().indexOf(this);\n }\n _handleKeydown(event) {\n if (this._tabNavBar.tabPanel && event.keyCode === SPACE) {\n this.elementRef.nativeElement.click();\n }\n }\n _getAriaControls() {\n return this._tabNavBar.tabPanel ? this._tabNavBar.tabPanel?.id : this.elementRef.nativeElement.getAttribute('aria-controls');\n }\n _getAriaSelected() {\n if (this._tabNavBar.tabPanel) {\n return this.active ? 'true' : 'false';\n } else {\n return this.elementRef.nativeElement.getAttribute('aria-selected');\n }\n }\n _getAriaCurrent() {\n return this.active && !this._tabNavBar.tabPanel ? 'page' : null;\n }\n _getRole() {\n return this._tabNavBar.tabPanel ? 'tab' : this.elementRef.nativeElement.getAttribute('role');\n }\n _getTabIndex() {\n if (this._tabNavBar.tabPanel) {\n return this._isActive && !this.disabled ? 0 : -1;\n } else {\n return this.tabIndex;\n }\n }\n static {\n this.ɵfac = function _MatTabLinkBase_Factory(t) {\n return new (t || _MatTabLinkBase)(i0.ɵɵdirectiveInject(_MatTabNavBase), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(MAT_RIPPLE_GLOBAL_OPTIONS, 8), i0.ɵɵinjectAttribute('tabindex'), i0.ɵɵdirectiveInject(i4.FocusMonitor), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: _MatTabLinkBase,\n inputs: {\n active: \"active\",\n id: \"id\"\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return _MatTabLinkBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst _MatTabLinkBaseWithInkBarItem = /*#__PURE__*/mixinInkBarItem(_MatTabLinkBase);\n/**\n * Navigation component matching the styles of the tab group header.\n * Provides anchored navigation with animated ink bar.\n */\nlet MatTabNav = /*#__PURE__*/(() => {\n class MatTabNav extends _MatTabNavBase {\n /** Whether the ink bar should fit its width to the size of the tab label content. */\n get fitInkBarToContent() {\n return this._fitInkBarToContent.value;\n }\n set fitInkBarToContent(v) {\n this._fitInkBarToContent.next(coerceBooleanProperty(v));\n this._changeDetectorRef.markForCheck();\n }\n /** Whether tabs should be stretched to fill the header. */\n get stretchTabs() {\n return this._stretchTabs;\n }\n set stretchTabs(v) {\n this._stretchTabs = coerceBooleanProperty(v);\n }\n constructor(elementRef, dir, ngZone, changeDetectorRef, viewportRuler, platform, animationMode, defaultConfig) {\n super(elementRef, dir, ngZone, changeDetectorRef, viewportRuler, platform, animationMode);\n this._fitInkBarToContent = new BehaviorSubject(false);\n this._stretchTabs = true;\n this.disablePagination = defaultConfig && defaultConfig.disablePagination != null ? defaultConfig.disablePagination : false;\n this.fitInkBarToContent = defaultConfig && defaultConfig.fitInkBarToContent != null ? defaultConfig.fitInkBarToContent : false;\n }\n ngAfterContentInit() {\n this._inkBar = new MatInkBar(this._items);\n super.ngAfterContentInit();\n }\n ngAfterViewInit() {\n if (!this.tabPanel && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new Error('A mat-tab-nav-panel must be specified via [tabPanel].');\n }\n super.ngAfterViewInit();\n }\n static {\n this.ɵfac = function MatTabNav_Factory(t) {\n return new (t || MatTabNav)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.Directionality, 8), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$1.ViewportRuler), i0.ɵɵdirectiveInject(i3.Platform), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8), i0.ɵɵdirectiveInject(MAT_TABS_CONFIG, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTabNav,\n selectors: [[\"\", \"mat-tab-nav-bar\", \"\"]],\n contentQueries: function MatTabNav_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatTabLink, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._items = _t);\n }\n },\n viewQuery: function MatTabNav_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c3, 7);\n i0.ɵɵviewQuery(_c4, 7);\n i0.ɵɵviewQuery(_c5, 7);\n i0.ɵɵviewQuery(_c6, 5);\n i0.ɵɵviewQuery(_c7, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabListContainer = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabList = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabListInner = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._nextPaginator = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._previousPaginator = _t.first);\n }\n },\n hostAttrs: [1, \"mat-mdc-tab-nav-bar\", \"mat-mdc-tab-header\"],\n hostVars: 15,\n hostBindings: function MatTabNav_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"role\", ctx._getRole());\n i0.ɵɵclassProp(\"mat-mdc-tab-header-pagination-controls-enabled\", ctx._showPaginationControls)(\"mat-mdc-tab-header-rtl\", ctx._getLayoutDirection() == \"rtl\")(\"mat-mdc-tab-nav-bar-stretch-tabs\", ctx.stretchTabs)(\"mat-primary\", ctx.color !== \"warn\" && ctx.color !== \"accent\")(\"mat-accent\", ctx.color === \"accent\")(\"mat-warn\", ctx.color === \"warn\")(\"_mat-animation-noopable\", ctx._animationMode === \"NoopAnimations\");\n }\n },\n inputs: {\n color: \"color\",\n fitInkBarToContent: \"fitInkBarToContent\",\n stretchTabs: [\"mat-stretch-tabs\", \"stretchTabs\"]\n },\n exportAs: [\"matTabNavBar\", \"matTabNav\"],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c10,\n ngContentSelectors: _c2,\n decls: 13,\n vars: 8,\n consts: [[\"aria-hidden\", \"true\", \"type\", \"button\", \"mat-ripple\", \"\", \"tabindex\", \"-1\", 1, \"mat-mdc-tab-header-pagination\", \"mat-mdc-tab-header-pagination-before\", 3, \"matRippleDisabled\", \"disabled\", \"click\", \"mousedown\", \"touchend\"], [\"previousPaginator\", \"\"], [1, \"mat-mdc-tab-header-pagination-chevron\"], [1, \"mat-mdc-tab-link-container\", 3, \"keydown\"], [\"tabListContainer\", \"\"], [1, \"mat-mdc-tab-list\", 3, \"cdkObserveContent\"], [\"tabList\", \"\"], [1, \"mat-mdc-tab-links\"], [\"tabListInner\", \"\"], [\"aria-hidden\", \"true\", \"type\", \"button\", \"mat-ripple\", \"\", \"tabindex\", \"-1\", 1, \"mat-mdc-tab-header-pagination\", \"mat-mdc-tab-header-pagination-after\", 3, \"matRippleDisabled\", \"disabled\", \"mousedown\", \"click\", \"touchend\"], [\"nextPaginator\", \"\"]],\n template: function MatTabNav_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"button\", 0, 1);\n i0.ɵɵlistener(\"click\", function MatTabNav_Template_button_click_0_listener() {\n return ctx._handlePaginatorClick(\"before\");\n })(\"mousedown\", function MatTabNav_Template_button_mousedown_0_listener($event) {\n return ctx._handlePaginatorPress(\"before\", $event);\n })(\"touchend\", function MatTabNav_Template_button_touchend_0_listener() {\n return ctx._stopInterval();\n });\n i0.ɵɵelement(2, \"div\", 2);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"div\", 3, 4);\n i0.ɵɵlistener(\"keydown\", function MatTabNav_Template_div_keydown_3_listener($event) {\n return ctx._handleKeydown($event);\n });\n i0.ɵɵelementStart(5, \"div\", 5, 6);\n i0.ɵɵlistener(\"cdkObserveContent\", function MatTabNav_Template_div_cdkObserveContent_5_listener() {\n return ctx._onContentChanges();\n });\n i0.ɵɵelementStart(7, \"div\", 7, 8);\n i0.ɵɵprojection(9);\n i0.ɵɵelementEnd()()();\n i0.ɵɵelementStart(10, \"button\", 9, 10);\n i0.ɵɵlistener(\"mousedown\", function MatTabNav_Template_button_mousedown_10_listener($event) {\n return ctx._handlePaginatorPress(\"after\", $event);\n })(\"click\", function MatTabNav_Template_button_click_10_listener() {\n return ctx._handlePaginatorClick(\"after\");\n })(\"touchend\", function MatTabNav_Template_button_touchend_10_listener() {\n return ctx._stopInterval();\n });\n i0.ɵɵelement(12, \"div\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-mdc-tab-header-pagination-disabled\", ctx._disableScrollBefore);\n i0.ɵɵproperty(\"matRippleDisabled\", ctx._disableScrollBefore || ctx.disableRipple)(\"disabled\", ctx._disableScrollBefore || null);\n i0.ɵɵadvance(10);\n i0.ɵɵclassProp(\"mat-mdc-tab-header-pagination-disabled\", ctx._disableScrollAfter);\n i0.ɵɵproperty(\"matRippleDisabled\", ctx._disableScrollAfter || ctx.disableRipple)(\"disabled\", ctx._disableScrollAfter || null);\n }\n },\n dependencies: [i5.MatRipple, i5$1.CdkObserveContent],\n styles: [\".mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab[hidden]{display:none}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0;--mdc-tab-indicator-active-indicator-height:2px;--mdc-tab-indicator-active-indicator-shape:0;--mdc-secondary-navigation-tab-container-height:48px}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color)}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}._mat-animation-noopable span.mdc-tab-indicator__content,._mat-animation-noopable span.mdc-tab__text-label{transition:none}.mat-mdc-tab-links{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:flex-end}.mat-mdc-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-header-with-background-background-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-focus-indicator::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-focus-indicator::before{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mdc-tab__ripple::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-header-with-background-foreground-color)}\"],\n encapsulation: 2\n });\n }\n }\n return MatTabNav;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Link inside of a `mat-tab-nav-bar`.\n */\nlet MatTabLink = /*#__PURE__*/(() => {\n class MatTabLink extends _MatTabLinkBaseWithInkBarItem {\n constructor(tabNavBar, elementRef, globalRippleOptions, tabIndex, focusMonitor, animationMode) {\n super(tabNavBar, elementRef, globalRippleOptions, tabIndex, focusMonitor, animationMode);\n this._destroyed = new Subject();\n tabNavBar._fitInkBarToContent.pipe(takeUntil(this._destroyed)).subscribe(fitInkBarToContent => {\n this.fitInkBarToContent = fitInkBarToContent;\n });\n }\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n super.ngOnDestroy();\n }\n static {\n this.ɵfac = function MatTabLink_Factory(t) {\n return new (t || MatTabLink)(i0.ɵɵdirectiveInject(MatTabNav), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(MAT_RIPPLE_GLOBAL_OPTIONS, 8), i0.ɵɵinjectAttribute('tabindex'), i0.ɵɵdirectiveInject(i4.FocusMonitor), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTabLink,\n selectors: [[\"\", \"mat-tab-link\", \"\"], [\"\", \"matTabLink\", \"\"]],\n hostAttrs: [1, \"mdc-tab\", \"mat-mdc-tab-link\", \"mat-mdc-focus-indicator\"],\n hostVars: 11,\n hostBindings: function MatTabLink_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"focus\", function MatTabLink_focus_HostBindingHandler() {\n return ctx._handleFocus();\n })(\"keydown\", function MatTabLink_keydown_HostBindingHandler($event) {\n return ctx._handleKeydown($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-controls\", ctx._getAriaControls())(\"aria-current\", ctx._getAriaCurrent())(\"aria-disabled\", ctx.disabled)(\"aria-selected\", ctx._getAriaSelected())(\"id\", ctx.id)(\"tabIndex\", ctx._getTabIndex())(\"role\", ctx._getRole());\n i0.ɵɵclassProp(\"mat-mdc-tab-disabled\", ctx.disabled)(\"mdc-tab--active\", ctx.active);\n }\n },\n inputs: {\n disabled: \"disabled\",\n disableRipple: \"disableRipple\",\n tabIndex: \"tabIndex\",\n active: \"active\",\n id: \"id\"\n },\n exportAs: [\"matTabLink\"],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c11,\n ngContentSelectors: _c2,\n decls: 5,\n vars: 2,\n consts: [[1, \"mdc-tab__ripple\"], [\"mat-ripple\", \"\", 1, \"mat-mdc-tab-ripple\", 3, \"matRippleTrigger\", \"matRippleDisabled\"], [1, \"mdc-tab__content\"], [1, \"mdc-tab__text-label\"]],\n template: function MatTabLink_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelement(0, \"span\", 0)(1, \"div\", 1);\n i0.ɵɵelementStart(2, \"span\", 2)(3, \"span\", 3);\n i0.ɵɵprojection(4);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"matRippleTrigger\", ctx.elementRef.nativeElement)(\"matRippleDisabled\", ctx.rippleDisabled);\n }\n },\n dependencies: [i5.MatRipple],\n styles: [\".mat-mdc-tab-link{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;font-family:var(--mat-tab-header-label-text-font);font-size:var(--mat-tab-header-label-text-size);letter-spacing:var(--mat-tab-header-label-text-letter-spacing);line-height:var(--mat-tab-header-label-text-line-height);font-weight:var(--mat-tab-header-label-text-weight)}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color)}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-top-width:var(--mdc-tab-indicator-active-indicator-height)}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.mat-mdc-tab-link:not(.mdc-tab--stacked){height:var(--mdc-secondary-navigation-tab-container-height)}.mat-mdc-tab-link:not(:disabled).mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):hover.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):focus.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):active.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:disabled.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):hover:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):focus:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):active:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:disabled:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link.mdc-tab{flex-grow:0}.mat-mdc-tab-link:hover .mdc-tab__text-label{color:var(--mat-tab-header-inactive-hover-label-text-color)}.mat-mdc-tab-link:focus .mdc-tab__text-label{color:var(--mat-tab-header-inactive-focus-label-text-color)}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color)}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab-link.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-header-active-ripple-color)}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-header-active-hover-label-text-color)}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-hover-indicator-color)}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-header-active-focus-label-text-color)}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-focus-indicator-color)}.mat-mdc-tab-link.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab-link.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-header-disabled-ripple-color)}.mat-mdc-tab-link .mdc-tab__ripple::before{content:\\\"\\\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-header-inactive-label-text-color);display:inline-flex;align-items:center}.mat-mdc-tab-link .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab-link:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab-link.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab-link.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab-link .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-header.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link{flex-grow:1}.mat-mdc-tab-link::before{margin:5px}@media(max-width: 599px){.mat-mdc-tab-link{min-width:72px}}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatTabLink;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Tab panel component associated with MatTabNav.\n */\nlet MatTabNavPanel = /*#__PURE__*/(() => {\n class MatTabNavPanel {\n constructor() {\n /** Unique id for the tab panel. */\n this.id = `mat-tab-nav-panel-${nextUniqueId++}`;\n }\n static {\n this.ɵfac = function MatTabNavPanel_Factory(t) {\n return new (t || MatTabNavPanel)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTabNavPanel,\n selectors: [[\"mat-tab-nav-panel\"]],\n hostAttrs: [\"role\", \"tabpanel\", 1, \"mat-mdc-tab-nav-panel\"],\n hostVars: 2,\n hostBindings: function MatTabNavPanel_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-labelledby\", ctx._activeTabId)(\"id\", ctx.id);\n }\n },\n inputs: {\n id: \"id\"\n },\n exportAs: [\"matTabNavPanel\"],\n ngContentSelectors: _c2,\n decls: 1,\n vars: 0,\n template: function MatTabNavPanel_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatTabNavPanel;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatTabsModule = /*#__PURE__*/(() => {\n class MatTabsModule {\n static {\n this.ɵfac = function MatTabsModule_Factory(t) {\n return new (t || MatTabsModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatTabsModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule, MatCommonModule, PortalModule, MatRippleModule, ObserversModule, A11yModule, MatCommonModule]\n });\n }\n }\n return MatTabsModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_TAB, MAT_TABS_CONFIG, MAT_TAB_CONTENT, MAT_TAB_GROUP, MAT_TAB_LABEL, MatInkBar, MatPaginatedTabHeader, MatTab, MatTabBody, MatTabBodyPortal, MatTabChangeEvent, MatTabContent, MatTabGroup, MatTabHeader, MatTabLabel, MatTabLabelWrapper, MatTabLink, MatTabNav, MatTabNavPanel, MatTabsModule, _MAT_INK_BAR_POSITIONER, _MAT_INK_BAR_POSITIONER_FACTORY, _MatTabBase, _MatTabBodyBase, _MatTabGroupBase, _MatTabHeaderBase, _MatTabLabelWrapperBase, _MatTabLinkBase, _MatTabNavBase, matTabsAnimations };\n","import { Component, ElementRef, ViewChild, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Fa6Module } from '@proman/fa/fa6.module';\nimport { FlexLayoutModule } from 'ngx-flexible-layout';\nimport { PromanButtonComponent } from '@proman/button';\n\n/**\n * `proWarning` component\n *\n */\n@Component({\n selector: 'pro-warning',\n standalone: true,\n imports: [\n CommonModule,\n Fa6Module,\n FlexLayoutModule,\n PromanButtonComponent,\n ],\n styleUrls: [\n '../scss/_warning.scss',\n ],\n template: `\n \n
\n
\n \n
\n
\n @if (!preventClose) {\n
\n }\n
\n `\n})\n\nexport class PromanWarningComponent {\n label: string;\n @Input() preventClose: boolean;\n @ViewChild('element', { static: true }) element: ElementRef;\n\n hide($event: MouseEvent) {\n $event.stopPropagation();\n this.element.nativeElement.remove();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport {PublicSystemOptions, WarehouseLocation} from '@proman/interfaces/entity-interfaces';\nimport { TableField } from '@proman/interfaces/object-interfaces';\nimport { getPublicSystemOptions } from \"@proman/store/system-options\";\nimport { QueryExpressionService } from \"@proman/services/query-expression.service\";\n\nexport interface WarehoseAutocompleteConfigInterface {\n label: string;\n entity: 'warehouse_location';\n entityParams: { [key: string]: unknown };\n searchFields: string[];\n isNone?: boolean;\n getOptionName: (location: WarehouseLocation) => string;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class WarehousesService {\n systemOptions: PublicSystemOptions;\n namespace: string;\n\n constructor(\n private store: Store,\n private QueryExpression: QueryExpressionService,\n ) {\n this.store.select(getPublicSystemOptions).subscribe((value) => {\n this.systemOptions = value;\n if (value.corporateChild) this.namespace = value.namespace;\n })\n }\n\n getTableField(): TableField {\n return {\n name: 'warehouse_location',\n key: 'warehouseLocation.name',\n getValue: (item: { warehouseLocation: WarehouseLocation }) => item.warehouseLocation?.warehouse ? `${item.warehouseLocation.warehouse.name}${item.warehouseLocation.warehouse.divider}${item.warehouseLocation.name}` : '',\n filter: {\n type: 'search',\n keys: ['warehouseLocation.name', 'warehouseLocation.warehouse.name'],\n },\n hidden: true\n }\n }\n\n getAutocompleteConfig(): WarehoseAutocompleteConfigInterface {\n const params: WarehoseAutocompleteConfigInterface = {\n label: 'warehouse_location',\n entity: 'warehouse_location',\n entityParams: { join: ['warehouse'] },\n searchFields: ['name', 'warehouse.name'],\n isNone: true,\n getOptionName: (warehouseLocation: WarehouseLocation) => {\n let string = '';\n if (warehouseLocation) {\n string = `${warehouseLocation.warehouse?.name}${warehouseLocation.warehouse?.divider}${warehouseLocation.name}`;\n if (this.systemOptions.corporate && !this.namespace && warehouseLocation.warehouse && warehouseLocation.warehouse.namespace) {\n string = `${warehouseLocation.warehouse?.namespace}${warehouseLocation.warehouse?.divider}${warehouseLocation.warehouse?.name}${warehouseLocation.warehouse?.divider}${warehouseLocation.name}`;\n }\n }\n return string;\n }\n };\n\n if (this.namespace) {\n Object.assign(params.entityParams, { 'warehouse.namespace': this.QueryExpression.orNull(this.namespace) });\n }\n\n return params;\n }\n\n}\n","import { Component } from '@angular/core';\nimport { upperFirst } from 'lodash';\nimport { Entity } from '@proman/services/entity.service';\nimport { LocalStorageService } from '@proman/services/local-storage.service';\nimport { ACL } from '@proman/services/acl.service';\nimport { ParametersOptionsService } from '@proman/services/parameters-options.service';\nimport { QueryExpressionService } from '@proman/services/query-expression.service';\n\n@Component({\n selector: 'pm-barcode',\n template: `\n \n `,\n styles: [`\n div { width: 100%; }\n pro-select { min-width: 140px; }\n `]\n})\n\nexport class BarcodeComponent {\n printerEntity: any;\n templateEntity: any;\n\n printers: any = [];\n templates: any = [];\n\n printer: any;\n printerId: any;\n template: any;\n templateId: any;\n\n canView: boolean;\n\n constructor(\n private ACL: ACL,\n private Entity: Entity,\n private LocalStorage: LocalStorageService,\n private QueryExpression: QueryExpressionService,\n private ParametersOptions: ParametersOptionsService,\n ) {\n this.printerEntity = this.Entity.get('printer');\n this.templateEntity = this.Entity.get('template');\n\n this.canView = this.ACL.check('printer.view');\n\n if (this.canView) {\n this.ParametersOptions\n .search({ entity: 'device', entityParams: { type: 'ZplPrinter' } })\n .then((response: any) => {\n response.forEach((item: any) => item.name = item.configuration && item.configuration.name);\n\n this.handleData('printer', response);\n });\n\n this.ParametersOptions\n .search({ entity: 'template', entityParams: { type: this.QueryExpression.in(['zpl', 'zpl2']) } })\n .then((response: any) => this.handleData('template', response));\n\n }\n\n }\n\n handleData = (prop: string, data: any[]) => {\n let savedId = this.LocalStorage.get('barcode' + upperFirst(prop));\n let found = false;\nconsole.log('printers',this.printers)\n this[prop + 's'] = data;\n\n if (savedId) {\n data.forEach((item: any) => {\n if (item.id === parseInt(savedId)) {\n this.setData(prop, item);\n found = true;\n\n }\n\n });\n\n }\n\n if (!found && data.length) this.setData(prop, data);\n\n };\n\n setData(prop: string, item: any) {\n this[prop] = item;\n this[prop + 'Id'] = item.id;\n }\n\n set(prop: any, value: any) {\n this.setData(prop, value);\n this.LocalStorage.set('barcode' + upperFirst(prop), value.id);\n }\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogRef } from '@angular/material/legacy-dialog';\nimport { Entity } from '@proman/services/entity.service';\nimport { mapId, roundNumber } from '@proman/utils';\nimport { LocalStorageService } from '@proman/services/local-storage.service';\nimport { ProductionProduct, WarehouseLocation } from '@proman/interfaces/entity-interfaces';\nimport { UI_CLOSE_AFTER_BARCODE_PRINT, UiPreferencesService } from '@proman/services/ui-preferences.service';\nimport { WarehoseAutocompleteConfigInterface, WarehousesService } from '../../workplaces/warehouses.service';\n\n@Component({\n selector: 'pm-production-container-create-dialog',\n template: `\n \n \n
\n
\n
\n
\n
\n {{ totalQuantity }} \n\n
\n\n
\n\n
\n \n \n \n \n \n \n `\n})\n\nexport class ProductionContainerCreateDialogComponent {\n productContainerEntity: any;\n barcodePrinterEntity: any;\n productionProduct: ProductionProduct;\n previousContainers: any = null;\n quantity: number;\n batchSize: number;\n isAutoCloseDialog: boolean;\n\n totalQuantity: number = 0;\n quantityPerContainer: number = 0;\n warehouseLocation: WarehouseLocation;\n warehouseAutocompleteConfig: WarehoseAutocompleteConfigInterface;\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: any,\n private Entity: Entity,\n private LocalStorage: LocalStorageService,\n private UiPrefs: UiPreferencesService,\n private Warehouses: WarehousesService,\n private dialogRef: MatLegacyDialogRef,\n ) {\n this.barcodePrinterEntity = this.Entity.get('printer');\n this.productContainerEntity = this.Entity.get('product_container');\n this.isAutoCloseDialog = this.UiPrefs.get(UI_CLOSE_AFTER_BARCODE_PRINT) === null ?\n true :\n this.UiPrefs.get(UI_CLOSE_AFTER_BARCODE_PRINT);\n\n this.productionProduct = data.productionProduct;\n\n this.batchSize = +this.productionProduct.packagingQuantity || 1;\n this.quantity = +this.productionProduct.productionQuantity;\n\n this.calcQuantityPerContainer();\n\n this.warehouseAutocompleteConfig = Warehouses.getAutocompleteConfig();\n\n }\n\n print(moveToStore?: boolean) {\n if (this.batchSize && this.quantity) {\n this.productContainerEntity\n .createBatch({\n printer: this.LocalStorage.get('barcodePrinter'),\n barcode_template: this.LocalStorage.get('barcodeTemplate'),\n productionProduct: this.productionProduct.id,\n product: this.productionProduct.orderProduct.product.id,\n quantity: this.quantityPerContainer,\n batchSize: this.batchSize,\n event: this.data.event.id,\n moveToStore: moveToStore ? true : [],\n warehouseLocation: this.warehouseLocation?.id || [],\n printLabel: true,\n })\n .then((response: any) => {\n this.previousContainers = response.data;\n\n for (let container of this.previousContainers) {\n\n container.product = this.productionProduct.orderProduct.product;\n\n this.totalQuantity += +this.quantity;\n }\n\n if (this.isAutoCloseDialog) this.dialogRef.close(1);\n\n });\n }\n }\n\n reprint() {\n if (this.previousContainers) {\n this.barcodePrinterEntity.printProductContainer({\n printer: this.LocalStorage.get('barcodePrinter'),\n barcode_template: this.LocalStorage.get('barcodeTemplate'),\n productContainer: this.previousContainers.map(mapId)\n });\n }\n }\n\n moveToStore(moveToStore?: boolean) {\n this.productContainerEntity.createBatch({\n printer: this.LocalStorage.get('barcodePrinter'),\n barcode_template: this.LocalStorage.get('barcodeTemplate'),\n productionProduct: this.productionProduct.id,\n product: this.productionProduct.orderProduct.product.id,\n quantity: this.quantityPerContainer,\n batchSize: this.batchSize,\n event: this.data.event.id,\n moveToStore: moveToStore ? true : [],\n warehouseLocation: this.warehouseLocation?.id || [],\n printLabel: false,\n }).then((response: any) => {\n if (this.isAutoCloseDialog) this.dialogRef.close(1);\n })\n }\n\n showCopy = () => !!this.previousContainers;\n\n set = (property: string, value: any) => {\n this[property] = value;\n };\n\n calcQuantityPerContainer = () => {\n this.quantityPerContainer = +roundNumber(this.quantity / this.batchSize, 0);\n };\n\n setQuantityPerContainer(value: number) {\n this.quantityPerContainer = value;\n this.quantity = this.quantityPerContainer * this.batchSize;\n }\n\n setContainersQuantity(value: number) {\n this.batchSize = value;\n this.quantity = this.quantityPerContainer * this.batchSize;\n }\n\n setAutocloseDialog(value: boolean) {\n this.isAutoCloseDialog = value;\n this.UiPrefs.set(UI_CLOSE_AFTER_BARCODE_PRINT, value);\n }\n\n setQuantity(value: number) {\n this.quantity = value;\n }\n\n setWarehouseLocation(warehouseLocation: WarehouseLocation) {\n this.warehouseLocation = warehouseLocation;\n }\n\n}\n","import * as i0 from '@angular/core';\nimport { Injectable, Inject, InjectionToken, booleanAttribute, Directive, Optional, SkipSelf, Input, EventEmitter, Self, ContentChildren, ContentChild, Output, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport * as i1 from '@angular/cdk/scrolling';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport { _getEventTarget, normalizePassiveListenerOptions, _getShadowRoot } from '@angular/cdk/platform';\nimport { coerceElement, coerceNumberProperty, coerceArray } from '@angular/cdk/coercion';\nimport { isFakeTouchstartFromScreenReader, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';\nimport { Subject, Subscription, interval, animationFrameScheduler, Observable, merge } from 'rxjs';\nimport { takeUntil, map, take, startWith, tap, switchMap } from 'rxjs/operators';\nimport * as i1$1 from '@angular/cdk/bidi';\n\n/**\n * Shallow-extends a stylesheet object with another stylesheet-like object.\n * Note that the keys in `source` have to be dash-cased.\n * @docs-private\n */\nfunction extendStyles(dest, source, importantProperties) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n const value = source[key];\n if (value) {\n dest.setProperty(key, value, importantProperties?.has(key) ? 'important' : '');\n } else {\n dest.removeProperty(key);\n }\n }\n }\n return dest;\n}\n/**\n * Toggles whether the native drag interactions should be enabled for an element.\n * @param element Element on which to toggle the drag interactions.\n * @param enable Whether the drag interactions should be enabled.\n * @docs-private\n */\nfunction toggleNativeDragInteractions(element, enable) {\n const userSelect = enable ? '' : 'none';\n extendStyles(element.style, {\n 'touch-action': enable ? '' : 'none',\n '-webkit-user-drag': enable ? '' : 'none',\n '-webkit-tap-highlight-color': enable ? '' : 'transparent',\n 'user-select': userSelect,\n '-ms-user-select': userSelect,\n '-webkit-user-select': userSelect,\n '-moz-user-select': userSelect\n });\n}\n/**\n * Toggles whether an element is visible while preserving its dimensions.\n * @param element Element whose visibility to toggle\n * @param enable Whether the element should be visible.\n * @param importantProperties Properties to be set as `!important`.\n * @docs-private\n */\nfunction toggleVisibility(element, enable, importantProperties) {\n extendStyles(element.style, {\n position: enable ? '' : 'fixed',\n top: enable ? '' : '0',\n opacity: enable ? '' : '0',\n left: enable ? '' : '-999em'\n }, importantProperties);\n}\n/**\n * Combines a transform string with an optional other transform\n * that exited before the base transform was applied.\n */\nfunction combineTransforms(transform, initialTransform) {\n return initialTransform && initialTransform != 'none' ? transform + ' ' + initialTransform : transform;\n}\n\n/** Parses a CSS time value to milliseconds. */\nfunction parseCssTimeUnitsToMs(value) {\n // Some browsers will return it in seconds, whereas others will return milliseconds.\n const multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;\n return parseFloat(value) * multiplier;\n}\n/** Gets the transform transition duration, including the delay, of an element in milliseconds. */\nfunction getTransformTransitionDurationInMs(element) {\n const computedStyle = getComputedStyle(element);\n const transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');\n const property = transitionedProperties.find(prop => prop === 'transform' || prop === 'all');\n // If there's no transition for `all` or `transform`, we shouldn't do anything.\n if (!property) {\n return 0;\n }\n // Get the index of the property that we're interested in and match\n // it up to the same index in `transition-delay` and `transition-duration`.\n const propertyIndex = transitionedProperties.indexOf(property);\n const rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');\n const rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');\n return parseCssTimeUnitsToMs(rawDurations[propertyIndex]) + parseCssTimeUnitsToMs(rawDelays[propertyIndex]);\n}\n/** Parses out multiple values from a computed style into an array. */\nfunction parseCssPropertyValue(computedStyle, name) {\n const value = computedStyle.getPropertyValue(name);\n return value.split(',').map(part => part.trim());\n}\n\n/** Gets a mutable version of an element's bounding `ClientRect`. */\nfunction getMutableClientRect(element) {\n const clientRect = element.getBoundingClientRect();\n // We need to clone the `clientRect` here, because all the values on it are readonly\n // and we need to be able to update them. Also we can't use a spread here, because\n // the values on a `ClientRect` aren't own properties. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes\n return {\n top: clientRect.top,\n right: clientRect.right,\n bottom: clientRect.bottom,\n left: clientRect.left,\n width: clientRect.width,\n height: clientRect.height,\n x: clientRect.x,\n y: clientRect.y\n };\n}\n/**\n * Checks whether some coordinates are within a `ClientRect`.\n * @param clientRect ClientRect that is being checked.\n * @param x Coordinates along the X axis.\n * @param y Coordinates along the Y axis.\n */\nfunction isInsideClientRect(clientRect, x, y) {\n const {\n top,\n bottom,\n left,\n right\n } = clientRect;\n return y >= top && y <= bottom && x >= left && x <= right;\n}\n/**\n * Updates the top/left positions of a `ClientRect`, as well as their bottom/right counterparts.\n * @param clientRect `ClientRect` that should be updated.\n * @param top Amount to add to the `top` position.\n * @param left Amount to add to the `left` position.\n */\nfunction adjustClientRect(clientRect, top, left) {\n clientRect.top += top;\n clientRect.bottom = clientRect.top + clientRect.height;\n clientRect.left += left;\n clientRect.right = clientRect.left + clientRect.width;\n}\n/**\n * Checks whether the pointer coordinates are close to a ClientRect.\n * @param rect ClientRect to check against.\n * @param threshold Threshold around the ClientRect.\n * @param pointerX Coordinates along the X axis.\n * @param pointerY Coordinates along the Y axis.\n */\nfunction isPointerNearClientRect(rect, threshold, pointerX, pointerY) {\n const {\n top,\n right,\n bottom,\n left,\n width,\n height\n } = rect;\n const xThreshold = width * threshold;\n const yThreshold = height * threshold;\n return pointerY > top - yThreshold && pointerY < bottom + yThreshold && pointerX > left - xThreshold && pointerX < right + xThreshold;\n}\n\n/** Keeps track of the scroll position and dimensions of the parents of an element. */\nclass ParentPositionTracker {\n constructor(_document) {\n this._document = _document;\n /** Cached positions of the scrollable parent elements. */\n this.positions = new Map();\n }\n /** Clears the cached positions. */\n clear() {\n this.positions.clear();\n }\n /** Caches the positions. Should be called at the beginning of a drag sequence. */\n cache(elements) {\n this.clear();\n this.positions.set(this._document, {\n scrollPosition: this.getViewportScrollPosition()\n });\n elements.forEach(element => {\n this.positions.set(element, {\n scrollPosition: {\n top: element.scrollTop,\n left: element.scrollLeft\n },\n clientRect: getMutableClientRect(element)\n });\n });\n }\n /** Handles scrolling while a drag is taking place. */\n handleScroll(event) {\n const target = _getEventTarget(event);\n const cachedPosition = this.positions.get(target);\n if (!cachedPosition) {\n return null;\n }\n const scrollPosition = cachedPosition.scrollPosition;\n let newTop;\n let newLeft;\n if (target === this._document) {\n const viewportScrollPosition = this.getViewportScrollPosition();\n newTop = viewportScrollPosition.top;\n newLeft = viewportScrollPosition.left;\n } else {\n newTop = target.scrollTop;\n newLeft = target.scrollLeft;\n }\n const topDifference = scrollPosition.top - newTop;\n const leftDifference = scrollPosition.left - newLeft;\n // Go through and update the cached positions of the scroll\n // parents that are inside the element that was scrolled.\n this.positions.forEach((position, node) => {\n if (position.clientRect && target !== node && target.contains(node)) {\n adjustClientRect(position.clientRect, topDifference, leftDifference);\n }\n });\n scrollPosition.top = newTop;\n scrollPosition.left = newLeft;\n return {\n top: topDifference,\n left: leftDifference\n };\n }\n /**\n * Gets the scroll position of the viewport. Note that we use the scrollX and scrollY directly,\n * instead of going through the `ViewportRuler`, because the first value the ruler looks at is\n * the top/left offset of the `document.documentElement` which works for most cases, but breaks\n * if the element is offset by something like the `BlockScrollStrategy`.\n */\n getViewportScrollPosition() {\n return {\n top: window.scrollY,\n left: window.scrollX\n };\n }\n}\n\n/** Creates a deep clone of an element. */\nfunction deepCloneNode(node) {\n const clone = node.cloneNode(true);\n const descendantsWithId = clone.querySelectorAll('[id]');\n const nodeName = node.nodeName.toLowerCase();\n // Remove the `id` to avoid having multiple elements with the same id on the page.\n clone.removeAttribute('id');\n for (let i = 0; i < descendantsWithId.length; i++) {\n descendantsWithId[i].removeAttribute('id');\n }\n if (nodeName === 'canvas') {\n transferCanvasData(node, clone);\n } else if (nodeName === 'input' || nodeName === 'select' || nodeName === 'textarea') {\n transferInputData(node, clone);\n }\n transferData('canvas', node, clone, transferCanvasData);\n transferData('input, textarea, select', node, clone, transferInputData);\n return clone;\n}\n/** Matches elements between an element and its clone and allows for their data to be cloned. */\nfunction transferData(selector, node, clone, callback) {\n const descendantElements = node.querySelectorAll(selector);\n if (descendantElements.length) {\n const cloneElements = clone.querySelectorAll(selector);\n for (let i = 0; i < descendantElements.length; i++) {\n callback(descendantElements[i], cloneElements[i]);\n }\n }\n}\n// Counter for unique cloned radio button names.\nlet cloneUniqueId = 0;\n/** Transfers the data of one input element to another. */\nfunction transferInputData(source, clone) {\n // Browsers throw an error when assigning the value of a file input programmatically.\n if (clone.type !== 'file') {\n clone.value = source.value;\n }\n // Radio button `name` attributes must be unique for radio button groups\n // otherwise original radio buttons can lose their checked state\n // once the clone is inserted in the DOM.\n if (clone.type === 'radio' && clone.name) {\n clone.name = `mat-clone-${clone.name}-${cloneUniqueId++}`;\n }\n}\n/** Transfers the data of one canvas element to another. */\nfunction transferCanvasData(source, clone) {\n const context = clone.getContext('2d');\n if (context) {\n // In some cases `drawImage` can throw (e.g. if the canvas size is 0x0).\n // We can't do much about it so just ignore the error.\n try {\n context.drawImage(source, 0, 0);\n } catch {}\n }\n}\n\n/** Options that can be used to bind a passive event listener. */\nconst passiveEventListenerOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: true\n});\n/** Options that can be used to bind an active event listener. */\nconst activeEventListenerOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: false\n});\n/**\n * Time in milliseconds for which to ignore mouse events, after\n * receiving a touch event. Used to avoid doing double work for\n * touch devices where the browser fires fake mouse events, in\n * addition to touch events.\n */\nconst MOUSE_EVENT_IGNORE_TIME = 800;\n/** Inline styles to be set as `!important` while dragging. */\nconst dragImportantProperties = /*#__PURE__*/new Set([\n// Needs to be important, because some `mat-table` sets `position: sticky !important`. See #22781.\n'position']);\n/**\n * Reference to a draggable item. Used to manipulate or dispose of the item.\n */\nclass DragRef {\n /** Whether starting to drag this element is disabled. */\n get disabled() {\n return this._disabled || !!(this._dropContainer && this._dropContainer.disabled);\n }\n set disabled(value) {\n if (value !== this._disabled) {\n this._disabled = value;\n this._toggleNativeDragInteractions();\n this._handles.forEach(handle => toggleNativeDragInteractions(handle, value));\n }\n }\n constructor(element, _config, _document, _ngZone, _viewportRuler, _dragDropRegistry) {\n this._config = _config;\n this._document = _document;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._dragDropRegistry = _dragDropRegistry;\n /**\n * CSS `transform` applied to the element when it isn't being dragged. We need a\n * passive transform in order for the dragged element to retain its new position\n * after the user has stopped dragging and because we need to know the relative\n * position in case they start dragging again. This corresponds to `element.style.transform`.\n */\n this._passiveTransform = {\n x: 0,\n y: 0\n };\n /** CSS `transform` that is applied to the element while it's being dragged. */\n this._activeTransform = {\n x: 0,\n y: 0\n };\n /**\n * Whether the dragging sequence has been started. Doesn't\n * necessarily mean that the element has been moved.\n */\n this._hasStartedDragging = false;\n /** Emits when the item is being moved. */\n this._moveEvents = new Subject();\n /** Subscription to pointer movement events. */\n this._pointerMoveSubscription = Subscription.EMPTY;\n /** Subscription to the event that is dispatched when the user lifts their pointer. */\n this._pointerUpSubscription = Subscription.EMPTY;\n /** Subscription to the viewport being scrolled. */\n this._scrollSubscription = Subscription.EMPTY;\n /** Subscription to the viewport being resized. */\n this._resizeSubscription = Subscription.EMPTY;\n /** Cached reference to the boundary element. */\n this._boundaryElement = null;\n /** Whether the native dragging interactions have been enabled on the root element. */\n this._nativeInteractionsEnabled = true;\n /** Elements that can be used to drag the draggable item. */\n this._handles = [];\n /** Registered handles that are currently disabled. */\n this._disabledHandles = new Set();\n /** Layout direction of the item. */\n this._direction = 'ltr';\n /**\n * Amount of milliseconds to wait after the user has put their\n * pointer down before starting to drag the element.\n */\n this.dragStartDelay = 0;\n this._disabled = false;\n /** Emits as the drag sequence is being prepared. */\n this.beforeStarted = new Subject();\n /** Emits when the user starts dragging the item. */\n this.started = new Subject();\n /** Emits when the user has released a drag item, before any animations have started. */\n this.released = new Subject();\n /** Emits when the user stops dragging an item in the container. */\n this.ended = new Subject();\n /** Emits when the user has moved the item into a new container. */\n this.entered = new Subject();\n /** Emits when the user removes the item its container by dragging it into another container. */\n this.exited = new Subject();\n /** Emits when the user drops the item inside a container. */\n this.dropped = new Subject();\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n this.moved = this._moveEvents;\n /** Handler for the `mousedown`/`touchstart` events. */\n this._pointerDown = event => {\n this.beforeStarted.next();\n // Delegate the event based on whether it started from a handle or the element itself.\n if (this._handles.length) {\n const targetHandle = this._getTargetHandle(event);\n if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n this._initializeDragSequence(targetHandle, event);\n }\n } else if (!this.disabled) {\n this._initializeDragSequence(this._rootElement, event);\n }\n };\n /** Handler that is invoked when the user moves their pointer after they've initiated a drag. */\n this._pointerMove = event => {\n const pointerPosition = this._getPointerPositionOnPage(event);\n if (!this._hasStartedDragging) {\n const distanceX = Math.abs(pointerPosition.x - this._pickupPositionOnPage.x);\n const distanceY = Math.abs(pointerPosition.y - this._pickupPositionOnPage.y);\n const isOverThreshold = distanceX + distanceY >= this._config.dragStartThreshold;\n // Only start dragging after the user has moved more than the minimum distance in either\n // direction. Note that this is preferable over doing something like `skip(minimumDistance)`\n // in the `pointerMove` subscription, because we're not guaranteed to have one move event\n // per pixel of movement (e.g. if the user moves their pointer quickly).\n if (isOverThreshold) {\n const isDelayElapsed = Date.now() >= this._dragStartTime + this._getDragStartDelay(event);\n const container = this._dropContainer;\n if (!isDelayElapsed) {\n this._endDragSequence(event);\n return;\n }\n // Prevent other drag sequences from starting while something in the container is still\n // being dragged. This can happen while we're waiting for the drop animation to finish\n // and can cause errors, because some elements might still be moving around.\n if (!container || !container.isDragging() && !container.isReceiving()) {\n // Prevent the default action as soon as the dragging sequence is considered as\n // \"started\" since waiting for the next event can allow the device to begin scrolling.\n event.preventDefault();\n this._hasStartedDragging = true;\n this._ngZone.run(() => this._startDragSequence(event));\n }\n }\n return;\n }\n // We prevent the default action down here so that we know that dragging has started. This is\n // important for touch devices where doing this too early can unnecessarily block scrolling,\n // if there's a dragging delay.\n event.preventDefault();\n const constrainedPointerPosition = this._getConstrainedPointerPosition(pointerPosition);\n this._hasMoved = true;\n this._lastKnownPointerPosition = pointerPosition;\n this._updatePointerDirectionDelta(constrainedPointerPosition);\n if (this._dropContainer) {\n this._updateActiveDropContainer(constrainedPointerPosition, pointerPosition);\n } else {\n // If there's a position constraint function, we want the element's top/left to be at the\n // specific position on the page. Use the initial position as a reference if that's the case.\n const offset = this.constrainPosition ? this._initialClientRect : this._pickupPositionOnPage;\n const activeTransform = this._activeTransform;\n activeTransform.x = constrainedPointerPosition.x - offset.x + this._passiveTransform.x;\n activeTransform.y = constrainedPointerPosition.y - offset.y + this._passiveTransform.y;\n this._applyRootElementTransform(activeTransform.x, activeTransform.y);\n }\n // Since this event gets fired for every pixel while dragging, we only\n // want to fire it if the consumer opted into it. Also we have to\n // re-enter the zone because we run all of the events on the outside.\n if (this._moveEvents.observers.length) {\n this._ngZone.run(() => {\n this._moveEvents.next({\n source: this,\n pointerPosition: constrainedPointerPosition,\n event,\n distance: this._getDragDistance(constrainedPointerPosition),\n delta: this._pointerDirectionDelta\n });\n });\n }\n };\n /** Handler that is invoked when the user lifts their pointer up, after initiating a drag. */\n this._pointerUp = event => {\n this._endDragSequence(event);\n };\n /** Handles a native `dragstart` event. */\n this._nativeDragStart = event => {\n if (this._handles.length) {\n const targetHandle = this._getTargetHandle(event);\n if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n event.preventDefault();\n }\n } else if (!this.disabled) {\n // Usually this isn't necessary since the we prevent the default action in `pointerDown`,\n // but some cases like dragging of links can slip through (see #24403).\n event.preventDefault();\n }\n };\n this.withRootElement(element).withParent(_config.parentDragRef || null);\n this._parentPositions = new ParentPositionTracker(_document);\n _dragDropRegistry.registerDragItem(this);\n }\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n getPlaceholderElement() {\n return this._placeholder;\n }\n /** Returns the root draggable element. */\n getRootElement() {\n return this._rootElement;\n }\n /**\n * Gets the currently-visible element that represents the drag item.\n * While dragging this is the placeholder, otherwise it's the root element.\n */\n getVisibleElement() {\n return this.isDragging() ? this.getPlaceholderElement() : this.getRootElement();\n }\n /** Registers the handles that can be used to drag the element. */\n withHandles(handles) {\n this._handles = handles.map(handle => coerceElement(handle));\n this._handles.forEach(handle => toggleNativeDragInteractions(handle, this.disabled));\n this._toggleNativeDragInteractions();\n // Delete any lingering disabled handles that may have been destroyed. Note that we re-create\n // the set, rather than iterate over it and filter out the destroyed handles, because while\n // the ES spec allows for sets to be modified while they're being iterated over, some polyfills\n // use an array internally which may throw an error.\n const disabledHandles = new Set();\n this._disabledHandles.forEach(handle => {\n if (this._handles.indexOf(handle) > -1) {\n disabledHandles.add(handle);\n }\n });\n this._disabledHandles = disabledHandles;\n return this;\n }\n /**\n * Registers the template that should be used for the drag preview.\n * @param template Template that from which to stamp out the preview.\n */\n withPreviewTemplate(template) {\n this._previewTemplate = template;\n return this;\n }\n /**\n * Registers the template that should be used for the drag placeholder.\n * @param template Template that from which to stamp out the placeholder.\n */\n withPlaceholderTemplate(template) {\n this._placeholderTemplate = template;\n return this;\n }\n /**\n * Sets an alternate drag root element. The root element is the element that will be moved as\n * the user is dragging. Passing an alternate root element is useful when trying to enable\n * dragging on an element that you might not have access to.\n */\n withRootElement(rootElement) {\n const element = coerceElement(rootElement);\n if (element !== this._rootElement) {\n if (this._rootElement) {\n this._removeRootElementListeners(this._rootElement);\n }\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('mousedown', this._pointerDown, activeEventListenerOptions);\n element.addEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\n element.addEventListener('dragstart', this._nativeDragStart, activeEventListenerOptions);\n });\n this._initialTransform = undefined;\n this._rootElement = element;\n }\n if (typeof SVGElement !== 'undefined' && this._rootElement instanceof SVGElement) {\n this._ownerSVGElement = this._rootElement.ownerSVGElement;\n }\n return this;\n }\n /**\n * Element to which the draggable's position will be constrained.\n */\n withBoundaryElement(boundaryElement) {\n this._boundaryElement = boundaryElement ? coerceElement(boundaryElement) : null;\n this._resizeSubscription.unsubscribe();\n if (boundaryElement) {\n this._resizeSubscription = this._viewportRuler.change(10).subscribe(() => this._containInsideBoundaryOnResize());\n }\n return this;\n }\n /** Sets the parent ref that the ref is nested in. */\n withParent(parent) {\n this._parentDragRef = parent;\n return this;\n }\n /** Removes the dragging functionality from the DOM element. */\n dispose() {\n this._removeRootElementListeners(this._rootElement);\n // Do this check before removing from the registry since it'll\n // stop being considered as dragged once it is removed.\n if (this.isDragging()) {\n // Since we move out the element to the end of the body while it's being\n // dragged, we have to make sure that it's removed if it gets destroyed.\n this._rootElement?.remove();\n }\n this._anchor?.remove();\n this._destroyPreview();\n this._destroyPlaceholder();\n this._dragDropRegistry.removeDragItem(this);\n this._removeSubscriptions();\n this.beforeStarted.complete();\n this.started.complete();\n this.released.complete();\n this.ended.complete();\n this.entered.complete();\n this.exited.complete();\n this.dropped.complete();\n this._moveEvents.complete();\n this._handles = [];\n this._disabledHandles.clear();\n this._dropContainer = undefined;\n this._resizeSubscription.unsubscribe();\n this._parentPositions.clear();\n this._boundaryElement = this._rootElement = this._ownerSVGElement = this._placeholderTemplate = this._previewTemplate = this._anchor = this._parentDragRef = null;\n }\n /** Checks whether the element is currently being dragged. */\n isDragging() {\n return this._hasStartedDragging && this._dragDropRegistry.isDragging(this);\n }\n /** Resets a standalone drag item to its initial position. */\n reset() {\n this._rootElement.style.transform = this._initialTransform || '';\n this._activeTransform = {\n x: 0,\n y: 0\n };\n this._passiveTransform = {\n x: 0,\n y: 0\n };\n }\n /**\n * Sets a handle as disabled. While a handle is disabled, it'll capture and interrupt dragging.\n * @param handle Handle element that should be disabled.\n */\n disableHandle(handle) {\n if (!this._disabledHandles.has(handle) && this._handles.indexOf(handle) > -1) {\n this._disabledHandles.add(handle);\n toggleNativeDragInteractions(handle, true);\n }\n }\n /**\n * Enables a handle, if it has been disabled.\n * @param handle Handle element to be enabled.\n */\n enableHandle(handle) {\n if (this._disabledHandles.has(handle)) {\n this._disabledHandles.delete(handle);\n toggleNativeDragInteractions(handle, this.disabled);\n }\n }\n /** Sets the layout direction of the draggable item. */\n withDirection(direction) {\n this._direction = direction;\n return this;\n }\n /** Sets the container that the item is part of. */\n _withDropContainer(container) {\n this._dropContainer = container;\n }\n /**\n * Gets the current position in pixels the draggable outside of a drop container.\n */\n getFreeDragPosition() {\n const position = this.isDragging() ? this._activeTransform : this._passiveTransform;\n return {\n x: position.x,\n y: position.y\n };\n }\n /**\n * Sets the current position in pixels the draggable outside of a drop container.\n * @param value New position to be set.\n */\n setFreeDragPosition(value) {\n this._activeTransform = {\n x: 0,\n y: 0\n };\n this._passiveTransform.x = value.x;\n this._passiveTransform.y = value.y;\n if (!this._dropContainer) {\n this._applyRootElementTransform(value.x, value.y);\n }\n return this;\n }\n /**\n * Sets the container into which to insert the preview element.\n * @param value Container into which to insert the preview.\n */\n withPreviewContainer(value) {\n this._previewContainer = value;\n return this;\n }\n /** Updates the item's sort order based on the last-known pointer position. */\n _sortFromLastPointerPosition() {\n const position = this._lastKnownPointerPosition;\n if (position && this._dropContainer) {\n this._updateActiveDropContainer(this._getConstrainedPointerPosition(position), position);\n }\n }\n /** Unsubscribes from the global subscriptions. */\n _removeSubscriptions() {\n this._pointerMoveSubscription.unsubscribe();\n this._pointerUpSubscription.unsubscribe();\n this._scrollSubscription.unsubscribe();\n }\n /** Destroys the preview element and its ViewRef. */\n _destroyPreview() {\n this._preview?.remove();\n this._previewRef?.destroy();\n this._preview = this._previewRef = null;\n }\n /** Destroys the placeholder element and its ViewRef. */\n _destroyPlaceholder() {\n this._placeholder?.remove();\n this._placeholderRef?.destroy();\n this._placeholder = this._placeholderRef = null;\n }\n /**\n * Clears subscriptions and stops the dragging sequence.\n * @param event Browser event object that ended the sequence.\n */\n _endDragSequence(event) {\n // Note that here we use `isDragging` from the service, rather than from `this`.\n // The difference is that the one from the service reflects whether a dragging sequence\n // has been initiated, whereas the one on `this` includes whether the user has passed\n // the minimum dragging threshold.\n if (!this._dragDropRegistry.isDragging(this)) {\n return;\n }\n this._removeSubscriptions();\n this._dragDropRegistry.stopDragging(this);\n this._toggleNativeDragInteractions();\n if (this._handles) {\n this._rootElement.style.webkitTapHighlightColor = this._rootElementTapHighlight;\n }\n if (!this._hasStartedDragging) {\n return;\n }\n this.released.next({\n source: this,\n event\n });\n if (this._dropContainer) {\n // Stop scrolling immediately, instead of waiting for the animation to finish.\n this._dropContainer._stopScrolling();\n this._animatePreviewToPlaceholder().then(() => {\n this._cleanupDragArtifacts(event);\n this._cleanupCachedDimensions();\n this._dragDropRegistry.stopDragging(this);\n });\n } else {\n // Convert the active transform into a passive one. This means that next time\n // the user starts dragging the item, its position will be calculated relatively\n // to the new passive transform.\n this._passiveTransform.x = this._activeTransform.x;\n const pointerPosition = this._getPointerPositionOnPage(event);\n this._passiveTransform.y = this._activeTransform.y;\n this._ngZone.run(() => {\n this.ended.next({\n source: this,\n distance: this._getDragDistance(pointerPosition),\n dropPoint: pointerPosition,\n event\n });\n });\n this._cleanupCachedDimensions();\n this._dragDropRegistry.stopDragging(this);\n }\n }\n /** Starts the dragging sequence. */\n _startDragSequence(event) {\n if (isTouchEvent(event)) {\n this._lastTouchEventTime = Date.now();\n }\n this._toggleNativeDragInteractions();\n const dropContainer = this._dropContainer;\n if (dropContainer) {\n const element = this._rootElement;\n const parent = element.parentNode;\n const placeholder = this._placeholder = this._createPlaceholderElement();\n const anchor = this._anchor = this._anchor || this._document.createComment('');\n // Needs to happen before the root element is moved.\n const shadowRoot = this._getShadowRoot();\n // Insert an anchor node so that we can restore the element's position in the DOM.\n parent.insertBefore(anchor, element);\n // There's no risk of transforms stacking when inside a drop container so\n // we can keep the initial transform up to date any time dragging starts.\n this._initialTransform = element.style.transform || '';\n // Create the preview after the initial transform has\n // been cached, because it can be affected by the transform.\n this._preview = this._createPreviewElement();\n // We move the element out at the end of the body and we make it hidden, because keeping it in\n // place will throw off the consumer's `:last-child` selectors. We can't remove the element\n // from the DOM completely, because iOS will stop firing all subsequent events in the chain.\n toggleVisibility(element, false, dragImportantProperties);\n this._document.body.appendChild(parent.replaceChild(placeholder, element));\n this._getPreviewInsertionPoint(parent, shadowRoot).appendChild(this._preview);\n this.started.next({\n source: this,\n event\n }); // Emit before notifying the container.\n dropContainer.start();\n this._initialContainer = dropContainer;\n this._initialIndex = dropContainer.getItemIndex(this);\n } else {\n this.started.next({\n source: this,\n event\n });\n this._initialContainer = this._initialIndex = undefined;\n }\n // Important to run after we've called `start` on the parent container\n // so that it has had time to resolve its scrollable parents.\n this._parentPositions.cache(dropContainer ? dropContainer.getScrollableParents() : []);\n }\n /**\n * Sets up the different variables and subscriptions\n * that will be necessary for the dragging sequence.\n * @param referenceElement Element that started the drag sequence.\n * @param event Browser event object that started the sequence.\n */\n _initializeDragSequence(referenceElement, event) {\n // Stop propagation if the item is inside another\n // draggable so we don't start multiple drag sequences.\n if (this._parentDragRef) {\n event.stopPropagation();\n }\n const isDragging = this.isDragging();\n const isTouchSequence = isTouchEvent(event);\n const isAuxiliaryMouseButton = !isTouchSequence && event.button !== 0;\n const rootElement = this._rootElement;\n const target = _getEventTarget(event);\n const isSyntheticEvent = !isTouchSequence && this._lastTouchEventTime && this._lastTouchEventTime + MOUSE_EVENT_IGNORE_TIME > Date.now();\n const isFakeEvent = isTouchSequence ? isFakeTouchstartFromScreenReader(event) : isFakeMousedownFromScreenReader(event);\n // If the event started from an element with the native HTML drag&drop, it'll interfere\n // with our own dragging (e.g. `img` tags do it by default). Prevent the default action\n // to stop it from happening. Note that preventing on `dragstart` also seems to work, but\n // it's flaky and it fails if the user drags it away quickly. Also note that we only want\n // to do this for `mousedown` since doing the same for `touchstart` will stop any `click`\n // events from firing on touch devices.\n if (target && target.draggable && event.type === 'mousedown') {\n event.preventDefault();\n }\n // Abort if the user is already dragging or is using a mouse button other than the primary one.\n if (isDragging || isAuxiliaryMouseButton || isSyntheticEvent || isFakeEvent) {\n return;\n }\n // If we've got handles, we need to disable the tap highlight on the entire root element,\n // otherwise iOS will still add it, even though all the drag interactions on the handle\n // are disabled.\n if (this._handles.length) {\n const rootStyles = rootElement.style;\n this._rootElementTapHighlight = rootStyles.webkitTapHighlightColor || '';\n rootStyles.webkitTapHighlightColor = 'transparent';\n }\n this._hasStartedDragging = this._hasMoved = false;\n // Avoid multiple subscriptions and memory leaks when multi touch\n // (isDragging check above isn't enough because of possible temporal and/or dimensional delays)\n this._removeSubscriptions();\n this._initialClientRect = this._rootElement.getBoundingClientRect();\n this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);\n this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);\n this._scrollSubscription = this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(scrollEvent => this._updateOnScroll(scrollEvent));\n if (this._boundaryElement) {\n this._boundaryRect = getMutableClientRect(this._boundaryElement);\n }\n // If we have a custom preview we can't know ahead of time how large it'll be so we position\n // it next to the cursor. The exception is when the consumer has opted into making the preview\n // the same size as the root element, in which case we do know the size.\n const previewTemplate = this._previewTemplate;\n this._pickupPositionInElement = previewTemplate && previewTemplate.template && !previewTemplate.matchSize ? {\n x: 0,\n y: 0\n } : this._getPointerPositionInElement(this._initialClientRect, referenceElement, event);\n const pointerPosition = this._pickupPositionOnPage = this._lastKnownPointerPosition = this._getPointerPositionOnPage(event);\n this._pointerDirectionDelta = {\n x: 0,\n y: 0\n };\n this._pointerPositionAtLastDirectionChange = {\n x: pointerPosition.x,\n y: pointerPosition.y\n };\n this._dragStartTime = Date.now();\n this._dragDropRegistry.startDragging(this, event);\n }\n /** Cleans up the DOM artifacts that were added to facilitate the element being dragged. */\n _cleanupDragArtifacts(event) {\n // Restore the element's visibility and insert it at its old position in the DOM.\n // It's important that we maintain the position, because moving the element around in the DOM\n // can throw off `NgFor` which does smart diffing and re-creates elements only when necessary,\n // while moving the existing elements in all other cases.\n toggleVisibility(this._rootElement, true, dragImportantProperties);\n this._anchor.parentNode.replaceChild(this._rootElement, this._anchor);\n this._destroyPreview();\n this._destroyPlaceholder();\n this._initialClientRect = this._boundaryRect = this._previewRect = this._initialTransform = undefined;\n // Re-enter the NgZone since we bound `document` events on the outside.\n this._ngZone.run(() => {\n const container = this._dropContainer;\n const currentIndex = container.getItemIndex(this);\n const pointerPosition = this._getPointerPositionOnPage(event);\n const distance = this._getDragDistance(pointerPosition);\n const isPointerOverContainer = container._isOverContainer(pointerPosition.x, pointerPosition.y);\n this.ended.next({\n source: this,\n distance,\n dropPoint: pointerPosition,\n event\n });\n this.dropped.next({\n item: this,\n currentIndex,\n previousIndex: this._initialIndex,\n container: container,\n previousContainer: this._initialContainer,\n isPointerOverContainer,\n distance,\n dropPoint: pointerPosition,\n event\n });\n container.drop(this, currentIndex, this._initialIndex, this._initialContainer, isPointerOverContainer, distance, pointerPosition, event);\n this._dropContainer = this._initialContainer;\n });\n }\n /**\n * Updates the item's position in its drop container, or moves it\n * into a new one, depending on its current drag position.\n */\n _updateActiveDropContainer({\n x,\n y\n }, {\n x: rawX,\n y: rawY\n }) {\n // Drop container that draggable has been moved into.\n let newContainer = this._initialContainer._getSiblingContainerFromPosition(this, x, y);\n // If we couldn't find a new container to move the item into, and the item has left its\n // initial container, check whether the it's over the initial container. This handles the\n // case where two containers are connected one way and the user tries to undo dragging an\n // item into a new container.\n if (!newContainer && this._dropContainer !== this._initialContainer && this._initialContainer._isOverContainer(x, y)) {\n newContainer = this._initialContainer;\n }\n if (newContainer && newContainer !== this._dropContainer) {\n this._ngZone.run(() => {\n // Notify the old container that the item has left.\n this.exited.next({\n item: this,\n container: this._dropContainer\n });\n this._dropContainer.exit(this);\n // Notify the new container that the item has entered.\n this._dropContainer = newContainer;\n this._dropContainer.enter(this, x, y, newContainer === this._initialContainer &&\n // If we're re-entering the initial container and sorting is disabled,\n // put item the into its starting index to begin with.\n newContainer.sortingDisabled ? this._initialIndex : undefined);\n this.entered.next({\n item: this,\n container: newContainer,\n currentIndex: newContainer.getItemIndex(this)\n });\n });\n }\n // Dragging may have been interrupted as a result of the events above.\n if (this.isDragging()) {\n this._dropContainer._startScrollingIfNecessary(rawX, rawY);\n this._dropContainer._sortItem(this, x, y, this._pointerDirectionDelta);\n if (this.constrainPosition) {\n this._applyPreviewTransform(x, y);\n } else {\n this._applyPreviewTransform(x - this._pickupPositionInElement.x, y - this._pickupPositionInElement.y);\n }\n }\n }\n /**\n * Creates the element that will be rendered next to the user's pointer\n * and will be used as a preview of the element that is being dragged.\n */\n _createPreviewElement() {\n const previewConfig = this._previewTemplate;\n const previewClass = this.previewClass;\n const previewTemplate = previewConfig ? previewConfig.template : null;\n let preview;\n if (previewTemplate && previewConfig) {\n // Measure the element before we've inserted the preview\n // since the insertion could throw off the measurement.\n const rootRect = previewConfig.matchSize ? this._initialClientRect : null;\n const viewRef = previewConfig.viewContainer.createEmbeddedView(previewTemplate, previewConfig.context);\n viewRef.detectChanges();\n preview = getRootNode(viewRef, this._document);\n this._previewRef = viewRef;\n if (previewConfig.matchSize) {\n matchElementSize(preview, rootRect);\n } else {\n preview.style.transform = getTransform(this._pickupPositionOnPage.x, this._pickupPositionOnPage.y);\n }\n } else {\n preview = deepCloneNode(this._rootElement);\n matchElementSize(preview, this._initialClientRect);\n if (this._initialTransform) {\n preview.style.transform = this._initialTransform;\n }\n }\n extendStyles(preview.style, {\n // It's important that we disable the pointer events on the preview, because\n // it can throw off the `document.elementFromPoint` calls in the `CdkDropList`.\n 'pointer-events': 'none',\n // We have to reset the margin, because it can throw off positioning relative to the viewport.\n 'margin': '0',\n 'position': 'fixed',\n 'top': '0',\n 'left': '0',\n 'z-index': `${this._config.zIndex || 1000}`\n }, dragImportantProperties);\n toggleNativeDragInteractions(preview, false);\n preview.classList.add('cdk-drag-preview');\n preview.setAttribute('dir', this._direction);\n if (previewClass) {\n if (Array.isArray(previewClass)) {\n previewClass.forEach(className => preview.classList.add(className));\n } else {\n preview.classList.add(previewClass);\n }\n }\n return preview;\n }\n /**\n * Animates the preview element from its current position to the location of the drop placeholder.\n * @returns Promise that resolves when the animation completes.\n */\n _animatePreviewToPlaceholder() {\n // If the user hasn't moved yet, the transitionend event won't fire.\n if (!this._hasMoved) {\n return Promise.resolve();\n }\n const placeholderRect = this._placeholder.getBoundingClientRect();\n // Apply the class that adds a transition to the preview.\n this._preview.classList.add('cdk-drag-animating');\n // Move the preview to the placeholder position.\n this._applyPreviewTransform(placeholderRect.left, placeholderRect.top);\n // If the element doesn't have a `transition`, the `transitionend` event won't fire. Since\n // we need to trigger a style recalculation in order for the `cdk-drag-animating` class to\n // apply its style, we take advantage of the available info to figure out whether we need to\n // bind the event in the first place.\n const duration = getTransformTransitionDurationInMs(this._preview);\n if (duration === 0) {\n return Promise.resolve();\n }\n return this._ngZone.runOutsideAngular(() => {\n return new Promise(resolve => {\n const handler = event => {\n if (!event || _getEventTarget(event) === this._preview && event.propertyName === 'transform') {\n this._preview?.removeEventListener('transitionend', handler);\n resolve();\n clearTimeout(timeout);\n }\n };\n // If a transition is short enough, the browser might not fire the `transitionend` event.\n // Since we know how long it's supposed to take, add a timeout with a 50% buffer that'll\n // fire if the transition hasn't completed when it was supposed to.\n const timeout = setTimeout(handler, duration * 1.5);\n this._preview.addEventListener('transitionend', handler);\n });\n });\n }\n /** Creates an element that will be shown instead of the current element while dragging. */\n _createPlaceholderElement() {\n const placeholderConfig = this._placeholderTemplate;\n const placeholderTemplate = placeholderConfig ? placeholderConfig.template : null;\n let placeholder;\n if (placeholderTemplate) {\n this._placeholderRef = placeholderConfig.viewContainer.createEmbeddedView(placeholderTemplate, placeholderConfig.context);\n this._placeholderRef.detectChanges();\n placeholder = getRootNode(this._placeholderRef, this._document);\n } else {\n placeholder = deepCloneNode(this._rootElement);\n }\n // Stop pointer events on the preview so the user can't\n // interact with it while the preview is animating.\n placeholder.style.pointerEvents = 'none';\n placeholder.classList.add('cdk-drag-placeholder');\n return placeholder;\n }\n /**\n * Figures out the coordinates at which an element was picked up.\n * @param referenceElement Element that initiated the dragging.\n * @param event Event that initiated the dragging.\n */\n _getPointerPositionInElement(elementRect, referenceElement, event) {\n const handleElement = referenceElement === this._rootElement ? null : referenceElement;\n const referenceRect = handleElement ? handleElement.getBoundingClientRect() : elementRect;\n const point = isTouchEvent(event) ? event.targetTouches[0] : event;\n const scrollPosition = this._getViewportScrollPosition();\n const x = point.pageX - referenceRect.left - scrollPosition.left;\n const y = point.pageY - referenceRect.top - scrollPosition.top;\n return {\n x: referenceRect.left - elementRect.left + x,\n y: referenceRect.top - elementRect.top + y\n };\n }\n /** Determines the point of the page that was touched by the user. */\n _getPointerPositionOnPage(event) {\n const scrollPosition = this._getViewportScrollPosition();\n const point = isTouchEvent(event) ?\n // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\n // Also note that on real devices we're guaranteed for either `touches` or `changedTouches`\n // to have a value, but Firefox in device emulation mode has a bug where both can be empty\n // for `touchstart` and `touchend` so we fall back to a dummy object in order to avoid\n // throwing an error. The value returned here will be incorrect, but since this only\n // breaks inside a developer tool and the value is only used for secondary information,\n // we can get away with it. See https://bugzilla.mozilla.org/show_bug.cgi?id=1615824.\n event.touches[0] || event.changedTouches[0] || {\n pageX: 0,\n pageY: 0\n } : event;\n const x = point.pageX - scrollPosition.left;\n const y = point.pageY - scrollPosition.top;\n // if dragging SVG element, try to convert from the screen coordinate system to the SVG\n // coordinate system\n if (this._ownerSVGElement) {\n const svgMatrix = this._ownerSVGElement.getScreenCTM();\n if (svgMatrix) {\n const svgPoint = this._ownerSVGElement.createSVGPoint();\n svgPoint.x = x;\n svgPoint.y = y;\n return svgPoint.matrixTransform(svgMatrix.inverse());\n }\n }\n return {\n x,\n y\n };\n }\n /** Gets the pointer position on the page, accounting for any position constraints. */\n _getConstrainedPointerPosition(point) {\n const dropContainerLock = this._dropContainer ? this._dropContainer.lockAxis : null;\n let {\n x,\n y\n } = this.constrainPosition ? this.constrainPosition(point, this, this._initialClientRect, this._pickupPositionInElement) : point;\n if (this.lockAxis === 'x' || dropContainerLock === 'x') {\n y = this._pickupPositionOnPage.y - (this.constrainPosition ? this._pickupPositionInElement.y : 0);\n } else if (this.lockAxis === 'y' || dropContainerLock === 'y') {\n x = this._pickupPositionOnPage.x - (this.constrainPosition ? this._pickupPositionInElement.x : 0);\n }\n if (this._boundaryRect) {\n // If not using a custom constrain we need to account for the pickup position in the element\n // otherwise we do not need to do this, as it has already been accounted for\n const {\n x: pickupX,\n y: pickupY\n } = !this.constrainPosition ? this._pickupPositionInElement : {\n x: 0,\n y: 0\n };\n const boundaryRect = this._boundaryRect;\n const {\n width: previewWidth,\n height: previewHeight\n } = this._getPreviewRect();\n const minY = boundaryRect.top + pickupY;\n const maxY = boundaryRect.bottom - (previewHeight - pickupY);\n const minX = boundaryRect.left + pickupX;\n const maxX = boundaryRect.right - (previewWidth - pickupX);\n x = clamp$1(x, minX, maxX);\n y = clamp$1(y, minY, maxY);\n }\n return {\n x,\n y\n };\n }\n /** Updates the current drag delta, based on the user's current pointer position on the page. */\n _updatePointerDirectionDelta(pointerPositionOnPage) {\n const {\n x,\n y\n } = pointerPositionOnPage;\n const delta = this._pointerDirectionDelta;\n const positionSinceLastChange = this._pointerPositionAtLastDirectionChange;\n // Amount of pixels the user has dragged since the last time the direction changed.\n const changeX = Math.abs(x - positionSinceLastChange.x);\n const changeY = Math.abs(y - positionSinceLastChange.y);\n // Because we handle pointer events on a per-pixel basis, we don't want the delta\n // to change for every pixel, otherwise anything that depends on it can look erratic.\n // To make the delta more consistent, we track how much the user has moved since the last\n // delta change and we only update it after it has reached a certain threshold.\n if (changeX > this._config.pointerDirectionChangeThreshold) {\n delta.x = x > positionSinceLastChange.x ? 1 : -1;\n positionSinceLastChange.x = x;\n }\n if (changeY > this._config.pointerDirectionChangeThreshold) {\n delta.y = y > positionSinceLastChange.y ? 1 : -1;\n positionSinceLastChange.y = y;\n }\n return delta;\n }\n /** Toggles the native drag interactions, based on how many handles are registered. */\n _toggleNativeDragInteractions() {\n if (!this._rootElement || !this._handles) {\n return;\n }\n const shouldEnable = this._handles.length > 0 || !this.isDragging();\n if (shouldEnable !== this._nativeInteractionsEnabled) {\n this._nativeInteractionsEnabled = shouldEnable;\n toggleNativeDragInteractions(this._rootElement, shouldEnable);\n }\n }\n /** Removes the manually-added event listeners from the root element. */\n _removeRootElementListeners(element) {\n element.removeEventListener('mousedown', this._pointerDown, activeEventListenerOptions);\n element.removeEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\n element.removeEventListener('dragstart', this._nativeDragStart, activeEventListenerOptions);\n }\n /**\n * Applies a `transform` to the root element, taking into account any existing transforms on it.\n * @param x New transform value along the X axis.\n * @param y New transform value along the Y axis.\n */\n _applyRootElementTransform(x, y) {\n const transform = getTransform(x, y);\n const styles = this._rootElement.style;\n // Cache the previous transform amount only after the first drag sequence, because\n // we don't want our own transforms to stack on top of each other.\n // Should be excluded none because none + translate3d(x, y, x) is invalid css\n if (this._initialTransform == null) {\n this._initialTransform = styles.transform && styles.transform != 'none' ? styles.transform : '';\n }\n // Preserve the previous `transform` value, if there was one. Note that we apply our own\n // transform before the user's, because things like rotation can affect which direction\n // the element will be translated towards.\n styles.transform = combineTransforms(transform, this._initialTransform);\n }\n /**\n * Applies a `transform` to the preview, taking into account any existing transforms on it.\n * @param x New transform value along the X axis.\n * @param y New transform value along the Y axis.\n */\n _applyPreviewTransform(x, y) {\n // Only apply the initial transform if the preview is a clone of the original element, otherwise\n // it could be completely different and the transform might not make sense anymore.\n const initialTransform = this._previewTemplate?.template ? undefined : this._initialTransform;\n const transform = getTransform(x, y);\n this._preview.style.transform = combineTransforms(transform, initialTransform);\n }\n /**\n * Gets the distance that the user has dragged during the current drag sequence.\n * @param currentPosition Current position of the user's pointer.\n */\n _getDragDistance(currentPosition) {\n const pickupPosition = this._pickupPositionOnPage;\n if (pickupPosition) {\n return {\n x: currentPosition.x - pickupPosition.x,\n y: currentPosition.y - pickupPosition.y\n };\n }\n return {\n x: 0,\n y: 0\n };\n }\n /** Cleans up any cached element dimensions that we don't need after dragging has stopped. */\n _cleanupCachedDimensions() {\n this._boundaryRect = this._previewRect = undefined;\n this._parentPositions.clear();\n }\n /**\n * Checks whether the element is still inside its boundary after the viewport has been resized.\n * If not, the position is adjusted so that the element fits again.\n */\n _containInsideBoundaryOnResize() {\n let {\n x,\n y\n } = this._passiveTransform;\n if (x === 0 && y === 0 || this.isDragging() || !this._boundaryElement) {\n return;\n }\n // Note: don't use `_clientRectAtStart` here, because we want the latest position.\n const elementRect = this._rootElement.getBoundingClientRect();\n const boundaryRect = this._boundaryElement.getBoundingClientRect();\n // It's possible that the element got hidden away after dragging (e.g. by switching to a\n // different tab). Don't do anything in this case so we don't clear the user's position.\n if (boundaryRect.width === 0 && boundaryRect.height === 0 || elementRect.width === 0 && elementRect.height === 0) {\n return;\n }\n const leftOverflow = boundaryRect.left - elementRect.left;\n const rightOverflow = elementRect.right - boundaryRect.right;\n const topOverflow = boundaryRect.top - elementRect.top;\n const bottomOverflow = elementRect.bottom - boundaryRect.bottom;\n // If the element has become wider than the boundary, we can't\n // do much to make it fit so we just anchor it to the left.\n if (boundaryRect.width > elementRect.width) {\n if (leftOverflow > 0) {\n x += leftOverflow;\n }\n if (rightOverflow > 0) {\n x -= rightOverflow;\n }\n } else {\n x = 0;\n }\n // If the element has become taller than the boundary, we can't\n // do much to make it fit so we just anchor it to the top.\n if (boundaryRect.height > elementRect.height) {\n if (topOverflow > 0) {\n y += topOverflow;\n }\n if (bottomOverflow > 0) {\n y -= bottomOverflow;\n }\n } else {\n y = 0;\n }\n if (x !== this._passiveTransform.x || y !== this._passiveTransform.y) {\n this.setFreeDragPosition({\n y,\n x\n });\n }\n }\n /** Gets the drag start delay, based on the event type. */\n _getDragStartDelay(event) {\n const value = this.dragStartDelay;\n if (typeof value === 'number') {\n return value;\n } else if (isTouchEvent(event)) {\n return value.touch;\n }\n return value ? value.mouse : 0;\n }\n /** Updates the internal state of the draggable element when scrolling has occurred. */\n _updateOnScroll(event) {\n const scrollDifference = this._parentPositions.handleScroll(event);\n if (scrollDifference) {\n const target = _getEventTarget(event);\n // ClientRect dimensions are based on the scroll position of the page and its parent\n // node so we have to update the cached boundary ClientRect if the user has scrolled.\n if (this._boundaryRect && target !== this._boundaryElement && target.contains(this._boundaryElement)) {\n adjustClientRect(this._boundaryRect, scrollDifference.top, scrollDifference.left);\n }\n this._pickupPositionOnPage.x += scrollDifference.left;\n this._pickupPositionOnPage.y += scrollDifference.top;\n // If we're in free drag mode, we have to update the active transform, because\n // it isn't relative to the viewport like the preview inside a drop list.\n if (!this._dropContainer) {\n this._activeTransform.x -= scrollDifference.left;\n this._activeTransform.y -= scrollDifference.top;\n this._applyRootElementTransform(this._activeTransform.x, this._activeTransform.y);\n }\n }\n }\n /** Gets the scroll position of the viewport. */\n _getViewportScrollPosition() {\n return this._parentPositions.positions.get(this._document)?.scrollPosition || this._parentPositions.getViewportScrollPosition();\n }\n /**\n * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n * than saving it in property directly on init, because we want to resolve it as late as possible\n * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n */\n _getShadowRoot() {\n if (this._cachedShadowRoot === undefined) {\n this._cachedShadowRoot = _getShadowRoot(this._rootElement);\n }\n return this._cachedShadowRoot;\n }\n /** Gets the element into which the drag preview should be inserted. */\n _getPreviewInsertionPoint(initialParent, shadowRoot) {\n const previewContainer = this._previewContainer || 'global';\n if (previewContainer === 'parent') {\n return initialParent;\n }\n if (previewContainer === 'global') {\n const documentRef = this._document;\n // We can't use the body if the user is in fullscreen mode,\n // because the preview will render under the fullscreen element.\n // TODO(crisbeto): dedupe this with the `FullscreenOverlayContainer` eventually.\n return shadowRoot || documentRef.fullscreenElement || documentRef.webkitFullscreenElement || documentRef.mozFullScreenElement || documentRef.msFullscreenElement || documentRef.body;\n }\n return coerceElement(previewContainer);\n }\n /** Lazily resolves and returns the dimensions of the preview. */\n _getPreviewRect() {\n // Cache the preview element rect if we haven't cached it already or if\n // we cached it too early before the element dimensions were computed.\n if (!this._previewRect || !this._previewRect.width && !this._previewRect.height) {\n this._previewRect = this._preview ? this._preview.getBoundingClientRect() : this._initialClientRect;\n }\n return this._previewRect;\n }\n /** Gets a handle that is the target of an event. */\n _getTargetHandle(event) {\n return this._handles.find(handle => {\n return event.target && (event.target === handle || handle.contains(event.target));\n });\n }\n}\n/**\n * Gets a 3d `transform` that can be applied to an element.\n * @param x Desired position of the element along the X axis.\n * @param y Desired position of the element along the Y axis.\n */\nfunction getTransform(x, y) {\n // Round the transforms since some browsers will\n // blur the elements for sub-pixel transforms.\n return `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)`;\n}\n/** Clamps a value between a minimum and a maximum. */\nfunction clamp$1(value, min, max) {\n return Math.max(min, Math.min(max, value));\n}\n/** Determines whether an event is a touch event. */\nfunction isTouchEvent(event) {\n // This function is called for every pixel that the user has dragged so we need it to be\n // as fast as possible. Since we only bind mouse events and touch events, we can assume\n // that if the event's name starts with `t`, it's a touch event.\n return event.type[0] === 't';\n}\n/**\n * Gets the root HTML element of an embedded view.\n * If the root is not an HTML element it gets wrapped in one.\n */\nfunction getRootNode(viewRef, _document) {\n const rootNodes = viewRef.rootNodes;\n if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {\n return rootNodes[0];\n }\n const wrapper = _document.createElement('div');\n rootNodes.forEach(node => wrapper.appendChild(node));\n return wrapper;\n}\n/**\n * Matches the target element's size to the source's size.\n * @param target Element that needs to be resized.\n * @param sourceRect Dimensions of the source element.\n */\nfunction matchElementSize(target, sourceRect) {\n target.style.width = `${sourceRect.width}px`;\n target.style.height = `${sourceRect.height}px`;\n target.style.transform = getTransform(sourceRect.left, sourceRect.top);\n}\n\n/**\n * Moves an item one index in an array to another.\n * @param array Array in which to move the item.\n * @param fromIndex Starting index of the item.\n * @param toIndex Index to which the item should be moved.\n */\nfunction moveItemInArray(array, fromIndex, toIndex) {\n const from = clamp(fromIndex, array.length - 1);\n const to = clamp(toIndex, array.length - 1);\n if (from === to) {\n return;\n }\n const target = array[from];\n const delta = to < from ? -1 : 1;\n for (let i = from; i !== to; i += delta) {\n array[i] = array[i + delta];\n }\n array[to] = target;\n}\n/**\n * Moves an item from one array to another.\n * @param currentArray Array from which to transfer the item.\n * @param targetArray Array into which to put the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n */\nfunction transferArrayItem(currentArray, targetArray, currentIndex, targetIndex) {\n const from = clamp(currentIndex, currentArray.length - 1);\n const to = clamp(targetIndex, targetArray.length);\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray.splice(from, 1)[0]);\n }\n}\n/**\n * Copies an item from one array to another, leaving it in its\n * original position in current array.\n * @param currentArray Array from which to copy the item.\n * @param targetArray Array into which is copy the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n *\n */\nfunction copyArrayItem(currentArray, targetArray, currentIndex, targetIndex) {\n const to = clamp(targetIndex, targetArray.length);\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray[currentIndex]);\n }\n}\n/** Clamps a number between zero and a maximum. */\nfunction clamp(value, max) {\n return Math.max(0, Math.min(max, value));\n}\n\n/**\n * Strategy that only supports sorting along a single axis.\n * Items are reordered using CSS transforms which allows for sorting to be animated.\n * @docs-private\n */\nclass SingleAxisSortStrategy {\n constructor(_element, _dragDropRegistry) {\n this._element = _element;\n this._dragDropRegistry = _dragDropRegistry;\n /** Cache of the dimensions of all the items inside the container. */\n this._itemPositions = [];\n /** Direction in which the list is oriented. */\n this.orientation = 'vertical';\n /**\n * Keeps track of the item that was last swapped with the dragged item, as well as what direction\n * the pointer was moving in when the swap occurred and whether the user's pointer continued to\n * overlap with the swapped item after the swapping occurred.\n */\n this._previousSwap = {\n drag: null,\n delta: 0,\n overlaps: false\n };\n }\n /**\n * To be called when the drag sequence starts.\n * @param items Items that are currently in the list.\n */\n start(items) {\n this.withItems(items);\n }\n /**\n * To be called when an item is being sorted.\n * @param item Item to be sorted.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param pointerDelta Direction in which the pointer is moving along each axis.\n */\n sort(item, pointerX, pointerY, pointerDelta) {\n const siblings = this._itemPositions;\n const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY, pointerDelta);\n if (newIndex === -1 && siblings.length > 0) {\n return null;\n }\n const isHorizontal = this.orientation === 'horizontal';\n const currentIndex = siblings.findIndex(currentItem => currentItem.drag === item);\n const siblingAtNewPosition = siblings[newIndex];\n const currentPosition = siblings[currentIndex].clientRect;\n const newPosition = siblingAtNewPosition.clientRect;\n const delta = currentIndex > newIndex ? 1 : -1;\n // How many pixels the item's placeholder should be offset.\n const itemOffset = this._getItemOffsetPx(currentPosition, newPosition, delta);\n // How many pixels all the other items should be offset.\n const siblingOffset = this._getSiblingOffsetPx(currentIndex, siblings, delta);\n // Save the previous order of the items before moving the item to its new index.\n // We use this to check whether an item has been moved as a result of the sorting.\n const oldOrder = siblings.slice();\n // Shuffle the array in place.\n moveItemInArray(siblings, currentIndex, newIndex);\n siblings.forEach((sibling, index) => {\n // Don't do anything if the position hasn't changed.\n if (oldOrder[index] === sibling) {\n return;\n }\n const isDraggedItem = sibling.drag === item;\n const offset = isDraggedItem ? itemOffset : siblingOffset;\n const elementToOffset = isDraggedItem ? item.getPlaceholderElement() : sibling.drag.getRootElement();\n // Update the offset to reflect the new position.\n sibling.offset += offset;\n // Since we're moving the items with a `transform`, we need to adjust their cached\n // client rects to reflect their new position, as well as swap their positions in the cache.\n // Note that we shouldn't use `getBoundingClientRect` here to update the cache, because the\n // elements may be mid-animation which will give us a wrong result.\n if (isHorizontal) {\n // Round the transforms since some browsers will\n // blur the elements, for sub-pixel transforms.\n elementToOffset.style.transform = combineTransforms(`translate3d(${Math.round(sibling.offset)}px, 0, 0)`, sibling.initialTransform);\n adjustClientRect(sibling.clientRect, 0, offset);\n } else {\n elementToOffset.style.transform = combineTransforms(`translate3d(0, ${Math.round(sibling.offset)}px, 0)`, sibling.initialTransform);\n adjustClientRect(sibling.clientRect, offset, 0);\n }\n });\n // Note that it's important that we do this after the client rects have been adjusted.\n this._previousSwap.overlaps = isInsideClientRect(newPosition, pointerX, pointerY);\n this._previousSwap.drag = siblingAtNewPosition.drag;\n this._previousSwap.delta = isHorizontal ? pointerDelta.x : pointerDelta.y;\n return {\n previousIndex: currentIndex,\n currentIndex: newIndex\n };\n }\n /**\n * Called when an item is being moved into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param index Index at which the item entered. If omitted, the container will try to figure it\n * out automatically.\n */\n enter(item, pointerX, pointerY, index) {\n const newIndex = index == null || index < 0 ?\n // We use the coordinates of where the item entered the drop\n // zone to figure out at which index it should be inserted.\n this._getItemIndexFromPointerPosition(item, pointerX, pointerY) : index;\n const activeDraggables = this._activeDraggables;\n const currentIndex = activeDraggables.indexOf(item);\n const placeholder = item.getPlaceholderElement();\n let newPositionReference = activeDraggables[newIndex];\n // If the item at the new position is the same as the item that is being dragged,\n // it means that we're trying to restore the item to its initial position. In this\n // case we should use the next item from the list as the reference.\n if (newPositionReference === item) {\n newPositionReference = activeDraggables[newIndex + 1];\n }\n // If we didn't find a new position reference, it means that either the item didn't start off\n // in this container, or that the item requested to be inserted at the end of the list.\n if (!newPositionReference && (newIndex == null || newIndex === -1 || newIndex < activeDraggables.length - 1) && this._shouldEnterAsFirstChild(pointerX, pointerY)) {\n newPositionReference = activeDraggables[0];\n }\n // Since the item may be in the `activeDraggables` already (e.g. if the user dragged it\n // into another container and back again), we have to ensure that it isn't duplicated.\n if (currentIndex > -1) {\n activeDraggables.splice(currentIndex, 1);\n }\n // Don't use items that are being dragged as a reference, because\n // their element has been moved down to the bottom of the body.\n if (newPositionReference && !this._dragDropRegistry.isDragging(newPositionReference)) {\n const element = newPositionReference.getRootElement();\n element.parentElement.insertBefore(placeholder, element);\n activeDraggables.splice(newIndex, 0, item);\n } else {\n coerceElement(this._element).appendChild(placeholder);\n activeDraggables.push(item);\n }\n // The transform needs to be cleared so it doesn't throw off the measurements.\n placeholder.style.transform = '';\n // Note that usually `start` is called together with `enter` when an item goes into a new\n // container. This will cache item positions, but we need to refresh them since the amount\n // of items has changed.\n this._cacheItemPositions();\n }\n /** Sets the items that are currently part of the list. */\n withItems(items) {\n this._activeDraggables = items.slice();\n this._cacheItemPositions();\n }\n /** Assigns a sort predicate to the strategy. */\n withSortPredicate(predicate) {\n this._sortPredicate = predicate;\n }\n /** Resets the strategy to its initial state before dragging was started. */\n reset() {\n // TODO(crisbeto): may have to wait for the animations to finish.\n this._activeDraggables.forEach(item => {\n const rootElement = item.getRootElement();\n if (rootElement) {\n const initialTransform = this._itemPositions.find(p => p.drag === item)?.initialTransform;\n rootElement.style.transform = initialTransform || '';\n }\n });\n this._itemPositions = [];\n this._activeDraggables = [];\n this._previousSwap.drag = null;\n this._previousSwap.delta = 0;\n this._previousSwap.overlaps = false;\n }\n /**\n * Gets a snapshot of items currently in the list.\n * Can include items that we dragged in from another list.\n */\n getActiveItemsSnapshot() {\n return this._activeDraggables;\n }\n /** Gets the index of a specific item. */\n getItemIndex(item) {\n // Items are sorted always by top/left in the cache, however they flow differently in RTL.\n // The rest of the logic still stands no matter what orientation we're in, however\n // we need to invert the array when determining the index.\n const items = this.orientation === 'horizontal' && this.direction === 'rtl' ? this._itemPositions.slice().reverse() : this._itemPositions;\n return items.findIndex(currentItem => currentItem.drag === item);\n }\n /** Used to notify the strategy that the scroll position has changed. */\n updateOnScroll(topDifference, leftDifference) {\n // Since we know the amount that the user has scrolled we can shift all of the\n // client rectangles ourselves. This is cheaper than re-measuring everything and\n // we can avoid inconsistent behavior where we might be measuring the element before\n // its position has changed.\n this._itemPositions.forEach(({\n clientRect\n }) => {\n adjustClientRect(clientRect, topDifference, leftDifference);\n });\n // We need two loops for this, because we want all of the cached\n // positions to be up-to-date before we re-sort the item.\n this._itemPositions.forEach(({\n drag\n }) => {\n if (this._dragDropRegistry.isDragging(drag)) {\n // We need to re-sort the item manually, because the pointer move\n // events won't be dispatched while the user is scrolling.\n drag._sortFromLastPointerPosition();\n }\n });\n }\n /** Refreshes the position cache of the items and sibling containers. */\n _cacheItemPositions() {\n const isHorizontal = this.orientation === 'horizontal';\n this._itemPositions = this._activeDraggables.map(drag => {\n const elementToMeasure = drag.getVisibleElement();\n return {\n drag,\n offset: 0,\n initialTransform: elementToMeasure.style.transform || '',\n clientRect: getMutableClientRect(elementToMeasure)\n };\n }).sort((a, b) => {\n return isHorizontal ? a.clientRect.left - b.clientRect.left : a.clientRect.top - b.clientRect.top;\n });\n }\n /**\n * Gets the offset in pixels by which the item that is being dragged should be moved.\n * @param currentPosition Current position of the item.\n * @param newPosition Position of the item where the current item should be moved.\n * @param delta Direction in which the user is moving.\n */\n _getItemOffsetPx(currentPosition, newPosition, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n let itemOffset = isHorizontal ? newPosition.left - currentPosition.left : newPosition.top - currentPosition.top;\n // Account for differences in the item width/height.\n if (delta === -1) {\n itemOffset += isHorizontal ? newPosition.width - currentPosition.width : newPosition.height - currentPosition.height;\n }\n return itemOffset;\n }\n /**\n * Gets the offset in pixels by which the items that aren't being dragged should be moved.\n * @param currentIndex Index of the item currently being dragged.\n * @param siblings All of the items in the list.\n * @param delta Direction in which the user is moving.\n */\n _getSiblingOffsetPx(currentIndex, siblings, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n const currentPosition = siblings[currentIndex].clientRect;\n const immediateSibling = siblings[currentIndex + delta * -1];\n let siblingOffset = currentPosition[isHorizontal ? 'width' : 'height'] * delta;\n if (immediateSibling) {\n const start = isHorizontal ? 'left' : 'top';\n const end = isHorizontal ? 'right' : 'bottom';\n // Get the spacing between the start of the current item and the end of the one immediately\n // after it in the direction in which the user is dragging, or vice versa. We add it to the\n // offset in order to push the element to where it will be when it's inline and is influenced\n // by the `margin` of its siblings.\n if (delta === -1) {\n siblingOffset -= immediateSibling.clientRect[start] - currentPosition[end];\n } else {\n siblingOffset += currentPosition[start] - immediateSibling.clientRect[end];\n }\n }\n return siblingOffset;\n }\n /**\n * Checks if pointer is entering in the first position\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n */\n _shouldEnterAsFirstChild(pointerX, pointerY) {\n if (!this._activeDraggables.length) {\n return false;\n }\n const itemPositions = this._itemPositions;\n const isHorizontal = this.orientation === 'horizontal';\n // `itemPositions` are sorted by position while `activeDraggables` are sorted by child index\n // check if container is using some sort of \"reverse\" ordering (eg: flex-direction: row-reverse)\n const reversed = itemPositions[0].drag !== this._activeDraggables[0];\n if (reversed) {\n const lastItemRect = itemPositions[itemPositions.length - 1].clientRect;\n return isHorizontal ? pointerX >= lastItemRect.right : pointerY >= lastItemRect.bottom;\n } else {\n const firstItemRect = itemPositions[0].clientRect;\n return isHorizontal ? pointerX <= firstItemRect.left : pointerY <= firstItemRect.top;\n }\n }\n /**\n * Gets the index of an item in the drop container, based on the position of the user's pointer.\n * @param item Item that is being sorted.\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n * @param delta Direction in which the user is moving their pointer.\n */\n _getItemIndexFromPointerPosition(item, pointerX, pointerY, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n const index = this._itemPositions.findIndex(({\n drag,\n clientRect\n }) => {\n // Skip the item itself.\n if (drag === item) {\n return false;\n }\n if (delta) {\n const direction = isHorizontal ? delta.x : delta.y;\n // If the user is still hovering over the same item as last time, their cursor hasn't left\n // the item after we made the swap, and they didn't change the direction in which they're\n // dragging, we don't consider it a direction swap.\n if (drag === this._previousSwap.drag && this._previousSwap.overlaps && direction === this._previousSwap.delta) {\n return false;\n }\n }\n return isHorizontal ?\n // Round these down since most browsers report client rects with\n // sub-pixel precision, whereas the pointer coordinates are rounded to pixels.\n pointerX >= Math.floor(clientRect.left) && pointerX < Math.floor(clientRect.right) : pointerY >= Math.floor(clientRect.top) && pointerY < Math.floor(clientRect.bottom);\n });\n return index === -1 || !this._sortPredicate(index, item) ? -1 : index;\n }\n}\n\n/**\n * Proximity, as a ratio to width/height, at which a\n * dragged item will affect the drop container.\n */\nconst DROP_PROXIMITY_THRESHOLD = 0.05;\n/**\n * Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the\n * viewport. The value comes from trying it out manually until it feels right.\n */\nconst SCROLL_PROXIMITY_THRESHOLD = 0.05;\n/**\n * Reference to a drop list. Used to manipulate or dispose of the container.\n */\nclass DropListRef {\n constructor(element, _dragDropRegistry, _document, _ngZone, _viewportRuler) {\n this._dragDropRegistry = _dragDropRegistry;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n /** Whether starting a dragging sequence from this container is disabled. */\n this.disabled = false;\n /** Whether sorting items within the list is disabled. */\n this.sortingDisabled = false;\n /**\n * Whether auto-scrolling the view when the user\n * moves their pointer close to the edges is disabled.\n */\n this.autoScrollDisabled = false;\n /** Number of pixels to scroll for each frame when auto-scrolling an element. */\n this.autoScrollStep = 2;\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n this.enterPredicate = () => true;\n /** Function that is used to determine whether an item can be sorted into a particular index. */\n this.sortPredicate = () => true;\n /** Emits right before dragging has started. */\n this.beforeStarted = new Subject();\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n this.entered = new Subject();\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n this.exited = new Subject();\n /** Emits when the user drops an item inside the container. */\n this.dropped = new Subject();\n /** Emits as the user is swapping items while actively dragging. */\n this.sorted = new Subject();\n /** Emits when a dragging sequence is started in a list connected to the current one. */\n this.receivingStarted = new Subject();\n /** Emits when a dragging sequence is stopped from a list connected to the current one. */\n this.receivingStopped = new Subject();\n /** Whether an item in the list is being dragged. */\n this._isDragging = false;\n /** Draggable items in the container. */\n this._draggables = [];\n /** Drop lists that are connected to the current one. */\n this._siblings = [];\n /** Connected siblings that currently have a dragged item. */\n this._activeSiblings = new Set();\n /** Subscription to the window being scrolled. */\n this._viewportScrollSubscription = Subscription.EMPTY;\n /** Vertical direction in which the list is currently scrolling. */\n this._verticalScrollDirection = 0 /* AutoScrollVerticalDirection.NONE */;\n /** Horizontal direction in which the list is currently scrolling. */\n this._horizontalScrollDirection = 0 /* AutoScrollHorizontalDirection.NONE */;\n /** Used to signal to the current auto-scroll sequence when to stop. */\n this._stopScrollTimers = new Subject();\n /** Shadow root of the current element. Necessary for `elementFromPoint` to resolve correctly. */\n this._cachedShadowRoot = null;\n /** Starts the interval that'll auto-scroll the element. */\n this._startScrollInterval = () => {\n this._stopScrolling();\n interval(0, animationFrameScheduler).pipe(takeUntil(this._stopScrollTimers)).subscribe(() => {\n const node = this._scrollNode;\n const scrollStep = this.autoScrollStep;\n if (this._verticalScrollDirection === 1 /* AutoScrollVerticalDirection.UP */) {\n node.scrollBy(0, -scrollStep);\n } else if (this._verticalScrollDirection === 2 /* AutoScrollVerticalDirection.DOWN */) {\n node.scrollBy(0, scrollStep);\n }\n if (this._horizontalScrollDirection === 1 /* AutoScrollHorizontalDirection.LEFT */) {\n node.scrollBy(-scrollStep, 0);\n } else if (this._horizontalScrollDirection === 2 /* AutoScrollHorizontalDirection.RIGHT */) {\n node.scrollBy(scrollStep, 0);\n }\n });\n };\n this.element = coerceElement(element);\n this._document = _document;\n this.withScrollableParents([this.element]);\n _dragDropRegistry.registerDropContainer(this);\n this._parentPositions = new ParentPositionTracker(_document);\n this._sortStrategy = new SingleAxisSortStrategy(this.element, _dragDropRegistry);\n this._sortStrategy.withSortPredicate((index, item) => this.sortPredicate(index, item, this));\n }\n /** Removes the drop list functionality from the DOM element. */\n dispose() {\n this._stopScrolling();\n this._stopScrollTimers.complete();\n this._viewportScrollSubscription.unsubscribe();\n this.beforeStarted.complete();\n this.entered.complete();\n this.exited.complete();\n this.dropped.complete();\n this.sorted.complete();\n this.receivingStarted.complete();\n this.receivingStopped.complete();\n this._activeSiblings.clear();\n this._scrollNode = null;\n this._parentPositions.clear();\n this._dragDropRegistry.removeDropContainer(this);\n }\n /** Whether an item from this list is currently being dragged. */\n isDragging() {\n return this._isDragging;\n }\n /** Starts dragging an item. */\n start() {\n this._draggingStarted();\n this._notifyReceivingSiblings();\n }\n /**\n * Attempts to move an item into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param index Index at which the item entered. If omitted, the container will try to figure it\n * out automatically.\n */\n enter(item, pointerX, pointerY, index) {\n this._draggingStarted();\n // If sorting is disabled, we want the item to return to its starting\n // position if the user is returning it to its initial container.\n if (index == null && this.sortingDisabled) {\n index = this._draggables.indexOf(item);\n }\n this._sortStrategy.enter(item, pointerX, pointerY, index);\n // Note that this usually happens inside `_draggingStarted` as well, but the dimensions\n // can change when the sort strategy moves the item around inside `enter`.\n this._cacheParentPositions();\n // Notify siblings at the end so that the item has been inserted into the `activeDraggables`.\n this._notifyReceivingSiblings();\n this.entered.next({\n item,\n container: this,\n currentIndex: this.getItemIndex(item)\n });\n }\n /**\n * Removes an item from the container after it was dragged into another container by the user.\n * @param item Item that was dragged out.\n */\n exit(item) {\n this._reset();\n this.exited.next({\n item,\n container: this\n });\n }\n /**\n * Drops an item into this container.\n * @param item Item being dropped into the container.\n * @param currentIndex Index at which the item should be inserted.\n * @param previousIndex Index of the item when dragging started.\n * @param previousContainer Container from which the item got dragged in.\n * @param isPointerOverContainer Whether the user's pointer was over the\n * container when the item was dropped.\n * @param distance Distance the user has dragged since the start of the dragging sequence.\n * @param event Event that triggered the dropping sequence.\n *\n * @breaking-change 15.0.0 `previousIndex` and `event` parameters to become required.\n */\n drop(item, currentIndex, previousIndex, previousContainer, isPointerOverContainer, distance, dropPoint, event = {}) {\n this._reset();\n this.dropped.next({\n item,\n currentIndex,\n previousIndex,\n container: this,\n previousContainer,\n isPointerOverContainer,\n distance,\n dropPoint,\n event\n });\n }\n /**\n * Sets the draggable items that are a part of this list.\n * @param items Items that are a part of this list.\n */\n withItems(items) {\n const previousItems = this._draggables;\n this._draggables = items;\n items.forEach(item => item._withDropContainer(this));\n if (this.isDragging()) {\n const draggedItems = previousItems.filter(item => item.isDragging());\n // If all of the items being dragged were removed\n // from the list, abort the current drag sequence.\n if (draggedItems.every(item => items.indexOf(item) === -1)) {\n this._reset();\n } else {\n this._sortStrategy.withItems(this._draggables);\n }\n }\n return this;\n }\n /** Sets the layout direction of the drop list. */\n withDirection(direction) {\n this._sortStrategy.direction = direction;\n return this;\n }\n /**\n * Sets the containers that are connected to this one. When two or more containers are\n * connected, the user will be allowed to transfer items between them.\n * @param connectedTo Other containers that the current containers should be connected to.\n */\n connectedTo(connectedTo) {\n this._siblings = connectedTo.slice();\n return this;\n }\n /**\n * Sets the orientation of the container.\n * @param orientation New orientation for the container.\n */\n withOrientation(orientation) {\n // TODO(crisbeto): eventually we should be constructing the new sort strategy here based on\n // the new orientation. For now we can assume that it'll always be `SingleAxisSortStrategy`.\n this._sortStrategy.orientation = orientation;\n return this;\n }\n /**\n * Sets which parent elements are can be scrolled while the user is dragging.\n * @param elements Elements that can be scrolled.\n */\n withScrollableParents(elements) {\n const element = coerceElement(this.element);\n // We always allow the current element to be scrollable\n // so we need to ensure that it's in the array.\n this._scrollableElements = elements.indexOf(element) === -1 ? [element, ...elements] : elements.slice();\n return this;\n }\n /** Gets the scrollable parents that are registered with this drop container. */\n getScrollableParents() {\n return this._scrollableElements;\n }\n /**\n * Figures out the index of an item in the container.\n * @param item Item whose index should be determined.\n */\n getItemIndex(item) {\n return this._isDragging ? this._sortStrategy.getItemIndex(item) : this._draggables.indexOf(item);\n }\n /**\n * Whether the list is able to receive the item that\n * is currently being dragged inside a connected drop list.\n */\n isReceiving() {\n return this._activeSiblings.size > 0;\n }\n /**\n * Sorts an item inside the container based on its position.\n * @param item Item to be sorted.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param pointerDelta Direction in which the pointer is moving along each axis.\n */\n _sortItem(item, pointerX, pointerY, pointerDelta) {\n // Don't sort the item if sorting is disabled or it's out of range.\n if (this.sortingDisabled || !this._clientRect || !isPointerNearClientRect(this._clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n return;\n }\n const result = this._sortStrategy.sort(item, pointerX, pointerY, pointerDelta);\n if (result) {\n this.sorted.next({\n previousIndex: result.previousIndex,\n currentIndex: result.currentIndex,\n container: this,\n item\n });\n }\n }\n /**\n * Checks whether the user's pointer is close to the edges of either the\n * viewport or the drop list and starts the auto-scroll sequence.\n * @param pointerX User's pointer position along the x axis.\n * @param pointerY User's pointer position along the y axis.\n */\n _startScrollingIfNecessary(pointerX, pointerY) {\n if (this.autoScrollDisabled) {\n return;\n }\n let scrollNode;\n let verticalScrollDirection = 0 /* AutoScrollVerticalDirection.NONE */;\n let horizontalScrollDirection = 0 /* AutoScrollHorizontalDirection.NONE */;\n // Check whether we should start scrolling any of the parent containers.\n this._parentPositions.positions.forEach((position, element) => {\n // We have special handling for the `document` below. Also this would be\n // nicer with a for...of loop, but it requires changing a compiler flag.\n if (element === this._document || !position.clientRect || scrollNode) {\n return;\n }\n if (isPointerNearClientRect(position.clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n [verticalScrollDirection, horizontalScrollDirection] = getElementScrollDirections(element, position.clientRect, pointerX, pointerY);\n if (verticalScrollDirection || horizontalScrollDirection) {\n scrollNode = element;\n }\n }\n });\n // Otherwise check if we can start scrolling the viewport.\n if (!verticalScrollDirection && !horizontalScrollDirection) {\n const {\n width,\n height\n } = this._viewportRuler.getViewportSize();\n const clientRect = {\n width,\n height,\n top: 0,\n right: width,\n bottom: height,\n left: 0\n };\n verticalScrollDirection = getVerticalScrollDirection(clientRect, pointerY);\n horizontalScrollDirection = getHorizontalScrollDirection(clientRect, pointerX);\n scrollNode = window;\n }\n if (scrollNode && (verticalScrollDirection !== this._verticalScrollDirection || horizontalScrollDirection !== this._horizontalScrollDirection || scrollNode !== this._scrollNode)) {\n this._verticalScrollDirection = verticalScrollDirection;\n this._horizontalScrollDirection = horizontalScrollDirection;\n this._scrollNode = scrollNode;\n if ((verticalScrollDirection || horizontalScrollDirection) && scrollNode) {\n this._ngZone.runOutsideAngular(this._startScrollInterval);\n } else {\n this._stopScrolling();\n }\n }\n }\n /** Stops any currently-running auto-scroll sequences. */\n _stopScrolling() {\n this._stopScrollTimers.next();\n }\n /** Starts the dragging sequence within the list. */\n _draggingStarted() {\n const styles = coerceElement(this.element).style;\n this.beforeStarted.next();\n this._isDragging = true;\n // We need to disable scroll snapping while the user is dragging, because it breaks automatic\n // scrolling. The browser seems to round the value based on the snapping points which means\n // that we can't increment/decrement the scroll position.\n this._initialScrollSnap = styles.msScrollSnapType || styles.scrollSnapType || '';\n styles.scrollSnapType = styles.msScrollSnapType = 'none';\n this._sortStrategy.start(this._draggables);\n this._cacheParentPositions();\n this._viewportScrollSubscription.unsubscribe();\n this._listenToScrollEvents();\n }\n /** Caches the positions of the configured scrollable parents. */\n _cacheParentPositions() {\n const element = coerceElement(this.element);\n this._parentPositions.cache(this._scrollableElements);\n // The list element is always in the `scrollableElements`\n // so we can take advantage of the cached `ClientRect`.\n this._clientRect = this._parentPositions.positions.get(element).clientRect;\n }\n /** Resets the container to its initial state. */\n _reset() {\n this._isDragging = false;\n const styles = coerceElement(this.element).style;\n styles.scrollSnapType = styles.msScrollSnapType = this._initialScrollSnap;\n this._siblings.forEach(sibling => sibling._stopReceiving(this));\n this._sortStrategy.reset();\n this._stopScrolling();\n this._viewportScrollSubscription.unsubscribe();\n this._parentPositions.clear();\n }\n /**\n * Checks whether the user's pointer is positioned over the container.\n * @param x Pointer position along the X axis.\n * @param y Pointer position along the Y axis.\n */\n _isOverContainer(x, y) {\n return this._clientRect != null && isInsideClientRect(this._clientRect, x, y);\n }\n /**\n * Figures out whether an item should be moved into a sibling\n * drop container, based on its current position.\n * @param item Drag item that is being moved.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _getSiblingContainerFromPosition(item, x, y) {\n return this._siblings.find(sibling => sibling._canReceive(item, x, y));\n }\n /**\n * Checks whether the drop list can receive the passed-in item.\n * @param item Item that is being dragged into the list.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _canReceive(item, x, y) {\n if (!this._clientRect || !isInsideClientRect(this._clientRect, x, y) || !this.enterPredicate(item, this)) {\n return false;\n }\n const elementFromPoint = this._getShadowRoot().elementFromPoint(x, y);\n // If there's no element at the pointer position, then\n // the client rect is probably scrolled out of the view.\n if (!elementFromPoint) {\n return false;\n }\n const nativeElement = coerceElement(this.element);\n // The `ClientRect`, that we're using to find the container over which the user is\n // hovering, doesn't give us any information on whether the element has been scrolled\n // out of the view or whether it's overlapping with other containers. This means that\n // we could end up transferring the item into a container that's invisible or is positioned\n // below another one. We use the result from `elementFromPoint` to get the top-most element\n // at the pointer position and to find whether it's one of the intersecting drop containers.\n return elementFromPoint === nativeElement || nativeElement.contains(elementFromPoint);\n }\n /**\n * Called by one of the connected drop lists when a dragging sequence has started.\n * @param sibling Sibling in which dragging has started.\n */\n _startReceiving(sibling, items) {\n const activeSiblings = this._activeSiblings;\n if (!activeSiblings.has(sibling) && items.every(item => {\n // Note that we have to add an exception to the `enterPredicate` for items that started off\n // in this drop list. The drag ref has logic that allows an item to return to its initial\n // container, if it has left the initial container and none of the connected containers\n // allow it to enter. See `DragRef._updateActiveDropContainer` for more context.\n return this.enterPredicate(item, this) || this._draggables.indexOf(item) > -1;\n })) {\n activeSiblings.add(sibling);\n this._cacheParentPositions();\n this._listenToScrollEvents();\n this.receivingStarted.next({\n initiator: sibling,\n receiver: this,\n items\n });\n }\n }\n /**\n * Called by a connected drop list when dragging has stopped.\n * @param sibling Sibling whose dragging has stopped.\n */\n _stopReceiving(sibling) {\n this._activeSiblings.delete(sibling);\n this._viewportScrollSubscription.unsubscribe();\n this.receivingStopped.next({\n initiator: sibling,\n receiver: this\n });\n }\n /**\n * Starts listening to scroll events on the viewport.\n * Used for updating the internal state of the list.\n */\n _listenToScrollEvents() {\n this._viewportScrollSubscription = this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(event => {\n if (this.isDragging()) {\n const scrollDifference = this._parentPositions.handleScroll(event);\n if (scrollDifference) {\n this._sortStrategy.updateOnScroll(scrollDifference.top, scrollDifference.left);\n }\n } else if (this.isReceiving()) {\n this._cacheParentPositions();\n }\n });\n }\n /**\n * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n * than saving it in property directly on init, because we want to resolve it as late as possible\n * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n */\n _getShadowRoot() {\n if (!this._cachedShadowRoot) {\n const shadowRoot = _getShadowRoot(coerceElement(this.element));\n this._cachedShadowRoot = shadowRoot || this._document;\n }\n return this._cachedShadowRoot;\n }\n /** Notifies any siblings that may potentially receive the item. */\n _notifyReceivingSiblings() {\n const draggedItems = this._sortStrategy.getActiveItemsSnapshot().filter(item => item.isDragging());\n this._siblings.forEach(sibling => sibling._startReceiving(this, draggedItems));\n }\n}\n/**\n * Gets whether the vertical auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getVerticalScrollDirection(clientRect, pointerY) {\n const {\n top,\n bottom,\n height\n } = clientRect;\n const yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;\n if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {\n return 1 /* AutoScrollVerticalDirection.UP */;\n } else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {\n return 2 /* AutoScrollVerticalDirection.DOWN */;\n }\n\n return 0 /* AutoScrollVerticalDirection.NONE */;\n}\n/**\n * Gets whether the horizontal auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerX Position of the user's pointer along the x axis.\n */\nfunction getHorizontalScrollDirection(clientRect, pointerX) {\n const {\n left,\n right,\n width\n } = clientRect;\n const xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;\n if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {\n return 1 /* AutoScrollHorizontalDirection.LEFT */;\n } else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {\n return 2 /* AutoScrollHorizontalDirection.RIGHT */;\n }\n\n return 0 /* AutoScrollHorizontalDirection.NONE */;\n}\n/**\n * Gets the directions in which an element node should be scrolled,\n * assuming that the user's pointer is already within it scrollable region.\n * @param element Element for which we should calculate the scroll direction.\n * @param clientRect Bounding client rectangle of the element.\n * @param pointerX Position of the user's pointer along the x axis.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getElementScrollDirections(element, clientRect, pointerX, pointerY) {\n const computedVertical = getVerticalScrollDirection(clientRect, pointerY);\n const computedHorizontal = getHorizontalScrollDirection(clientRect, pointerX);\n let verticalScrollDirection = 0 /* AutoScrollVerticalDirection.NONE */;\n let horizontalScrollDirection = 0 /* AutoScrollHorizontalDirection.NONE */;\n // Note that we here we do some extra checks for whether the element is actually scrollable in\n // a certain direction and we only assign the scroll direction if it is. We do this so that we\n // can allow other elements to be scrolled, if the current element can't be scrolled anymore.\n // This allows us to handle cases where the scroll regions of two scrollable elements overlap.\n if (computedVertical) {\n const scrollTop = element.scrollTop;\n if (computedVertical === 1 /* AutoScrollVerticalDirection.UP */) {\n if (scrollTop > 0) {\n verticalScrollDirection = 1 /* AutoScrollVerticalDirection.UP */;\n }\n } else if (element.scrollHeight - scrollTop > element.clientHeight) {\n verticalScrollDirection = 2 /* AutoScrollVerticalDirection.DOWN */;\n }\n }\n\n if (computedHorizontal) {\n const scrollLeft = element.scrollLeft;\n if (computedHorizontal === 1 /* AutoScrollHorizontalDirection.LEFT */) {\n if (scrollLeft > 0) {\n horizontalScrollDirection = 1 /* AutoScrollHorizontalDirection.LEFT */;\n }\n } else if (element.scrollWidth - scrollLeft > element.clientWidth) {\n horizontalScrollDirection = 2 /* AutoScrollHorizontalDirection.RIGHT */;\n }\n }\n\n return [verticalScrollDirection, horizontalScrollDirection];\n}\n\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: false,\n capture: true\n});\n/**\n * Service that keeps track of all the drag item and drop container\n * instances, and manages global event listeners on the `document`.\n * @docs-private\n */\n// Note: this class is generic, rather than referencing CdkDrag and CdkDropList directly, in order\n// to avoid circular imports. If we were to reference them here, importing the registry into the\n// classes that are registering themselves will introduce a circular import.\nlet DragDropRegistry = /*#__PURE__*/(() => {\n class DragDropRegistry {\n constructor(_ngZone, _document) {\n this._ngZone = _ngZone;\n /** Registered drop container instances. */\n this._dropInstances = new Set();\n /** Registered drag item instances. */\n this._dragInstances = new Set();\n /** Drag item instances that are currently being dragged. */\n this._activeDragInstances = [];\n /** Keeps track of the event listeners that we've bound to the `document`. */\n this._globalListeners = new Map();\n /**\n * Predicate function to check if an item is being dragged. Moved out into a property,\n * because it'll be called a lot and we don't want to create a new function every time.\n */\n this._draggingPredicate = item => item.isDragging();\n /**\n * Emits the `touchmove` or `mousemove` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n this.pointerMove = new Subject();\n /**\n * Emits the `touchend` or `mouseup` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n this.pointerUp = new Subject();\n /**\n * Emits when the viewport has been scrolled while the user is dragging an item.\n * @deprecated To be turned into a private member. Use the `scrolled` method instead.\n * @breaking-change 13.0.0\n */\n this.scroll = new Subject();\n /**\n * Event listener that will prevent the default browser action while the user is dragging.\n * @param event Event whose default action should be prevented.\n */\n this._preventDefaultWhileDragging = event => {\n if (this._activeDragInstances.length > 0) {\n event.preventDefault();\n }\n };\n /** Event listener for `touchmove` that is bound even if no dragging is happening. */\n this._persistentTouchmoveListener = event => {\n if (this._activeDragInstances.length > 0) {\n // Note that we only want to prevent the default action after dragging has actually started.\n // Usually this is the same time at which the item is added to the `_activeDragInstances`,\n // but it could be pushed back if the user has set up a drag delay or threshold.\n if (this._activeDragInstances.some(this._draggingPredicate)) {\n event.preventDefault();\n }\n this.pointerMove.next(event);\n }\n };\n this._document = _document;\n }\n /** Adds a drop container to the registry. */\n registerDropContainer(drop) {\n if (!this._dropInstances.has(drop)) {\n this._dropInstances.add(drop);\n }\n }\n /** Adds a drag item instance to the registry. */\n registerDragItem(drag) {\n this._dragInstances.add(drag);\n // The `touchmove` event gets bound once, ahead of time, because WebKit\n // won't preventDefault on a dynamically-added `touchmove` listener.\n // See https://bugs.webkit.org/show_bug.cgi?id=184250.\n if (this._dragInstances.size === 1) {\n this._ngZone.runOutsideAngular(() => {\n // The event handler has to be explicitly active,\n // because newer browsers make it passive by default.\n this._document.addEventListener('touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);\n });\n }\n }\n /** Removes a drop container from the registry. */\n removeDropContainer(drop) {\n this._dropInstances.delete(drop);\n }\n /** Removes a drag item instance from the registry. */\n removeDragItem(drag) {\n this._dragInstances.delete(drag);\n this.stopDragging(drag);\n if (this._dragInstances.size === 0) {\n this._document.removeEventListener('touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);\n }\n }\n /**\n * Starts the dragging sequence for a drag instance.\n * @param drag Drag instance which is being dragged.\n * @param event Event that initiated the dragging.\n */\n startDragging(drag, event) {\n // Do not process the same drag twice to avoid memory leaks and redundant listeners\n if (this._activeDragInstances.indexOf(drag) > -1) {\n return;\n }\n this._activeDragInstances.push(drag);\n if (this._activeDragInstances.length === 1) {\n const isTouchEvent = event.type.startsWith('touch');\n // We explicitly bind __active__ listeners here, because newer browsers will default to\n // passive ones for `mousemove` and `touchmove`. The events need to be active, because we\n // use `preventDefault` to prevent the page from scrolling while the user is dragging.\n this._globalListeners.set(isTouchEvent ? 'touchend' : 'mouseup', {\n handler: e => this.pointerUp.next(e),\n options: true\n }).set('scroll', {\n handler: e => this.scroll.next(e),\n // Use capturing so that we pick up scroll changes in any scrollable nodes that aren't\n // the document. See https://github.com/angular/components/issues/17144.\n options: true\n })\n // Preventing the default action on `mousemove` isn't enough to disable text selection\n // on Safari so we need to prevent the selection event as well. Alternatively this can\n // be done by setting `user-select: none` on the `body`, however it has causes a style\n // recalculation which can be expensive on pages with a lot of elements.\n .set('selectstart', {\n handler: this._preventDefaultWhileDragging,\n options: activeCapturingEventOptions\n });\n // We don't have to bind a move event for touch drag sequences, because\n // we already have a persistent global one bound from `registerDragItem`.\n if (!isTouchEvent) {\n this._globalListeners.set('mousemove', {\n handler: e => this.pointerMove.next(e),\n options: activeCapturingEventOptions\n });\n }\n this._ngZone.runOutsideAngular(() => {\n this._globalListeners.forEach((config, name) => {\n this._document.addEventListener(name, config.handler, config.options);\n });\n });\n }\n }\n /** Stops dragging a drag item instance. */\n stopDragging(drag) {\n const index = this._activeDragInstances.indexOf(drag);\n if (index > -1) {\n this._activeDragInstances.splice(index, 1);\n if (this._activeDragInstances.length === 0) {\n this._clearGlobalListeners();\n }\n }\n }\n /** Gets whether a drag item instance is currently being dragged. */\n isDragging(drag) {\n return this._activeDragInstances.indexOf(drag) > -1;\n }\n /**\n * Gets a stream that will emit when any element on the page is scrolled while an item is being\n * dragged.\n * @param shadowRoot Optional shadow root that the current dragging sequence started from.\n * Top-level listeners won't pick up events coming from the shadow DOM so this parameter can\n * be used to include an additional top-level listener at the shadow root level.\n */\n scrolled(shadowRoot) {\n const streams = [this.scroll];\n if (shadowRoot && shadowRoot !== this._document) {\n // Note that this is basically the same as `fromEvent` from rxjs, but we do it ourselves,\n // because we want to guarantee that the event is bound outside of the `NgZone`. With\n // `fromEvent` it'll only happen if the subscription is outside the `NgZone`.\n streams.push(new Observable(observer => {\n return this._ngZone.runOutsideAngular(() => {\n const eventOptions = true;\n const callback = event => {\n if (this._activeDragInstances.length) {\n observer.next(event);\n }\n };\n shadowRoot.addEventListener('scroll', callback, eventOptions);\n return () => {\n shadowRoot.removeEventListener('scroll', callback, eventOptions);\n };\n });\n }));\n }\n return merge(...streams);\n }\n ngOnDestroy() {\n this._dragInstances.forEach(instance => this.removeDragItem(instance));\n this._dropInstances.forEach(instance => this.removeDropContainer(instance));\n this._clearGlobalListeners();\n this.pointerMove.complete();\n this.pointerUp.complete();\n }\n /** Clears out the global event listeners from the `document`. */\n _clearGlobalListeners() {\n this._globalListeners.forEach((config, name) => {\n this._document.removeEventListener(name, config.handler, config.options);\n });\n this._globalListeners.clear();\n }\n static {\n this.ɵfac = function DragDropRegistry_Factory(t) {\n return new (t || DragDropRegistry)(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(DOCUMENT));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DragDropRegistry,\n factory: DragDropRegistry.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DragDropRegistry;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Default configuration to be used when creating a `DragRef`. */\nconst DEFAULT_CONFIG = {\n dragStartThreshold: 5,\n pointerDirectionChangeThreshold: 5\n};\n/**\n * Service that allows for drag-and-drop functionality to be attached to DOM elements.\n */\nlet DragDrop = /*#__PURE__*/(() => {\n class DragDrop {\n constructor(_document, _ngZone, _viewportRuler, _dragDropRegistry) {\n this._document = _document;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._dragDropRegistry = _dragDropRegistry;\n }\n /**\n * Turns an element into a draggable item.\n * @param element Element to which to attach the dragging functionality.\n * @param config Object used to configure the dragging behavior.\n */\n createDrag(element, config = DEFAULT_CONFIG) {\n return new DragRef(element, config, this._document, this._ngZone, this._viewportRuler, this._dragDropRegistry);\n }\n /**\n * Turns an element into a drop list.\n * @param element Element to which to attach the drop list functionality.\n */\n createDropList(element) {\n return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);\n }\n static {\n this.ɵfac = function DragDrop_Factory(t) {\n return new (t || DragDrop)(i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.ViewportRuler), i0.ɵɵinject(DragDropRegistry));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DragDrop,\n factory: DragDrop.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DragDrop;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used for a `CdkDrag` to provide itself as a parent to the\n * drag-specific child directive (`CdkDragHandle`, `CdkDragPreview` etc.). Used primarily\n * to avoid circular imports.\n * @docs-private\n */\nconst CDK_DRAG_PARENT = /*#__PURE__*/new InjectionToken('CDK_DRAG_PARENT');\n\n/**\n * Asserts that a particular node is an element.\n * @param node Node to be checked.\n * @param name Name to attach to the error message.\n */\nfunction assertElementNode(node, name) {\n if (node.nodeType !== 1) {\n throw Error(`${name} must be attached to an element node. ` + `Currently attached to \"${node.nodeName}\".`);\n }\n}\n\n/**\n * Injection token that can be used to reference instances of `CdkDragHandle`. It serves as\n * alternative token to the actual `CdkDragHandle` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_HANDLE = /*#__PURE__*/new InjectionToken('CdkDragHandle');\n/** Handle that can be used to drag a CdkDrag instance. */\nlet CdkDragHandle = /*#__PURE__*/(() => {\n class CdkDragHandle {\n /** Whether starting to drag through this handle is disabled. */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = value;\n this._stateChanges.next(this);\n }\n constructor(element, parentDrag) {\n this.element = element;\n /** Emits when the state of the handle has changed. */\n this._stateChanges = new Subject();\n this._disabled = false;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDragHandle');\n }\n this._parentDrag = parentDrag;\n }\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n static {\n this.ɵfac = function CdkDragHandle_Factory(t) {\n return new (t || CdkDragHandle)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(CDK_DRAG_PARENT, 12));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDragHandle,\n selectors: [[\"\", \"cdkDragHandle\", \"\"]],\n hostAttrs: [1, \"cdk-drag-handle\"],\n inputs: {\n disabled: [\"cdkDragHandleDisabled\", \"disabled\", booleanAttribute]\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_HANDLE,\n useExisting: CdkDragHandle\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return CdkDragHandle;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPlaceholder`. It serves as\n * alternative token to the actual `CdkDragPlaceholder` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_PLACEHOLDER = /*#__PURE__*/new InjectionToken('CdkDragPlaceholder');\n/**\n * Element that will be used as a template for the placeholder of a CdkDrag when\n * it is being dragged. The placeholder is displayed in place of the element being dragged.\n */\nlet CdkDragPlaceholder = /*#__PURE__*/(() => {\n class CdkDragPlaceholder {\n constructor(templateRef) {\n this.templateRef = templateRef;\n }\n static {\n this.ɵfac = function CdkDragPlaceholder_Factory(t) {\n return new (t || CdkDragPlaceholder)(i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDragPlaceholder,\n selectors: [[\"ng-template\", \"cdkDragPlaceholder\", \"\"]],\n inputs: {\n data: \"data\"\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_PLACEHOLDER,\n useExisting: CdkDragPlaceholder\n }])]\n });\n }\n }\n return CdkDragPlaceholder;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPreview`. It serves as\n * alternative token to the actual `CdkDragPreview` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_PREVIEW = /*#__PURE__*/new InjectionToken('CdkDragPreview');\n/**\n * Element that will be used as a template for the preview\n * of a CdkDrag when it is being dragged.\n */\nlet CdkDragPreview = /*#__PURE__*/(() => {\n class CdkDragPreview {\n constructor(templateRef) {\n this.templateRef = templateRef;\n /** Whether the preview should preserve the same size as the item that is being dragged. */\n this.matchSize = false;\n }\n static {\n this.ɵfac = function CdkDragPreview_Factory(t) {\n return new (t || CdkDragPreview)(i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDragPreview,\n selectors: [[\"ng-template\", \"cdkDragPreview\", \"\"]],\n inputs: {\n data: \"data\",\n matchSize: [\"matchSize\", \"matchSize\", booleanAttribute]\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_PREVIEW,\n useExisting: CdkDragPreview\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return CdkDragPreview;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to configure the\n * behavior of the drag&drop-related components.\n */\nconst CDK_DRAG_CONFIG = /*#__PURE__*/new InjectionToken('CDK_DRAG_CONFIG');\nconst DRAG_HOST_CLASS = 'cdk-drag';\n/**\n * Injection token that can be used to reference instances of `CdkDropList`. It serves as\n * alternative token to the actual `CdkDropList` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DROP_LIST = /*#__PURE__*/new InjectionToken('CdkDropList');\n/** Element that can be moved inside a CdkDropList container. */\nlet CdkDrag = /*#__PURE__*/(() => {\n class CdkDrag {\n static {\n this._dragInstances = [];\n }\n /** Whether starting to drag this element is disabled. */\n get disabled() {\n return this._disabled || this.dropContainer && this.dropContainer.disabled;\n }\n set disabled(value) {\n this._disabled = value;\n this._dragRef.disabled = this._disabled;\n }\n constructor( /** Element that the draggable is attached to. */\n element, /** Droppable container that the draggable is a part of. */\n dropContainer,\n /**\n * @deprecated `_document` parameter no longer being used and will be removed.\n * @breaking-change 12.0.0\n */\n _document, _ngZone, _viewContainerRef, config, _dir, dragDrop, _changeDetectorRef, _selfHandle, _parentDrag) {\n this.element = element;\n this.dropContainer = dropContainer;\n this._ngZone = _ngZone;\n this._viewContainerRef = _viewContainerRef;\n this._dir = _dir;\n this._changeDetectorRef = _changeDetectorRef;\n this._selfHandle = _selfHandle;\n this._parentDrag = _parentDrag;\n this._destroyed = new Subject();\n /** Emits when the user starts dragging the item. */\n this.started = new EventEmitter();\n /** Emits when the user has released a drag item, before any animations have started. */\n this.released = new EventEmitter();\n /** Emits when the user stops dragging an item in the container. */\n this.ended = new EventEmitter();\n /** Emits when the user has moved the item into a new container. */\n this.entered = new EventEmitter();\n /** Emits when the user removes the item its container by dragging it into another container. */\n this.exited = new EventEmitter();\n /** Emits when the user drops the item inside a container. */\n this.dropped = new EventEmitter();\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n this.moved = new Observable(observer => {\n const subscription = this._dragRef.moved.pipe(map(movedEvent => ({\n source: this,\n pointerPosition: movedEvent.pointerPosition,\n event: movedEvent.event,\n delta: movedEvent.delta,\n distance: movedEvent.distance\n }))).subscribe(observer);\n return () => {\n subscription.unsubscribe();\n };\n });\n this._dragRef = dragDrop.createDrag(element, {\n dragStartThreshold: config && config.dragStartThreshold != null ? config.dragStartThreshold : 5,\n pointerDirectionChangeThreshold: config && config.pointerDirectionChangeThreshold != null ? config.pointerDirectionChangeThreshold : 5,\n zIndex: config?.zIndex\n });\n this._dragRef.data = this;\n // We have to keep track of the drag instances in order to be able to match an element to\n // a drag instance. We can't go through the global registry of `DragRef`, because the root\n // element could be different.\n CdkDrag._dragInstances.push(this);\n if (config) {\n this._assignDefaults(config);\n }\n // Note that usually the container is assigned when the drop list is picks up the item, but in\n // some cases (mainly transplanted views with OnPush, see #18341) we may end up in a situation\n // where there are no items on the first change detection pass, but the items get picked up as\n // soon as the user triggers another pass by dragging. This is a problem, because the item would\n // have to switch from standalone mode to drag mode in the middle of the dragging sequence which\n // is too late since the two modes save different kinds of information. We work around it by\n // assigning the drop container both from here and the list.\n if (dropContainer) {\n this._dragRef._withDropContainer(dropContainer._dropListRef);\n dropContainer.addItem(this);\n }\n this._syncInputs(this._dragRef);\n this._handleEvents(this._dragRef);\n }\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n getPlaceholderElement() {\n return this._dragRef.getPlaceholderElement();\n }\n /** Returns the root draggable element. */\n getRootElement() {\n return this._dragRef.getRootElement();\n }\n /** Resets a standalone drag item to its initial position. */\n reset() {\n this._dragRef.reset();\n }\n /**\n * Gets the pixel coordinates of the draggable outside of a drop container.\n */\n getFreeDragPosition() {\n return this._dragRef.getFreeDragPosition();\n }\n /**\n * Sets the current position in pixels the draggable outside of a drop container.\n * @param value New position to be set.\n */\n setFreeDragPosition(value) {\n this._dragRef.setFreeDragPosition(value);\n }\n ngAfterViewInit() {\n // Normally this isn't in the zone, but it can cause major performance regressions for apps\n // using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.\n this._ngZone.runOutsideAngular(() => {\n // We need to wait for the zone to stabilize, in order for the reference\n // element to be in the proper place in the DOM. This is mostly relevant\n // for draggable elements inside portals since they get stamped out in\n // their original DOM position and then they get transferred to the portal.\n this._ngZone.onStable.pipe(take(1), takeUntil(this._destroyed)).subscribe(() => {\n this._updateRootElement();\n this._setupHandlesListener();\n if (this.freeDragPosition) {\n this._dragRef.setFreeDragPosition(this.freeDragPosition);\n }\n });\n });\n }\n ngOnChanges(changes) {\n const rootSelectorChange = changes['rootElementSelector'];\n const positionChange = changes['freeDragPosition'];\n // We don't have to react to the first change since it's being\n // handled in `ngAfterViewInit` where it needs to be deferred.\n if (rootSelectorChange && !rootSelectorChange.firstChange) {\n this._updateRootElement();\n }\n // Skip the first change since it's being handled in `ngAfterViewInit`.\n if (positionChange && !positionChange.firstChange && this.freeDragPosition) {\n this._dragRef.setFreeDragPosition(this.freeDragPosition);\n }\n }\n ngOnDestroy() {\n if (this.dropContainer) {\n this.dropContainer.removeItem(this);\n }\n const index = CdkDrag._dragInstances.indexOf(this);\n if (index > -1) {\n CdkDrag._dragInstances.splice(index, 1);\n }\n // Unnecessary in most cases, but used to avoid extra change detections with `zone-paths-rxjs`.\n this._ngZone.runOutsideAngular(() => {\n this._destroyed.next();\n this._destroyed.complete();\n this._dragRef.dispose();\n });\n }\n /** Syncs the root element with the `DragRef`. */\n _updateRootElement() {\n const element = this.element.nativeElement;\n let rootElement = element;\n if (this.rootElementSelector) {\n rootElement = element.closest !== undefined ? element.closest(this.rootElementSelector) :\n // Comment tag doesn't have closest method, so use parent's one.\n element.parentElement?.closest(this.rootElementSelector);\n }\n if (rootElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n assertElementNode(rootElement, 'cdkDrag');\n }\n this._dragRef.withRootElement(rootElement || element);\n }\n /** Gets the boundary element, based on the `boundaryElement` value. */\n _getBoundaryElement() {\n const boundary = this.boundaryElement;\n if (!boundary) {\n return null;\n }\n if (typeof boundary === 'string') {\n return this.element.nativeElement.closest(boundary);\n }\n return coerceElement(boundary);\n }\n /** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */\n _syncInputs(ref) {\n ref.beforeStarted.subscribe(() => {\n if (!ref.isDragging()) {\n const dir = this._dir;\n const dragStartDelay = this.dragStartDelay;\n const placeholder = this._placeholderTemplate ? {\n template: this._placeholderTemplate.templateRef,\n context: this._placeholderTemplate.data,\n viewContainer: this._viewContainerRef\n } : null;\n const preview = this._previewTemplate ? {\n template: this._previewTemplate.templateRef,\n context: this._previewTemplate.data,\n matchSize: this._previewTemplate.matchSize,\n viewContainer: this._viewContainerRef\n } : null;\n ref.disabled = this.disabled;\n ref.lockAxis = this.lockAxis;\n ref.dragStartDelay = typeof dragStartDelay === 'object' && dragStartDelay ? dragStartDelay : coerceNumberProperty(dragStartDelay);\n ref.constrainPosition = this.constrainPosition;\n ref.previewClass = this.previewClass;\n ref.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(placeholder).withPreviewTemplate(preview).withPreviewContainer(this.previewContainer || 'global');\n if (dir) {\n ref.withDirection(dir.value);\n }\n }\n });\n // This only needs to be resolved once.\n ref.beforeStarted.pipe(take(1)).subscribe(() => {\n // If we managed to resolve a parent through DI, use it.\n if (this._parentDrag) {\n ref.withParent(this._parentDrag._dragRef);\n return;\n }\n // Otherwise fall back to resolving the parent by looking up the DOM. This can happen if\n // the item was projected into another item by something like `ngTemplateOutlet`.\n let parent = this.element.nativeElement.parentElement;\n while (parent) {\n if (parent.classList.contains(DRAG_HOST_CLASS)) {\n ref.withParent(CdkDrag._dragInstances.find(drag => {\n return drag.element.nativeElement === parent;\n })?._dragRef || null);\n break;\n }\n parent = parent.parentElement;\n }\n });\n }\n /** Handles the events from the underlying `DragRef`. */\n _handleEvents(ref) {\n ref.started.subscribe(startEvent => {\n this.started.emit({\n source: this,\n event: startEvent.event\n });\n // Since all of these events run outside of change detection,\n // we need to ensure that everything is marked correctly.\n this._changeDetectorRef.markForCheck();\n });\n ref.released.subscribe(releaseEvent => {\n this.released.emit({\n source: this,\n event: releaseEvent.event\n });\n });\n ref.ended.subscribe(endEvent => {\n this.ended.emit({\n source: this,\n distance: endEvent.distance,\n dropPoint: endEvent.dropPoint,\n event: endEvent.event\n });\n // Since all of these events run outside of change detection,\n // we need to ensure that everything is marked correctly.\n this._changeDetectorRef.markForCheck();\n });\n ref.entered.subscribe(enterEvent => {\n this.entered.emit({\n container: enterEvent.container.data,\n item: this,\n currentIndex: enterEvent.currentIndex\n });\n });\n ref.exited.subscribe(exitEvent => {\n this.exited.emit({\n container: exitEvent.container.data,\n item: this\n });\n });\n ref.dropped.subscribe(dropEvent => {\n this.dropped.emit({\n previousIndex: dropEvent.previousIndex,\n currentIndex: dropEvent.currentIndex,\n previousContainer: dropEvent.previousContainer.data,\n container: dropEvent.container.data,\n isPointerOverContainer: dropEvent.isPointerOverContainer,\n item: this,\n distance: dropEvent.distance,\n dropPoint: dropEvent.dropPoint,\n event: dropEvent.event\n });\n });\n }\n /** Assigns the default input values based on a provided config object. */\n _assignDefaults(config) {\n const {\n lockAxis,\n dragStartDelay,\n constrainPosition,\n previewClass,\n boundaryElement,\n draggingDisabled,\n rootElementSelector,\n previewContainer\n } = config;\n this.disabled = draggingDisabled == null ? false : draggingDisabled;\n this.dragStartDelay = dragStartDelay || 0;\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\n if (constrainPosition) {\n this.constrainPosition = constrainPosition;\n }\n if (previewClass) {\n this.previewClass = previewClass;\n }\n if (boundaryElement) {\n this.boundaryElement = boundaryElement;\n }\n if (rootElementSelector) {\n this.rootElementSelector = rootElementSelector;\n }\n if (previewContainer) {\n this.previewContainer = previewContainer;\n }\n }\n /** Sets up the listener that syncs the handles with the drag ref. */\n _setupHandlesListener() {\n // Listen for any newly-added handles.\n this._handles.changes.pipe(startWith(this._handles),\n // Sync the new handles with the DragRef.\n tap(handles => {\n const childHandleElements = handles.filter(handle => handle._parentDrag === this).map(handle => handle.element);\n // Usually handles are only allowed to be a descendant of the drag element, but if\n // the consumer defined a different drag root, we should allow the drag element\n // itself to be a handle too.\n if (this._selfHandle && this.rootElementSelector) {\n childHandleElements.push(this.element);\n }\n this._dragRef.withHandles(childHandleElements);\n }),\n // Listen if the state of any of the handles changes.\n switchMap(handles => {\n return merge(...handles.map(item => {\n return item._stateChanges.pipe(startWith(item));\n }));\n }), takeUntil(this._destroyed)).subscribe(handleInstance => {\n // Enabled/disable the handle that changed in the DragRef.\n const dragRef = this._dragRef;\n const handle = handleInstance.element.nativeElement;\n handleInstance.disabled ? dragRef.disableHandle(handle) : dragRef.enableHandle(handle);\n });\n }\n static {\n this.ɵfac = function CdkDrag_Factory(t) {\n return new (t || CdkDrag)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(CDK_DROP_LIST, 12), i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(CDK_DRAG_CONFIG, 8), i0.ɵɵdirectiveInject(i1$1.Directionality, 8), i0.ɵɵdirectiveInject(DragDrop), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(CDK_DRAG_HANDLE, 10), i0.ɵɵdirectiveInject(CDK_DRAG_PARENT, 12));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDrag,\n selectors: [[\"\", \"cdkDrag\", \"\"]],\n contentQueries: function CdkDrag_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, CDK_DRAG_PREVIEW, 5);\n i0.ɵɵcontentQuery(dirIndex, CDK_DRAG_PLACEHOLDER, 5);\n i0.ɵɵcontentQuery(dirIndex, CDK_DRAG_HANDLE, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._previewTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._placeholderTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._handles = _t);\n }\n },\n hostAttrs: [1, \"cdk-drag\"],\n hostVars: 4,\n hostBindings: function CdkDrag_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"cdk-drag-disabled\", ctx.disabled)(\"cdk-drag-dragging\", ctx._dragRef.isDragging());\n }\n },\n inputs: {\n data: [\"cdkDragData\", \"data\"],\n lockAxis: [\"cdkDragLockAxis\", \"lockAxis\"],\n rootElementSelector: [\"cdkDragRootElement\", \"rootElementSelector\"],\n boundaryElement: [\"cdkDragBoundary\", \"boundaryElement\"],\n dragStartDelay: [\"cdkDragStartDelay\", \"dragStartDelay\"],\n freeDragPosition: [\"cdkDragFreeDragPosition\", \"freeDragPosition\"],\n disabled: [\"cdkDragDisabled\", \"disabled\", booleanAttribute],\n constrainPosition: [\"cdkDragConstrainPosition\", \"constrainPosition\"],\n previewClass: [\"cdkDragPreviewClass\", \"previewClass\"],\n previewContainer: [\"cdkDragPreviewContainer\", \"previewContainer\"]\n },\n outputs: {\n started: \"cdkDragStarted\",\n released: \"cdkDragReleased\",\n ended: \"cdkDragEnded\",\n entered: \"cdkDragEntered\",\n exited: \"cdkDragExited\",\n dropped: \"cdkDragDropped\",\n moved: \"cdkDragMoved\"\n },\n exportAs: [\"cdkDrag\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_PARENT,\n useExisting: CdkDrag\n }]), i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return CdkDrag;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `CdkDropListGroup`. It serves as\n * alternative token to the actual `CdkDropListGroup` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DROP_LIST_GROUP = /*#__PURE__*/new InjectionToken('CdkDropListGroup');\n/**\n * Declaratively connects sibling `cdkDropList` instances together. All of the `cdkDropList`\n * elements that are placed inside a `cdkDropListGroup` will be connected to each other\n * automatically. Can be used as an alternative to the `cdkDropListConnectedTo` input\n * from `cdkDropList`.\n */\nlet CdkDropListGroup = /*#__PURE__*/(() => {\n class CdkDropListGroup {\n constructor() {\n /** Drop lists registered inside the group. */\n this._items = new Set();\n /** Whether starting a dragging sequence from inside this group is disabled. */\n this.disabled = false;\n }\n ngOnDestroy() {\n this._items.clear();\n }\n static {\n this.ɵfac = function CdkDropListGroup_Factory(t) {\n return new (t || CdkDropListGroup)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDropListGroup,\n selectors: [[\"\", \"cdkDropListGroup\", \"\"]],\n inputs: {\n disabled: [\"cdkDropListGroupDisabled\", \"disabled\", booleanAttribute]\n },\n exportAs: [\"cdkDropListGroup\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DROP_LIST_GROUP,\n useExisting: CdkDropListGroup\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return CdkDropListGroup;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Counter used to generate unique ids for drop zones. */\nlet _uniqueIdCounter = 0;\n/** Container that wraps a set of draggable items. */\nlet CdkDropList = /*#__PURE__*/(() => {\n class CdkDropList {\n /** Keeps track of the drop lists that are currently on the page. */\n static {\n this._dropLists = [];\n }\n /** Whether starting a dragging sequence from this container is disabled. */\n get disabled() {\n return this._disabled || !!this._group && this._group.disabled;\n }\n set disabled(value) {\n // Usually we sync the directive and ref state right before dragging starts, in order to have\n // a single point of failure and to avoid having to use setters for everything. `disabled` is\n // a special case, because it can prevent the `beforeStarted` event from firing, which can lock\n // the user in a disabled state, so we also need to sync it as it's being set.\n this._dropListRef.disabled = this._disabled = value;\n }\n constructor( /** Element that the drop list is attached to. */\n element, dragDrop, _changeDetectorRef, _scrollDispatcher, _dir, _group, config) {\n this.element = element;\n this._changeDetectorRef = _changeDetectorRef;\n this._scrollDispatcher = _scrollDispatcher;\n this._dir = _dir;\n this._group = _group;\n /** Emits when the list has been destroyed. */\n this._destroyed = new Subject();\n /**\n * Other draggable containers that this container is connected to and into which the\n * container's items can be transferred. Can either be references to other drop containers,\n * or their unique IDs.\n */\n this.connectedTo = [];\n /**\n * Unique ID for the drop zone. Can be used as a reference\n * in the `connectedTo` of another `CdkDropList`.\n */\n this.id = `cdk-drop-list-${_uniqueIdCounter++}`;\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n this.enterPredicate = () => true;\n /** Functions that is used to determine whether an item can be sorted into a particular index. */\n this.sortPredicate = () => true;\n /** Emits when the user drops an item inside the container. */\n this.dropped = new EventEmitter();\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n this.entered = new EventEmitter();\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n this.exited = new EventEmitter();\n /** Emits as the user is swapping items while actively dragging. */\n this.sorted = new EventEmitter();\n /**\n * Keeps track of the items that are registered with this container. Historically we used to\n * do this with a `ContentChildren` query, however queries don't handle transplanted views very\n * well which means that we can't handle cases like dragging the headers of a `mat-table`\n * correctly. What we do instead is to have the items register themselves with the container\n * and then we sort them based on their position in the DOM.\n */\n this._unsortedItems = new Set();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDropList');\n }\n this._dropListRef = dragDrop.createDropList(element);\n this._dropListRef.data = this;\n if (config) {\n this._assignDefaults(config);\n }\n this._dropListRef.enterPredicate = (drag, drop) => {\n return this.enterPredicate(drag.data, drop.data);\n };\n this._dropListRef.sortPredicate = (index, drag, drop) => {\n return this.sortPredicate(index, drag.data, drop.data);\n };\n this._setupInputSyncSubscription(this._dropListRef);\n this._handleEvents(this._dropListRef);\n CdkDropList._dropLists.push(this);\n if (_group) {\n _group._items.add(this);\n }\n }\n /** Registers an items with the drop list. */\n addItem(item) {\n this._unsortedItems.add(item);\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\n }\n }\n /** Removes an item from the drop list. */\n removeItem(item) {\n this._unsortedItems.delete(item);\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\n }\n }\n /** Gets the registered items in the list, sorted by their position in the DOM. */\n getSortedItems() {\n return Array.from(this._unsortedItems).sort((a, b) => {\n const documentPosition = a._dragRef.getVisibleElement().compareDocumentPosition(b._dragRef.getVisibleElement());\n // `compareDocumentPosition` returns a bitmask so we have to use a bitwise operator.\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n // tslint:disable-next-line:no-bitwise\n return documentPosition & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n });\n }\n ngOnDestroy() {\n const index = CdkDropList._dropLists.indexOf(this);\n if (index > -1) {\n CdkDropList._dropLists.splice(index, 1);\n }\n if (this._group) {\n this._group._items.delete(this);\n }\n this._unsortedItems.clear();\n this._dropListRef.dispose();\n this._destroyed.next();\n this._destroyed.complete();\n }\n /** Syncs the inputs of the CdkDropList with the options of the underlying DropListRef. */\n _setupInputSyncSubscription(ref) {\n if (this._dir) {\n this._dir.change.pipe(startWith(this._dir.value), takeUntil(this._destroyed)).subscribe(value => ref.withDirection(value));\n }\n ref.beforeStarted.subscribe(() => {\n const siblings = coerceArray(this.connectedTo).map(drop => {\n if (typeof drop === 'string') {\n const correspondingDropList = CdkDropList._dropLists.find(list => list.id === drop);\n if (!correspondingDropList && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n console.warn(`CdkDropList could not find connected drop list with id \"${drop}\"`);\n }\n return correspondingDropList;\n }\n return drop;\n });\n if (this._group) {\n this._group._items.forEach(drop => {\n if (siblings.indexOf(drop) === -1) {\n siblings.push(drop);\n }\n });\n }\n // Note that we resolve the scrollable parents here so that we delay the resolution\n // as long as possible, ensuring that the element is in its final place in the DOM.\n if (!this._scrollableParentsResolved) {\n const scrollableParents = this._scrollDispatcher.getAncestorScrollContainers(this.element).map(scrollable => scrollable.getElementRef().nativeElement);\n this._dropListRef.withScrollableParents(scrollableParents);\n // Only do this once since it involves traversing the DOM and the parents\n // shouldn't be able to change without the drop list being destroyed.\n this._scrollableParentsResolved = true;\n }\n ref.disabled = this.disabled;\n ref.lockAxis = this.lockAxis;\n ref.sortingDisabled = this.sortingDisabled;\n ref.autoScrollDisabled = this.autoScrollDisabled;\n ref.autoScrollStep = coerceNumberProperty(this.autoScrollStep, 2);\n ref.connectedTo(siblings.filter(drop => drop && drop !== this).map(list => list._dropListRef)).withOrientation(this.orientation);\n });\n }\n /** Handles events from the underlying DropListRef. */\n _handleEvents(ref) {\n ref.beforeStarted.subscribe(() => {\n this._syncItemsWithRef();\n this._changeDetectorRef.markForCheck();\n });\n ref.entered.subscribe(event => {\n this.entered.emit({\n container: this,\n item: event.item.data,\n currentIndex: event.currentIndex\n });\n });\n ref.exited.subscribe(event => {\n this.exited.emit({\n container: this,\n item: event.item.data\n });\n this._changeDetectorRef.markForCheck();\n });\n ref.sorted.subscribe(event => {\n this.sorted.emit({\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n container: this,\n item: event.item.data\n });\n });\n ref.dropped.subscribe(dropEvent => {\n this.dropped.emit({\n previousIndex: dropEvent.previousIndex,\n currentIndex: dropEvent.currentIndex,\n previousContainer: dropEvent.previousContainer.data,\n container: dropEvent.container.data,\n item: dropEvent.item.data,\n isPointerOverContainer: dropEvent.isPointerOverContainer,\n distance: dropEvent.distance,\n dropPoint: dropEvent.dropPoint,\n event: dropEvent.event\n });\n // Mark for check since all of these events run outside of change\n // detection and we're not guaranteed for something else to have triggered it.\n this._changeDetectorRef.markForCheck();\n });\n merge(ref.receivingStarted, ref.receivingStopped).subscribe(() => this._changeDetectorRef.markForCheck());\n }\n /** Assigns the default input values based on a provided config object. */\n _assignDefaults(config) {\n const {\n lockAxis,\n draggingDisabled,\n sortingDisabled,\n listAutoScrollDisabled,\n listOrientation\n } = config;\n this.disabled = draggingDisabled == null ? false : draggingDisabled;\n this.sortingDisabled = sortingDisabled == null ? false : sortingDisabled;\n this.autoScrollDisabled = listAutoScrollDisabled == null ? false : listAutoScrollDisabled;\n this.orientation = listOrientation || 'vertical';\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\n }\n /** Syncs up the registered drag items with underlying drop list ref. */\n _syncItemsWithRef() {\n this._dropListRef.withItems(this.getSortedItems().map(item => item._dragRef));\n }\n static {\n this.ɵfac = function CdkDropList_Factory(t) {\n return new (t || CdkDropList)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(DragDrop), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.ScrollDispatcher), i0.ɵɵdirectiveInject(i1$1.Directionality, 8), i0.ɵɵdirectiveInject(CDK_DROP_LIST_GROUP, 12), i0.ɵɵdirectiveInject(CDK_DRAG_CONFIG, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDropList,\n selectors: [[\"\", \"cdkDropList\", \"\"], [\"cdk-drop-list\"]],\n hostAttrs: [1, \"cdk-drop-list\"],\n hostVars: 7,\n hostBindings: function CdkDropList_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"id\", ctx.id);\n i0.ɵɵclassProp(\"cdk-drop-list-disabled\", ctx.disabled)(\"cdk-drop-list-dragging\", ctx._dropListRef.isDragging())(\"cdk-drop-list-receiving\", ctx._dropListRef.isReceiving());\n }\n },\n inputs: {\n connectedTo: [\"cdkDropListConnectedTo\", \"connectedTo\"],\n data: [\"cdkDropListData\", \"data\"],\n orientation: [\"cdkDropListOrientation\", \"orientation\"],\n id: \"id\",\n lockAxis: [\"cdkDropListLockAxis\", \"lockAxis\"],\n disabled: [\"cdkDropListDisabled\", \"disabled\", booleanAttribute],\n sortingDisabled: [\"cdkDropListSortingDisabled\", \"sortingDisabled\", booleanAttribute],\n enterPredicate: [\"cdkDropListEnterPredicate\", \"enterPredicate\"],\n sortPredicate: [\"cdkDropListSortPredicate\", \"sortPredicate\"],\n autoScrollDisabled: [\"cdkDropListAutoScrollDisabled\", \"autoScrollDisabled\", booleanAttribute],\n autoScrollStep: [\"cdkDropListAutoScrollStep\", \"autoScrollStep\"]\n },\n outputs: {\n dropped: \"cdkDropListDropped\",\n entered: \"cdkDropListEntered\",\n exited: \"cdkDropListExited\",\n sorted: \"cdkDropListSorted\"\n },\n exportAs: [\"cdkDropList\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([\n // Prevent child drop lists from picking up the same group as their parent.\n {\n provide: CDK_DROP_LIST_GROUP,\n useValue: undefined\n }, {\n provide: CDK_DROP_LIST,\n useExisting: CdkDropList\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return CdkDropList;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst DRAG_DROP_DIRECTIVES = [CdkDropList, CdkDropListGroup, CdkDrag, CdkDragHandle, CdkDragPreview, CdkDragPlaceholder];\nlet DragDropModule = /*#__PURE__*/(() => {\n class DragDropModule {\n static {\n this.ɵfac = function DragDropModule_Factory(t) {\n return new (t || DragDropModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: DragDropModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [DragDrop],\n imports: [CdkScrollableModule]\n });\n }\n }\n return DragDropModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CDK_DRAG_CONFIG, CDK_DRAG_HANDLE, CDK_DRAG_PARENT, CDK_DRAG_PLACEHOLDER, CDK_DRAG_PREVIEW, CDK_DROP_LIST, CDK_DROP_LIST_GROUP, CdkDrag, CdkDragHandle, CdkDragPlaceholder, CdkDragPreview, CdkDropList, CdkDropListGroup, DragDrop, DragDropModule, DragDropRegistry, DragRef, DropListRef, copyArrayItem, moveItemInArray, transferArrayItem };\n","import { Injectable } from '@angular/core';\nimport { Article, Material } from '@proman/interfaces/entity-interfaces';\nimport { BehaviorSubject } from 'rxjs';\nimport { pushArrays } from '@proman/utils';\nimport { ACL } from '@proman/services/acl.service';\nimport { Entity } from '@proman/services/entity.service';\nimport { Dialog } from '@frontend/shared/services/dialog.service';\nimport { TableDialogComponent } from '@proman/table';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ArticlesService {\n currentMaterialSummary: BehaviorSubject = new BehaviorSubject([]);\n\n constructor(\n private Entity: Entity,\n private Dialog: Dialog,\n private ACL: ACL\n ) {\n\n }\n\n initMaterials() {\n this.currentMaterialSummary.next([]);\n }\n\n addMaterials(materials: Material[]) {\n let item = this.currentMaterialSummary;\n item.next(pushArrays(item.value, materials));\n }\n\n isChild(article: Article) {\n return this.Entity.get('article_child').search({ 'child.id': article.id, 'parent.id': `!${article.id}`, join: ['parent', 'child'] }).then((response) => {\n return response.length > 0;\n })\n }\n\n displayParents = (article: Article) => {\n this.Dialog.open(TableDialogComponent, {\n header: `article_${article.id}_parents`,\n tableId: `article_${article.id}_parents`,\n config: {\n entity: 'article_child',\n aclRoot: 'article',\n addButton: null,\n hideSettings: true,\n fields: [\n {\n name: 'name',\n key: 'parent.name',\n state: {\n name: 'Article',\n key: 'articleId',\n id: 'parent.id',\n }\n }\n ],\n extraParameters: {\n join: ['parent', 'child'],\n 'child.id': article.id,\n 'parent.id': `!${article.id}`,\n }\n }\n })\n }\n\n public canEditArticle(artcle: Article): boolean {\n return !artcle.confirmed || this.ACL.check('article.master');\n }\n\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { findById, getIndexById, isDefined } from '@proman/utils';\nimport { Entity } from '@proman/services/entity.service';\nimport { MaterialEntityInterface } from '@proman/resources/material';\nimport {\n Article,\n ArticleChild,\n ArticleMaterial,\n MaterialCategory,\n} from '@proman/interfaces/entity-interfaces';\nimport { FilterService } from '@proman/services/filter.service';\nimport { Money } from '@proman/interfaces/common.interface';\nimport { ArticlesService } from '../services/articles.service';\nimport { ACL } from '@proman/services/acl.service';\nimport { CurrenciesService } from '@proman/services/currencies.service';\n\n@Component({\n selector: 'pm-article-summary-materials',\n template: `\n \n
\n \n @if (isHidden && totalPrice) {\n
\n {{ totalPrice | proPrice }}
\n }\n \n @if (!isHidden && materialCategories?.length) {\n @for (mc of materialCategories; track $index) {\n
\n\n
\n \n \n \n \n \n \n \n \n \n \n {{ mc.name }} \n {{ 'description' | translate }} \n {{ 'brutto' | translate }} \n {{ 'netto' | translate }} \n {{ 'unit' | translate }} \n {{ 'price' | translate }} \n {{ 'price_ratio' | translate }} \n \n @for (material of mc.materials; track $index) {\n \n {{ material.name }} \n \n {{ (material.description || '') | translate }} \n {{ (material._quantity || 0.0) | proDecimal: 4 }} \n {{ material.netto | proDecimal: 4 }} \n {{ material.materialType?.unit }} \n {{ material._price | proPrice: 4 }} \n {{ material._priceRatio | proDecimal: 4 }} \n \n }\n
\n\n
\n }\n }\n\n @if (materialsArticles?.length) {\n
\n @for (materialArticle of materialsArticles; track $index) {\n
\n \n }\n
\n }\n\n @if (subproducts?.length) {\n
\n @for (sub of subproducts; track $index) {\n
\n \n }\n
\n }\n\n
\n\n `,\n styles: [`\n th {\n text-align: left;\n font-size: 0.9em;\n font-weight: normal;\n }\n\n .ArticleSummaryRightOverlay {\n position: absolute;\n top: 0;\n right: 0;\n }\n\n .AdjustUnits {\n top: -15px;\n position: relative;\n }\n `]\n})\n\nexport class ArticleSummaryMaterialsComponent implements OnInit {\n @Input() article: Article;\n @Input() isSubmenu: boolean;\n @Input() color: any;\n @Input() ratio: number = 1;\n isHidden: boolean;\n\n totalPrice: Money;\n totalQuantity: number;\n materialEntity: MaterialEntityInterface;\n materialCategories: any[];\n subproducts: any[] = [];\n materialsArticles: any[] = [];\n isOther: boolean = false;\n\n constructor(\n private Currencies: CurrenciesService,\n private Entity: Entity,\n private Filter: FilterService,\n private Articles: ArticlesService,\n private ACL: ACL,\n ) {\n this.materialEntity = this.Entity.get('material') as MaterialEntityInterface;\n\n this.totalPrice = this.Currencies.getZeroPrice();\n this.totalQuantity = 0;\n }\n\n ngOnInit() {\n if (this.ACL.check('material.view')) {\n this.materialEntity\n .search({\n 'articleMaterials.article.id': this.article.id,\n 'join': [\n 'categories',\n 'articleMaterials',\n 'articleMaterials.article',\n 'categories.parent',\n 'materialType',\n 'defaultQuant'\n ]\n })\n .then(async (data: any[]) => {\n const rootCategories = [];\n let localRoot;\n let root;\n const otherCat = { id: -1, name: this.Filter.translate('other') } as MaterialCategory;\n\n if (!data) return; // prevent 500 response error crash frontend;\n\n for (const material of data) {\n if (!(material.categories[0])) {\n material.categories = [otherCat];\n this.isOther = true;\n }\n\n localRoot = !material.categories[0].parent ? material.categories[0] : material.categories[0].parent;\n root = findById(rootCategories, localRoot);\n\n if (!isDefined(root)) {\n rootCategories.push(localRoot);\n if (!localRoot.materials) localRoot.materials = [];\n root = localRoot;\n }\n\n root.materials.push(material);\n }\n\n // move 'other' category to end of array\n if (this.isOther && rootCategories.length) {\n const index = getIndexById(rootCategories, 0);\n rootCategories.push(rootCategories.splice(index, 1)[0]);\n }\n\n await this.Entity.get('article_child')\n .search({ 'parent.id': this.article.id, 'join': ['child', 'child.categories'] })\n .then((response) => this.subproducts = response.filter((a) => !a.optional));\n\n await this.Entity.get('article_material')\n .search({ 'article.id' : this.article.id, 'join': ['material', 'material.defaultQuant', 'material.materialType'] })\n .then((response: ArticleMaterial[]) => {\n let totalPrice: number = 0;\n let totalNettoQuantity: number = 0;\n let totalBruttoQuantity: number = 0;\n\n response.forEach((articleMaterial) => {\n\n for (const material of data) {\n if (articleMaterial.material && articleMaterial.material.id === material.id) {\n material._quantity = articleMaterial.standardQuantity * this.ratio || 0;\n material._price = this.Currencies.getZeroPrice();\n let cost = 0;\n let netto = 0;\n if (articleMaterial.standardCost > 0) {\n cost = articleMaterial.standardCost;\n } else if (material.standardCost > 0) {\n cost = material.standardCost;\n } else {\n cost = +material.defaultQuant?.unitPrice?.amount;\n }\n\n netto = material._quantity * (+material.ratioBruttoNetto || 1) * (material.articleMaterials[material.articleMaterials.length - 1].article.id === this.article.id ?\n material.articleMaterials[material.articleMaterials.length - 1].finalCoefficient : 1);\n\n const price = material._quantity * cost;\n totalPrice += price;\n const priceRatio = netto * cost;\n material._price.amount = price.toString();\n material._priceRatio = priceRatio.toString();\n material.netto = netto.toString();\n totalNettoQuantity += ((material._quantity || 0.0) * (material.ratioBruttoNetto || 1));\n totalBruttoQuantity += material._quantity;\n material.description = articleMaterial.description;\n }\n }\n });\n\n this.Articles.addMaterials(data.filter((item) => !!item._price));\n });\n\n this.materialCategories = rootCategories;\n });\n\n }\n }\n\n handleClick = () => {\n if (this.isSubmenu) this.isHidden = !this.isHidden;\n };\n}\n","import { Component, Input, OnChanges } from '@angular/core';\nimport { ImagePathService } from '@proman/services/image-path.service';\nimport { PromanFile } from '@proman/interfaces/entity-interfaces';\n\nconst DEFAULT_OPTIONS = {\n width: 150,\n height: 150\n};\n\n@Component({\n selector: 'pm-image',\n template: `\n \n `,\n styles: [`\n \n .ObjectFitCover {\n object-fit: cover !important; \n }\n `]\n})\n\nexport class ImageComponent implements OnChanges {\n @Input() image: PromanFile;\n @Input() options: {\n width?: number;\n height?: number;\n path?: boolean;\n fit?: boolean;\n borderRadius?: number;\n };\n\n imageUrl: string;\n\n constructor(\n private ImagePath: ImagePathService\n ) {\n\n }\n\n ngOnChanges() {\n\n if (this.image) {\n this.imageUrl = this.ImagePath.getFile(this.image, 'png');\n }\n\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { addMoney } from '@proman/utils';\nimport { Entity } from '@proman/services/entity.service';\nimport { ActivatedRoute } from '@angular/router';\nimport { CONFIG } from '@proman/config';\nimport { InputDialogComponent } from '../../shared/components/input-dialog.component';\nimport { Dialog } from '../../shared/services/dialog.service';\nimport { COOKIE_AUTHORIZATION, CookiesService } from '@proman/services/cookies.service';\nimport { Money } from '@proman/interfaces/common.interface';\nimport { ArticlesService } from '../services/articles.service';\nimport { CurrenciesService } from '@proman/services/currencies.service';\nimport { ACL } from '@proman/services/acl.service';\nimport {\n ArticleChild,\n ArticleOperation, ArticleProductionParameter,\n EventComment,\n FeatureValue,\n PromanFile\n} from '@proman/interfaces/entity-interfaces';\nimport { FilePreviewService } from '@proman/services/file-preview.service';\nimport {ModelItemInterface, ModelService} from \"@proman/services/model.service\";\nimport {SelectOption} from \"@proman/interfaces/object-interfaces\";\n\n@Component({\n selector: 'pm-article-summary',\n template: `\n \n @for (error of item.erros; track $index) {\n
\n }\n\n
\n
\n @if (pdfArray?.length > 0) {\n
\n }\n
\n
\n\n
\n @if (features.length) {\n
\n
{{ 'features' | translate }} \n @for (feature of features; track $index) {\n
\n @for (option of feature.options; track $index) {\n {{ option.name | translate }} \n }\n \n }\n
\n }\n\n
\n
\n\n @if (ACL.check('article.edit')) {\n
\n }\n\n @if (ACL.check('article.edit')) {\n
\n
\n
\n
\n
{{ totalPrice | proPrice:4 }} \n
\n
\n }\n\n @if (operations.length && ACL.check('article.edit')) {\n
\n
{{ 'operations' | translate }} \n @for (ao of operations; track $index) {\n
\n
\n @if (ao.files[0]) {\n
\n }\n
\n
\n\n
\n @if (ao.articleOperationWorkplaces?.length) {\n
\n @for (w of ao.articleOperationWorkplaces; track $index) {\n {{ w.workplace.name }}, \n }\n
\n }\n
\n
\n
\n }\n
Total operation cost: {{\n {\n amount: standardOperationsCost.toString(),\n currency: defaultCurrency\n } | proPrice: 2\n }} \n
\n }\n
\n\n @if (item.description) {\n
\n @if (item.photo) {\n
\n }\n
\n
{{ 'description' | translate }} \n
\n
\n
\n }\n\n @if (item.technicalDescription) {\n
\n
\n
{{ 'technical_description' | translate }} \n
\n
\n
\n }\n\n @if ((item.parameters?.length || item.parameterGroups?.length) && ACL.check('article.edit')) {\n
\n
{{ 'parameters' | translate }} \n @for (articleParameter of item.parameters; track $index) {\n
\n }\n
\n \n \n {{ item.parameterGroups[0]?.parameter.name }} \n @for (childParameter of item.parameterGroups[0]?.children; track $index) {\n {{ childParameter.parameter.name }} \n }\n \n \n \n @for (parameterGroup of item.parameterGroups; track $index) {\n \n {{ parameterGroup.name }} \n @for (childParameter of parameterGroup?.children; track $index) {\n \n \n \n }\n \n }\n \n
\n
\n }\n
\n `,\n styles: [`\n h4 {\n margin: 0.5em 0;\n }\n\n .parameterColor mat-slide-toggle {\n color: #ba68c8;\n opacity: 1;\n }\n `]\n})\n\nexport class ArticleSummaryComponent implements OnInit {\n @Input('article') item: any;\n materialCategories: any = [];\n features: any = [];\n operations: any[] = [];\n subproducts: ArticleChild[] = [];\n comments: EventComment[];\n allComments: any = [];\n commentsArray: any = [];\n materialEntity: any;\n featureValueEntity: any;\n articleProductionParameterEntity: any;\n articleEntity: any;\n articleOperationEntity: any;\n articleOperationId: any = [];\n eventsOfArticleId: any = [];\n totalQuantityBrutto: string = '0';\n totalQuantityNetto: string = '0';\n defaultCurrency: string = '€';\n totalPrice: Money;\n standardOperationsCost: number = 0;\n pdfArray: PromanFile[] = [];\n model: ModelItemInterface;\n weightUnitOptions: SelectOption[];\n\n constructor(\n private Entity: Entity,\n private Dialog: Dialog,\n private Articles: ArticlesService,\n private Currencies: CurrenciesService,\n private Cookies: CookiesService,\n private route: ActivatedRoute,\n private FilePreview: FilePreviewService,\n private Model: ModelService,\n public ACL: ACL,\n ) {\n if (this.route.parent) this.item = this.route.parent.snapshot.data['article'];\n this.materialEntity = this.Entity.get('material');\n this.featureValueEntity = this.Entity.get('feature_value');\n this.articleProductionParameterEntity = this.Entity.get('article_production_parameter');\n this.articleOperationEntity = this.Entity.get('article_operation');\n this.articleEntity = this.Entity.get('article');\n this.totalPrice = this.Currencies.getZeroPrice();\n this.defaultCurrency =this.totalPrice.currency;\n }\n\n ngOnInit() {\n this.Articles.initMaterials();\n\n this.model = this.Model.get(this.item, 'article');\n\n this.Entity.get('unit')\n .search({ isVisible: true })\n .then((response) => {\n this.weightUnitOptions = response.map((item) => ({ ...item, id: item.name }));\n });\n\n this.Entity.get('article_child').search({ 'parent.id': this.item.id, 'join': ['child', 'child.categories'] })\n .then((response: ArticleChild[]) => this.subproducts = response);\n\n Promise.all([\n this.featureValueEntity.search({ 'articles.id': this.item.id, 'join': ['feature'] }),\n this.articleProductionParameterEntity.search({\n 'article.id': this.item.id,\n 'join': [\n 'parameter',\n 'children',\n 'children.parameter'\n ],\n 'sort': { position: 'asc' }\n })\n ])\n .then((response: [FeatureValue[], ArticleProductionParameter[]]) => {\n const features = [];\n const enabledValues = response[0];\n const map = {};\n let featureId;\n\n for (let iter = 0; iter < enabledValues.length; iter++) {\n featureId = enabledValues[iter].feature.id;\n\n if (!map[featureId]) {\n map[featureId] = enabledValues[iter].feature;\n }\n\n const feature = map[featureId];\n\n if (!feature.options) {\n feature.options = [];\n }\n\n feature.options.push(enabledValues[iter]);\n\n enabledValues[iter].feature = null;\n }\n\n for (const iter in map) {\n features.push(map[iter]);\n }\n\n this.features = features;\n\n this.item.parameterGroups = [];\n this.item.parameters = [];\n\n response[1].forEach((parameter: any) => {\n\n if (parameter.parameter.type === 'parameter_group') {\n try {\n parameter.name = JSON.parse(parameter.value).name;\n\n this.item.parameterGroups.push(parameter);\n } catch (e) {\n\n }\n\n } else {\n this.item.parameters.push(parameter);\n\n }\n\n });\n });\n\n this.item.errors = [];\n\n if (!this.operations.length) {\n this.articleOperationEntity.search({ 'article.id': this.item.id, 'join': ['operation', 'files', 'article']})\n .then((operations: ArticleOperation[]) => {\n this.operations = operations\n this.operations.forEach((o) => {\n this.standardOperationsCost += o.standardCost;\n });\n });\n }\n\n this.Articles.currentMaterialSummary\n .subscribe((values) => {\n if (!values) return;\n const weightBrutto = {};\n const weightNetto = {};\n let price = this.Currencies.getZeroPrice();\n\n values.forEach((material) => {\n const unit = material.materialType.unit;\n if (!weightBrutto[unit]) {\n weightBrutto[unit] = 0;\n weightNetto[unit] = 0;\n }\n\n const quantity = (+material._quantity || 0.0);\n weightBrutto[unit] += quantity;\n weightNetto[unit] += +(quantity * (material.ratioBruttoNetto || 1) * (material.articleMaterials[material.articleMaterials.length - 1].article.id === this.item.id ?\n material.articleMaterials[material.articleMaterials.length - 1].finalCoefficient : 1));\n\n price = addMoney([price, material._price]);\n });\n\n this.totalPrice = price;\n\n let brutto = '';\n let netto = '';\n\n for (const unit of Object.keys(weightBrutto)) {\n brutto = brutto + `${+weightBrutto[unit].toFixed(4)} ${unit} `;\n netto = netto + `${+weightNetto[unit].toFixed(4)} ${unit} `;\n }\n\n this.totalQuantityBrutto = brutto;\n this.totalQuantityNetto = netto;\n });\n\n\n this.getCommentsOfArticle();\n this.pdfArray = this.item.files?.filter((file: PromanFile) => file.extension === 'pdf');\n }\n\n print = async () => {\n const entityParams = { context: 'technology_description' };\n const templates = await this.Entity.get('template').search(entityParams);\n\n if (!templates.length) return;\n\n const openPdf = (template?: string) => {\n const token = this.Cookies.get(COOKIE_AUTHORIZATION);\n\n let url = `${CONFIG.api}article/pdf?article=${this.item.id}&_authorization=${token}`;\n\n if (template) {\n url += `&template=${template}`;\n }\n\n window.open(url);\n };\n\n if (templates.length > 1) {\n this.Dialog\n .open(InputDialogComponent, {\n header: 'template',\n variant: 'confirm',\n mainField: {\n key: 'template',\n name: 'template',\n type: 'autocomplete',\n value: templates[0],\n config: { entity: 'template', entityParams },\n }\n })\n .then((result: { template: string }) => openPdf(result.template));\n\n } else {\n openPdf();\n\n }\n\n };\n\n downloadPdfs() {\n this.pdfArray.forEach((file) => this.FilePreview.download(file));\n }\n\n getCommentsOfArticle() {\n this.Entity.get('event').search({\n join: ['articleOperation', 'articleOperation.article', 'comments'],\n 'articleOperation.article.id': this.item.id\n }).then((resp) => {\n if (resp) resp.filter((eventOperation2) => eventOperation2.comments && eventOperation2.comments.length > 0).forEach((eventOperation) => {\n this.eventsOfArticleId.push(eventOperation.id);\n this.comments = eventOperation.comments;\n this.commentsArray.push(this.comments);\n });\n }).then(() => {\n this.commentsArray.forEach((comm: any) => {\n comm.forEach((comment: any) => {\n this.allComments.push(comment);\n });\n });\n });\n }\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogRef } from '@angular/material/legacy-dialog';\n\n@Component({\n selector: 'pm-article-summary-dialog',\n template: `\n \n \n \n `\n})\n\nexport class ArticleSummaryDialogComponent {\n constructor(@Inject(MAT_LEGACY_DIALOG_DATA) public data: any, public dialogRef: MatLegacyDialogRef) {}\n}\n","import { Component, Input, Output, EventEmitter, ChangeDetectorRef, OnInit } from '@angular/core';\nimport { Entity } from '@proman/services/entity.service';\nimport { Dialog } from '@frontend/shared/services/dialog.service';\nimport { deepCopy, findById } from '@proman/utils';\nimport { ParameterDropdownOption } from '@proman/interfaces/entity-interfaces';\nimport { InputDialogComponent } from '@frontend/shared/components/input-dialog.component';\n\n@Component({\n selector: 'pm-parameter-dropdown-definition',\n template: `\n \n\n `\n})\n\nexport class ParameterDropdownDefinitionComponent implements OnInit {\n @Input() config: any;\n @Input() value: any;\n @Input() disabled: any;\n @Output() onChange: EventEmitter = new EventEmitter();\n openEdit: number|null;\n\n items: any = [];\n parameterDropdownOptionEntity: any;\n\n constructor(\n Entity: Entity,\n private Dialog: Dialog,\n private cd: ChangeDetectorRef,\n ) {\n this.parameterDropdownOptionEntity = Entity.get('parameter_dropdown_option');\n }\n\n ngOnInit() {\n this.getItems();\n }\n\n getItems = () => {\n this.parameterDropdownOptionEntity\n .search({ 'parameter.id': this.config.parameter.id, 'translate': true, 'sort': { position: 'asc' } })\n .then((items: any[]) => {\n\n if (items) {\n this.items = items.map((item: any) => {\n item.value = item.name;\n item.name = `#${item.id} - ${item.name}`;\n return item;\n });\n\n }\n\n if (this.openEdit) {\n this.handleEdit(findById(this.items, this.openEdit));\n this.openEdit = null;\n\n }\n\n this.cd.markForCheck();\n\n });\n\n };\n\n onAdd() {\n this.Dialog.open(InputDialogComponent, {\n variant: 'create',\n header: 'create',\n }).then((data: { name: string }) => {\n this.parameterDropdownOptionEntity\n .create({\n parameter: this.config.parameter.id,\n name: data.name,\n position: this.items.length\n })\n .then(() => this.getItems());\n });\n\n }\n\n onRemove($event: any) {\n this.items = $event.items;\n\n this.parameterDropdownOptionEntity\n .remove({ id: $event.item.id });\n }\n\n onUpdate($event: any) {\n this.items = $event.items;\n\n this.parameterDropdownOptionEntity\n .update({\n id: $event.item.id,\n name: $event.item.value,\n translate: true\n })\n .then(() => this.getItems());\n }\n\n handleEdit(item: ParameterDropdownOption) {\n item = deepCopy(item);\n item.name = item.value;\n\n this.Dialog.entityEdit('parameter_dropdown_option', item, {\n mainField: {\n key: 'name',\n name: 'name',\n config: {\n required: true,\n // validators: { unique : { resource: 'parameter_dropdown_option', field: 'name', data: { parameter: [this.config.parameter.id] } } }\n }\n }\n })\n .afterClosed()\n .subscribe(() => this.getItems());\n }\n\n handleRemove(data: any) {\n this.parameterDropdownOptionEntity\n .remove({ id: data.item.id })\n .then(() => this.getItems());\n }\n\n async handleDrop(data: any) {\n await setTimeout(() => {});\n\n this.parameterDropdownOptionEntity\n .reposition({\n 'positionId': data.item.id,\n 'positionAt': data.position,\n 'parameter.id': this.config.parameter.id\n })\n .then(() => this.getItems());\n }\n\n}\n","import { Component, Input, Output, EventEmitter, SimpleChanges, OnInit, OnChanges } from '@angular/core';\n\n@Component({\n selector: 'pm-parameter-list',\n template: `\n \n `\n})\n\nexport class ParameterListComponent implements OnInit, OnChanges {\n @Input() value: any;\n @Input() config: any;\n @Input() disabled: any;\n @Output() onChange: EventEmitter = new EventEmitter();\n\n items: any = [];\n\n ngOnChanges(changes: SimpleChanges) {\n\n if (changes.value) {\n this.setItems(changes.value.currentValue);\n\n }\n\n }\n\n ngOnInit() {\n this.setItems(this.value);\n }\n\n setItems = (items: any) => {\n\n if (items) {\n\n try {\n this.items = JSON.parse(items).map((item: any) => {\n return { value: item };\n });\n\n } catch (err) {\n\n }\n\n }\n\n };\n\n handleChanges($event: any) {\n this.onChange.emit(JSON.stringify($event.items.map((item: any) => {\n return item.value;\n })));\n }\n}\n","import { AfterViewInit, Component, ElementRef, Inject, OnInit, ViewChild } from '@angular/core';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogModule, MatLegacyDialogRef } from \"@angular/material/legacy-dialog\";\nimport * as _Cropper from 'cropperjs';\nimport { fileFromBase64 } from '@proman/utils';\nimport { CommonModule } from \"@angular/common\";\nimport { PromanButtonComponent } from \"@proman/button\";\nimport { Fa6Module } from \"@proman/fa/fa6.module\";\nimport { FlexModule } from \"ngx-flexible-layout\";\nimport { TranslatePipe } from \"@proman/shared/pipes/pipes/translate.pipe\";\n\nconst Cropper: any = _Cropper;\n\nconst CROPPER_CSS_ID = 'cropper-styles';\n\n@Component({\n selector: 'pro-cropper-image-dialog',\n standalone: true,\n imports: [\n CommonModule,\n MatLegacyDialogModule,\n PromanButtonComponent,\n Fa6Module,\n FlexModule,\n TranslatePipe,\n ],\n template: `\n \n {{ 'crop_image' | translate }} \n \n \n
\n \n \n
\n
\n\n
\n\n
\n
\n \n
\n
\n\n
\n \n `,\n styles: [\n `\n h1 {\n margin: -24px -24px 40px;\n background-color: #448aff;\n color: #ffffff;\n padding: 12px;\n overflow: auto;\n }\n\n\n .dialog-close {\n -moz-appearance: none;\n -webkit-appearance: none;\n background: none;\n border: none;\n border-radius: 290486px;\n cursor: pointer;\n pointer-events: auto;\n display: inline-block;\n flex-grow: 0;\n flex-shrink: 0;\n font-size: 0;\n height: 40px;\n max-height: 40px;\n max-width: 40px;\n min-height: 40px;\n min-width: 40px;\n outline: none;\n position: relative;\n vertical-align: top;\n width: 40px;\n }\n\n .dialog-close::before, .dialog-close::after {\n background-color: white;\n content: \"\";\n display: block;\n left: 50%;\n position: absolute;\n top: 50%;\n -webkit-transform: translateX(-50%) translateY(-50%) rotate(45deg);\n transform: translateX(-50%) translateY(-50%) rotate(45deg);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n }\n\n .dialog-close::before {\n height: 2px;\n width: 75%;\n background-color: white;\n }\n\n .dialog-close::after {\n height: 75%;\n background-color: white;\n width: 2px;\n }\n\n\n img {\n display: block;\n\n\n max-width: 100%;\n }\n\n\n `\n ]\n})\n\nexport class CropperDialogComponent implements OnInit, AfterViewInit {\n @ViewChild('cropperWorkContainer', { static: true }) container: ElementRef;\n isPreview = true;\n fileName: string;\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: { aspectRatio?: number, file?: File },\n private dialogRef: MatLegacyDialogRef,\n\n ) {\n if (!document.querySelector(`#${CROPPER_CSS_ID}`)) {\n import('./css/cropper.css')\n .then((styles) => {\n const style = document.createElement('style');\n style.innerText = styles.cropperCss;\n document.head.appendChild(style);\n })\n }\n\n }\n\n ngOnInit() {\n\n }\n\n ngAfterViewInit() {\n this.container.nativeElement.style.height = `${window.innerHeight - 300}px`;\n\n if (this.data.file) {\n this.handleChange({ target: { files: [this.data.file] } } as unknown as InputEvent)\n }\n\n }\n\n handleChange(_event: any) {\n const event = _event as InputEvent;\n const FR = new FileReader();\n const input = event.target;\n this.fileName = input.files[0].name;\n\n FR.addEventListener(\"load\", (evt) => {\n const image = (document.querySelector(\"#img\"));\n const canvas = document.getElementById(\"originalCanvas\");\n const ctx = canvas.getContext(\"2d\");\n\n\n image.onload = function() {\n canvas.height = image.naturalHeight;\n canvas.width = image.naturalWidth;\n ctx.drawImage(image, 0, 0);\n };\n image.src = evt.target.result as any;\n\n this.initCropper()\n });\n\n FR.readAsDataURL(input.files[0]);\n\n }\n\n initCropper() {\n const options: _Cropper.default.Options = {\n crop: (event: any) => {\n if (this.isPreview) {\n this.cropCanvas(\n document.getElementById(\"originalCanvas\"),\n event.detail.x,\n event.detail.y,\n event.detail.width,\n event.detail.height,\n );\n }\n },\n viewMode: 1,\n aspectRatio: (this.data.aspectRatio || NaN),\n initialAspectRatio: (this.data.aspectRatio || NaN),\n };\n const cropper = new Cropper(document.querySelector('#img'), options);\n }\n\n cropCanvas = (sourceCanvas: HTMLCanvasElement,left: number,top: number,width : number,height: number) => {\n const destCanvas: HTMLCanvasElement = document.querySelector('#previewCanvas');\n destCanvas.width = width;\n destCanvas.height = height;\n destCanvas.style.height = `${height}px`;\n destCanvas.style.width = `${width}px`;\n destCanvas.getContext(\"2d\").drawImage(\n sourceCanvas,\n left,top,width,height, // source rect with content to crop\n 0,0,width,height); // newCanvas, same size as source rect\n }\n\n togglePreview() {\n this.isPreview = !this.isPreview;\n\n if (this.isPreview) {\n setTimeout(() => {\n this.container.nativeElement.querySelector('#previewCanvas').scrollIntoView({ behavior: 'smooth' });\n })\n }\n }\n\n close() {\n this.dialogRef.close(0)\n }\n\n confirm() {\n const base64Canvas = (document.querySelector('#previewCanvas'))\n .toDataURL(\"image/jpeg\");\n const file = fileFromBase64(base64Canvas, this.fileName);\n this.dialogRef.close(file);\n }\n}\n","import { Component, Inject } from '@angular/core';\nimport { UntypedFormGroup, UntypedFormControl, Validators, ReactiveFormsModule } from \"@angular/forms\";\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogModule, MatLegacyDialogRef } from \"@angular/material/legacy-dialog\";\nimport { EntityItemFieldConfig } from '@proman/interfaces/object-interfaces';\nimport { CommonModule } from \"@angular/common\";\nimport { DialogTitleComponent } from \"@proman/common-components/standalone/dialog-title.component\";\nimport { DialogActionsComponent } from \"@proman/common-components/standalone/dialog-actions.component\";\nimport { PromanButtonComponent } from \"@proman/button\";\nimport { PromanTextSimpleComponent } from \"@proman/text-simple\";\nimport { PromanDateTimeModule } from \"@proman/datepicker/proman-date-time.module\";\nimport { PromanFile } from \"@proman/interfaces/entity-interfaces\";\nimport { FlexLayoutModule } from \"ngx-flexible-layout\";\n\n@Component({\n selector: 'pro-files-manager-restrictions-dialog',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n DialogTitleComponent,\n DialogActionsComponent,\n PromanButtonComponent,\n PromanTextSimpleComponent,\n PromanDateTimeModule,\n FlexLayoutModule,\n MatLegacyDialogModule,\n ],\n template: `\n \n `\n})\n\nexport class PromanFilesManagerRestrictionsDialogComponent {\n parameters: EntityItemFieldConfig[];\n form: UntypedFormGroup;\n\n file: PromanFile;\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: PromanFile,\n public dialogRef: MatLegacyDialogRef\n ) {\n this.file = { ...data };\n }\n\n confirm(createForm: any) {\n this.dialogRef.close({ times: this.file.accessibleTimes, })\n }\n\n}\n","import { Component, Inject } from '@angular/core';\nimport { UntypedFormGroup, ReactiveFormsModule } from \"@angular/forms\";\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogModule, MatLegacyDialogRef } from \"@angular/material/legacy-dialog\";\nimport { EntityItemFieldConfig } from '@proman/interfaces/object-interfaces';\nimport { CommonModule } from \"@angular/common\";\nimport { DialogTitleComponent } from \"@proman/common-components/standalone/dialog-title.component\";\nimport { DialogActionsComponent } from \"@proman/common-components/standalone/dialog-actions.component\";\nimport { PromanButtonComponent } from \"@proman/button\";\nimport { PromanTextSimpleComponent } from \"@proman/text-simple\";\nimport { PromanDateTimeModule } from \"@proman/datepicker/proman-date-time.module\";\nimport { PromanFile } from \"@proman/interfaces/entity-interfaces\";\nimport { FlexLayoutModule } from \"ngx-flexible-layout\";\n\n@Component({\n selector: 'pro-files-manager-edit-name-dialog',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n DialogTitleComponent,\n DialogActionsComponent,\n PromanButtonComponent,\n PromanTextSimpleComponent,\n PromanDateTimeModule,\n FlexLayoutModule,\n MatLegacyDialogModule,\n ],\n template: `\n \n `\n})\n\nexport class PromanFilesManagerEditNameDialogComponent {\n parameters: EntityItemFieldConfig[];\n form: UntypedFormGroup = new UntypedFormGroup({});\n\n file: PromanFile;\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: PromanFile,\n public dialogRef: MatLegacyDialogRef\n ) {\n this.file = data;\n }\n\n confirm() {\n this.dialogRef.close(this.file.name);\n }\n\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogModule, MatLegacyDialogRef } from '@angular/material/legacy-dialog';\nimport { FlexLayoutModule } from 'ngx-flexible-layout';\nimport { PromanButtonComponent } from '@proman/button';\nimport { DialogTitleComponent } from \"@proman/common-components/standalone/dialog-title.component\";\nimport { DialogActionsComponent } from \"@proman/common-components/standalone/dialog-actions.component\";\nimport { TranslatePipe } from \"@proman/shared/pipes/pipes/translate.pipe\";\n\n// SIMPLE YES NO MODE DIALOG\n\n@Component({\n selector: 'pro-simple-confirm-dialog',\n standalone: true,\n imports: [\n MatLegacyDialogModule,\n FlexLayoutModule,\n TranslatePipe,\n PromanButtonComponent,\n DialogTitleComponent,\n DialogActionsComponent,\n ],\n template: `\n \n \n
{{ data.question | translate }}?
\n
\n \n \n \n \n `\n})\n\nexport class PromanSimpleConfirmDialogComponent {\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: {\n header: string,\n question: string,\n },\n public dialogRef: MatLegacyDialogRef) {\n }\n\n confirm() {\n\n }\n\n set(parameter: any, value: any) {\n parameter.value = value;\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n AfterViewInit,\n OnDestroy, OnInit, OnChanges, SimpleChanges\n} from '@angular/core';\nimport { Entity } from '@proman/services/entity.service';\nimport { UploaderService } from '@proman/services/uploader.service';\nimport { UiPreferencesService, UI_CLIPBOARD_PASTE_TARGET } from '@proman/services/ui-preferences.service';\nimport { ArticleTest, Order, Production, PromanFile, SystemOptions } from '@proman/interfaces/entity-interfaces';\nimport { HttpProgressEvent } from '@angular/common/http';\nimport { copyToClipboard, getScreenWidthPercent, isArray } from '@proman/utils';\nimport { ImagePathService } from '@proman/services/image-path.service';\nimport { ToastService } from '@proman/services/toast.service';\nimport { FilePreviewService } from '@proman/services/file-preview.service';\nimport { ACL } from '@proman/services/acl.service';\nimport { getSystemOptions } from '@proman/store/system-options';\nimport { Store } from '@ngrx/store';\nimport { dateTime } from '@proman/interfaces/common.interface';\nimport { CommonModule } from '@angular/common';\nimport { PipesModule } from '@proman/shared/pipes/pipes.module';\nimport { PromanButtonComponent } from '@proman/button';\nimport { FlexLayoutModule } from 'ngx-flexible-layout';\nimport { MatLegacyListModule } from '@angular/material/legacy-list';\nimport { LabelComponent } from '@proman/common-components/components/label.component';\nimport { PromanThumbnailComponent } from '@proman/common-components/components/proman-thumbnail.component';\nimport { PromanCommonComponentsModule } from '@proman/common-components/proman-common-components.module';\nimport { PromanDialogService } from '@proman/dialog/proman-dialog.service';\nimport { PromanCheckboxComponent } from '@proman/checkbox';\nimport { MatLegacyProgressBarModule } from '@angular/material/legacy-progress-bar';\nimport { CropperDialogComponent } from '@proman/cropper/cropper-dialog.component';\nimport { TagsComponent } from '@proman/tags/tags.component';\nimport {\n PromanFilesManagerRestrictionsDialogComponent\n} from './proman-files-manager-restrictions-dialog.component';\nimport {\n PromanFilesManagerEditNameDialogComponent\n} from './proman-files-manager-edit-name-dialog.component';\nimport { QueryExpressionService } from '@proman/services/query-expression.service';\nimport { PromanSimpleConfirmDialogComponent } from '@proman/dialog/components/proman-simple-confirm-dialog.component';\n\n@Component({\n selector: 'pro-files-manager',\n standalone: true,\n imports: [\n CommonModule,\n FlexLayoutModule,\n PipesModule,\n PromanButtonComponent,\n MatLegacyListModule,\n LabelComponent,\n PromanThumbnailComponent,\n PromanCommonComponentsModule,\n PromanCheckboxComponent,\n MatLegacyProgressBarModule,\n CropperDialogComponent,\n TagsComponent,\n PromanFilesManagerRestrictionsDialogComponent,\n ],\n providers: [\n FilePreviewService,\n ],\n template: `\n \n
\n @if (!config.preventOverlay && overlayMoved) {\n {{ 'drop_files_here_to_upload' | translate }} \n }\n
\n
\n
{{ config?.label || 'files' | translate }} \n @if (!disabled && onChange.observers.length) {\n
\n }\n @if (!disabled && onChange.observers.length && config.canAddFileRef) {\n
\n }\n
\n @if (!disabled) {\n \n }\n
\n @if ($any(_value)?.length || $any(_value)?.length === 0) {\n
\n @for (file of _value; track $index) {\n \n
\n @if (file) {\n
\n
\n
\n
\n
\n {{ file.name }} \n \n @if (file.tags?.length) {\n
\n }\n
\n
\n {{ file.createdAt | proDateTime }}\n @if (file.createdBy) {\n {{ 'uploaded_by' | translate }} {{ file.createdBy.name || file.createdBy }}\n }\n
\n @if (file.accessibleTimes || file.accessibleUntil) {\n
\n @if (file.accessibleTimes) {\n {{ 'available_for' | translate }} {{ file.accessibleTimes }} {{ 'times' | translate }}\n }\n @if (file.accessibleTimes && file.accessibleUntil) {\n . \n }\n @if (file.accessibleUntil) {\n {{ 'available_until' | translate }} {{ file.accessibleUntil | proDateTime }}\n }\n
\n }\n
\n
\n @if (production) {\n
\n }\n \n @if (config?.identificationDocument) {\n
\n }\n @if (config?.copyLink) {\n
\n }\n @if (order && (order.previewFile?.id !== file.id)) {\n
\n }\n @if (systemOptions?.useFileRestriction && config?.useFileRestrictions && canEditFiles) {\n
\n }\n
\n @if (articleTest) {\n
\n }\n @if (onRemove.observers.length && !disabled || config?.modelWithin && !config?.noRemove || this.inArticleOperationsCanDeleteFiles) {\n
\n }\n
\n
\n }\n
\n }\n \n } @else {\n
\n }\n @if (uploadInstance.progress) {\n
\n \n }\n
\n `,\n styles: [`\n .FilesUploadOverlay {\n position: absolute;\n display: none;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(33, 150, 243, 0.2);\n border: 2px solid #448aff;\n z-index: 9;\n }\n\n .FilesUploadOverlay span {\n font-size: 7em;\n position:absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: white;\n text-align: center;\n text-anchor: middle;\n }\n\n .FilesManager-fileName {\n font-size: 16px;\n font-weight: 400;\n letter-spacing: 0.010em;\n line-height: 1.2em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin: 0.5em;\n }\n\n .FilesManager-uploadDate, .FilesManager-restrictions {\n font-size: 12px;\n font-weight: 500;\n letter-spacing: 0.010em;\n line-height: 1.6em;\n margin: 0 0.5em;\n color: rgba(0,0,0,0.4);\n }\n `]\n})\n\nexport class PromanFilesManagerComponent implements AfterViewInit, OnDestroy, OnInit, OnChanges {\n @Input() set value(files: PromanFile|PromanFile[]) {\n if (!isArray(files)) {\n this._value = [files];\n } else {\n this._value = files as PromanFile[];\n\n }\n }\n _value: PromanFile[];\n @Input() disabled: boolean = false;\n @Input() config: {\n label?: string;\n preventOverlay?: boolean;\n modelWithin?: boolean;\n data?: any;\n multiple?: boolean;\n noRemove?: boolean;\n copyLink?: boolean;\n useFileRestrictions?: boolean;\n resizeImageRatio?: number;\n resizeImage?: boolean;\n canAddFileRef?: boolean;\n identificationDocument?: boolean;\n } = {};\n @Input() order: Order;\n @Input() articleTest: ArticleTest;\n @Input() production: Production;\n @Output() onRemove: EventEmitter = new EventEmitter();\n @Output() onChange: EventEmitter = new EventEmitter();\n @ViewChild('element', { static: true }) element: ElementRef;\n\n uploaderConfig: any;\n uploadInstance: any = {};\n overlayElement: HTMLElement;\n overlayMoved: boolean;\n isPasteEnabled: boolean;\n canEditFiles: boolean;\n inArticleOperationsCanDeleteFiles: boolean;\n systemOptions: SystemOptions;\n\n constructor(\n private Uploader: UploaderService,\n private UiPrefs: UiPreferencesService,\n private Entity: Entity,\n private ImagePath: ImagePathService,\n private Dialog: PromanDialogService,\n private Toast: ToastService,\n private FilePreview: FilePreviewService,\n private QueryExpression: QueryExpressionService,\n private store: Store,\n public ACL: ACL,\n ) {\n this.isPasteEnabled = !this.UiPrefs.get(UI_CLIPBOARD_PASTE_TARGET);\n this.store.select(getSystemOptions).subscribe((value) => this.systemOptions = value);\n this.canEditFiles = this.ACL.check('file.edit');\n }\n\n ngOnInit() {\n if (!this._value) return;\n let inArticleOperations: boolean = false;\n if (this.config?.multiple === false && this._value) {\n if (!isArray(this._value)) {\n this._value = [this._value];\n }\n }\n this._value = (this._value as PromanFile[]).sort((a, b) => a.createdAt > b.createdAt ? 1 : (a.createdAt == b.createdAt ? 0 : -1));\n\n if (window.location.href.includes('/events') && window.location.href.includes('/operations')) {\n inArticleOperations = true;\n }\n // if (inArticleOperations) {\n // let articleId = window.location.href.split('/').at(2);\n // let operationId = window.location.href.split('/').at(4);\n // this.inArticleOperationsCanDeleteFiles = this.order.operations.find(operation => operation.articleOperation.article.id === parseInt(articleId)).articleOperation.operation.deleteOrderFiles\n // }\n\n if (!this.onChange.observers.length) return;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n\n if (this.config?.multiple === false && this._value) {\n if (!isArray(this._value)) {\n this._value = [this._value];\n }\n }\n\n }\n\n ngAfterViewInit() {\n\n let element = this.element.nativeElement;\n\n if (!document.querySelectorAll('.Upload') && document.querySelectorAll('.FilesManager').length === 1) {\n element = document.querySelector('body');\n document.body.appendChild(element.querySelector('.FilesUploadOverlay'));\n this.overlayMoved = true;\n\n }\n new window.Dragster(element);\n\n element.addEventListener('drop', this.handleDrop);\n element.addEventListener('dragenter', this.handleDragEnter);\n element.addEventListener('dragover', this.handleDragOver);\n element.addEventListener('dragster:enter', this.showOverlay);\n element.addEventListener('dragster:leave', this.hideOverlay);\n\n this.overlayElement = element.querySelector('.FilesUploadOverlay');\n this.uploaderConfig = { multiple: this.config.multiple };\n\n if (this.isPasteEnabled) document.addEventListener('paste', this.handlePaste);\n }\n\n ngOnDestroy() {\n const element = this.element.nativeElement;\n\n element.removeEventListener('drop', this.handleDrop);\n element.removeEventListener('dragenter', this.handleDragEnter);\n element.removeEventListener('dragover', this.handleDragOver);\n element.removeEventListener('dragster:enter', this.showOverlay);\n element.removeEventListener('dragster:leave', this.hideOverlay);\n\n if (this.isPasteEnabled) document.removeEventListener('paste', this.handlePaste);\n\n if (this.overlayMoved) {\n const overlayElement = document.querySelector('.FilesUploadOverlay');\n\n overlayElement?.parentNode?.removeChild(overlayElement);\n\n }\n }\n\n getProgress = (event: HttpProgressEvent) => event.loaded / event.total * 100;\n\n uploadProgressCallback = (event: HttpProgressEvent) => {\n this.uploadInstance.progress = this.getProgress(event);\n };\n\n handleDragEnter = (event: any) => { event.preventDefault(); this.showOverlay() };\n\n handleDragOver = (event: any) => {\n event.stopPropagation();\n event.preventDefault();\n\n return false;\n };\n\n handleDrop = (event: DragEvent) => {\n this.hideOverlay();\n event.stopPropagation();\n event.preventDefault();\n\n if (this.disabled) return;\n\n const files = event.dataTransfer.files;\n this.tryResizingUpload(files);\n\n };\n\n tryResizingUpload = (files: FileList) => {\n if (this.canResizeFile(files)) {\n this.Dialog.open(CropperDialogComponent,\n { file: files[0], aspectRatio: this.config.resizeImageRatio },\n { width: `${getScreenWidthPercent(80)}px`, disableClose: true })\n .then((result: File) => {\n this.uploadFiles([result]);\n });\n } else {\n this.uploadFiles(files)\n }\n };\n\n canResizeFile = (files: File[]|FileList) => {\n return this.config.resizeImage && files.length === 1 && files[0].type?.includes('image');\n };\n\n uploadFiles = (files: FileList|File[]) => {\n this.Uploader\n .init(this.uploadProgressCallback, this.config.data)\n .upload(files as unknown as File[], this.uploaderConfig)\n .then(this.handleUploadSuccess)\n .then(() => { this.uploadInstance.progress = null; })\n .catch(() => { this.uploadInstance.progress = null; });\n };\n\n showOverlay = () => { if (!this.disabled) this.overlayElement.style.setProperty('display', 'block'); };\n hideOverlay = () => this.overlayElement.style.setProperty('display', 'none');\n\n onDownload = (file: PromanFile) => {\n this.FilePreview.download(file);\n };\n onDownloadPdf = (file: PromanFile) => {\n this.FilePreview.downloadPdf(file);\n };\n\n showDialog = () => {\n this.Uploader\n .init(this.uploadProgressCallback, this.config.data)\n .show(this.uploaderConfig)\n .then(this.handleUploadSuccess)\n .then(() => { this.uploadInstance.progress = null; })\n .catch(() => { this.uploadInstance.progress = null; });\n };\n\n handleUploadSuccess = (files: PromanFile[]) => {\n\n // if (this.config.modelWithin) { // Unused?\n if (!this._value) this._value = [];\n for (const item of files) {\n (this._value as PromanFile[]).push(item);\n }\n // }\n // this.onChange.emit(this.config.modelWithin ? (this._value as PromanFile[]) : files);\n if (!this.config.multiple && (this._value as any).length === 1) {\n this.onChange.emit((this._value[0] as any));\n } else {\n this.onChange.emit((this._value as PromanFile[]))\n }\n };\n\n setPreviewFile = (file: any) => {\n this.Entity.get('order')\n .addAssociation({ id: this.order.id, previewFile: file.id })\n .then(() => this.order.previewFile = file);\n };\n\n toggleProductionFiles = (file: any, selected: boolean) => {\n const hiddenOrderFiles = this.production.hiddenOrderFiles || [];\n\n selected ? hiddenOrderFiles.splice(hiddenOrderFiles.indexOf(file.id), 1) : hiddenOrderFiles.push(file.id);\n\n return this.Entity\n .get('production')\n .update({ id: this.production.id, hiddenOrderFiles: hiddenOrderFiles.length ? hiddenOrderFiles : [null] });\n\n };\n\n handlePaste = (event: any) => {\n const files = event.clipboardData.files;\n this.tryResizingUpload(files);\n };\n\n handleRemove = (file: PromanFile, index: number) => {\n const removeCallback = () => {\n if (this.config.modelWithin) {\n this.onChange.emit((this._value as PromanFile[]).map((item) => {\n\n if (file.id === item.id) {\n item.id = item.id * -1; // removable id is negative\n\n }\n\n return item;\n }) );\n (this._value as PromanFile[]).splice(index, 1);\n\n } else {\n this.onRemove.emit({ file, index });\n\n }\n };\n\n this.Dialog.open(PromanSimpleConfirmDialogComponent, { question: 'remove_file' } )\n .then((result) => {\n if (result) {\n removeCallback();\n }\n });\n\n\n };\n\n copyFileUrl = (file: PromanFile) => {\n copyToClipboard(this.ImagePath.getFile(file, 'pdf'));\n this.Toast.pop('info', 'copied_to_clipboard', { value: 'URL' });\n };\n\n editFileName = (file: PromanFile, event: MouseEvent) => {\n event.preventDefault();\n this.Dialog.open(PromanFilesManagerEditNameDialogComponent, { file })\n .then((name: string) => {\n this.Entity.get('file')\n .update({ id: file.id, name });\n });\n };\n\n editFileRestrictions = (file: PromanFile) => {\n this.Dialog.open(PromanFilesManagerRestrictionsDialogComponent, { file })\n .then((response: { times: number, date: dateTime }) => {\n this.Entity.get('file').update({ id: file.id, accessibleTimes: response.times, accessibleUntil: response.date });\n });\n };\n\n addFileById = () => {\n this.Dialog.open(PromanFilesManagerEditNameDialogComponent, {}).then((id: number) => {\n this.Entity.get('file').get({ id: this.QueryExpression.eqStrict(id) })\n .then((file: PromanFile) => {\n if (file) {\n (this._value as PromanFile[]).push(file);\n this.onChange.emit([file]);\n }\n })\n .catch(() => {\n this.Toast.pop('error', 'error_adding_existing_file');\n });\n });\n };\n\n callOcr = (file: PromanFile) => {\n this.Entity.get('ocr').recognizeIndentificationDocument({ newId: file.newId });\n }\n}\n","import { Component, Input, Output, EventEmitter, OnInit, ChangeDetectorRef } from '@angular/core';\nimport { Entity } from '@proman/services/entity.service';\nimport { findByProperty, findById } from '@proman/utils';\nimport { ParametersOptionsService } from '@proman/services/parameters-options.service';\nimport { ToastService } from '@proman/services/toast.service';\nimport { Store } from '@ngrx/store';\nimport { getSystemOptions } from '@proman/store/system-options';\nimport { SystemOptions } from '@proman/interfaces/entity-interfaces';\n\n@Component({\n selector: 'pm-parameter-workgroup',\n template: `\n \n `\n})\nexport class ParameterWorkgroupComponent implements OnInit {\n @Input() config: any;\n @Input() value: any;\n @Input() disabled: any;\n @Output() onChange: EventEmitter = new EventEmitter();\n parameter: any;\n operationId: number;\n systemOptions: SystemOptions;\n\n constructor(\n private Entity: Entity,\n private store: Store,\n private ParametersOptions: ParametersOptionsService,\n private cd: ChangeDetectorRef,\n private Toast: ToastService,\n ) {\n this.store.select(getSystemOptions)\n .subscribe((value) => this.systemOptions = value);\n }\n\n ngOnInit() {\n if (this.config.isDefinition) {\n this.fooBoo(this.value);\n\n } else {\n\n if (!this.value || this.value === '-') {\n this.value = this.config.parameter?.parameter?.value;\n if (!this.value) {\n this.Toast.pop('error', this.config.parameter.parameter.name + 'parameter_error');\n return;\n }\n }\n\n this.booFoo();\n\n }\n\n }\n\n fooBoo(value: any) {\n let data: any;\n\n if (value) {\n\n try {\n data = JSON.parse(value);\n\n } catch (e) {\n data = {};\n\n }\n\n }\n\n this.Entity.get('operation').search().then((response: any) => {\n let value;\n\n if (data) {\n value = findById(response, { id: data.operationId });\n\n }\n\n this.parameter = { options: response, value };\n\n this.cd.markForCheck();\n });\n }\n\n handleChange($event: any) {\n let data;\n\n if (this.config.isDefinition) {\n data = { operationId: $event ? $event.id : null, workplaceId: null };\n\n } else {\n data = { operationId: this.operationId, workplaceId: $event && $event.id || null };\n\n }\n\n this.onChange.emit(JSON.stringify(data));\n }\n\n async booFoo() {\n let data = this.config;\n let parsedData: any;\n let params: any;\n let articleId: number;\n\n function aliasDisplay() {\n\n }\n\n function nameDisplay(workplace: any) {\n workplace.name = workplace.name;\n }\n\n function fullDisplay(workplace: any) {\n workplace.name = workplace.alias + ' ' + workplace.name;\n }\n\n function selectDisplayFn(value: any) {\n\n switch (value) {\n\n case 'name':\n return nameDisplay;\n\n case 'full':\n return fullDisplay;\n\n default:\n return aliasDisplay;\n }\n }\n\n if (!data) {\n return;\n }\n\n if (data.production && data.production.article) {\n articleId = data.production.article.id;\n\n } else if (data.article) {\n articleId = data.article.id;\n\n } else if (data.orderProposalProduct && data.orderProposalProduct.article) {\n articleId = data.orderProposalProduct.article.id;\n\n } else {\n articleId = null;\n\n }\n try {\n parsedData = JSON.parse(this.value);\n } catch (exception) {\n parsedData = {};\n }\n\n if (articleId && parsedData.operationId) {\n this.operationId = parsedData.operationId;\n params = { 'operation.id': this.operationId };\n params['article.id'] = articleId;\n } else return;\n\n await this.ParametersOptions\n .get({ entity: 'article_operation', entityParams: params })\n .then((response: any) => {\n if (!response) return;\n\n const articleOperationId = response.id;\n const systemOptions = this.systemOptions;\n let displayFn;\n\n this.ParametersOptions\n .search({ entity: 'article_operation_workplace', entityParams: { 'articleOperation.id' : articleOperationId, 'join': ['workplace', 'workplace.workgroup'], translate: true } })\n .then((data: any) => {\n const workplaces = data.map((articleOperationWorkplace: any) => articleOperationWorkplace.workplace);\n\n for (let iter = 0; iter < workplaces.length; iter++) {\n if (workplaces[iter].workgroup) workplaces[iter].workgroupName = workplaces[iter].workgroup.name;\n }\n\n displayFn = selectDisplayFn(systemOptions.workgroupParameterDisplay);\n\n workplaces.forEach(displayFn);\n\n this.parameter = {\n value: findByProperty(workplaces, 'id', parseInt(parsedData.workplaceId)),\n options: workplaces\n };\n\n this.cd.markForCheck();\n });\n });\n }\n}\n","export const FaIcons = [\n 'lock',\n 'unlock',\n 'cog',\n 'anchor',\n 'link',\n 'unlink',\n 'arrow-down',\n 'arrow-up',\n 'arrow-left',\n 'arrow-right',\n 'check',\n 'times',\n 'bars',\n 'bolt',\n 'bug',\n 'code',\n 'filter',\n 'flag',\n 'image',\n 'paper-plane',\n 'power-off',\n 'question',\n 'redo',\n 'undo',\n 'smile',\n 'play',\n 'stop',\n 'pause',\n 'tag',\n 'asterisk',\n 'arrows-h',\n 'alicorn',\n 'adjust',\n 'bell',\n 'chart-bar',\n 'clipboard',\n 'clock',\n 'ban'\n];\n","import { Component, Input, Output, EventEmitter, OnInit, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';\nimport { isDefined } from '@proman/utils';\nimport { FaIcons } from '../../core/icons';\n\n@Component({\n selector: 'pm-icon-select',\n template: `\n \n \n {{ (config.label || 'icon') | translate }}\n \n\n \n\n \n\n {{ 'no_value_selected' | translate }} \n\n
\n\n \n \n \n
\n\n \n `,\n styles: [`\n mat-expansion-panel.IconPicker { box-shadow: none; }\n\n .IconList {\n padding: 8px;\n }\n\n .IconList fa {\n padding: 4px;\n }\n\n `],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\n\nexport class IconSelectComponent implements OnInit {\n @Input() value: string;\n @Input() config: any = {};\n @Input() toggled: boolean = false;\n @Output() onChange: EventEmitter = new EventEmitter();\n\n icons: any = FaIcons;\n\n constructor(\n private cd: ChangeDetectorRef\n ) {\n\n }\n\n ngOnInit() {\n\n }\n\n toggle(value?: boolean) {\n this.toggled = isDefined(value) ? value : !this.toggled;\n\n this.cd.markForCheck();\n }\n\n selectIcon(icon: string) {\n this.value = icon;\n this.toggled = false;\n\n this.onChange.emit(icon);\n this.cd.markForCheck();\n }\n\n}\n","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\n\n@Component({\n selector: 'pm-account-category-type-btn',\n template: `\n \n \n \n `,\n styles: [`\n\n\n `]\n})\n\nexport class AccountCategoryTypeBtnComponent implements OnInit, OnChanges {\n @Input() value: string;\n @Input() disabled: boolean = false;\n @Input() config: { label?: string; newLineAfter?: boolean } = {};\n @Output() onChange: EventEmitter = new EventEmitter();\n label: string;\n theme: 'accent'|'warn'|'primary';\n\n ngOnInit(): void {\n this.setData();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.setData();\n }\n\n setData() {\n this.label = this.value || 'C';\n this.theme = (this.value) === 'C' ? 'warn' : ((this.value) === 'D') ? 'accent' : 'primary';\n }\n\n handleClick(event: MouseEvent) {\n this.value = this.value === 'D' ? 'C' : 'D';\n this.onChange.emit(this.value);\n\n this.setData();\n }\n\n}\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { AccountCategory } from \"@proman/interfaces/entity-interfaces\";\n\n@Component({\n selector: 'pm-accounting-panel',\n template: `\n \n \n `\n})\n\nexport class AccountingPanelComponent {\n @Input() value: any;\n @Input() disabled: boolean = false;\n @Input() config: { label1?: string; label2?: string; keyCat1?: string; keyCat2?: string; keyType1?: string; keyType2?: string; groupInput: true, required?: boolean } = { groupInput: true };\n @Output() onChange: EventEmitter = new EventEmitter();\n\n constructor() {}\n\n getOptionName = (option: AccountCategory) => `${option.keyName} - ${option.name}`;\n\n set = (property: string, value: any) => {\n this.value[property] = value;\n this.onChange.emit(this.value);\n }\n}\n","import { Component, Input, Output, EventEmitter, OnDestroy, SimpleChanges, OnInit, OnChanges } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\nimport { findById, flatten, getIndexByProperty, isDefined, mapId } from '@proman/utils';\nimport { Entity, EntityNameType } from '@proman/services/entity.service';\nimport { Dialog } from '../services/dialog.service';\nimport { DragulaService } from 'ng2-dragula';\nimport { ToastService } from '@proman/services/toast.service';\nimport { QueryExpressionService } from '@proman/services/query-expression.service';\nimport { PromanStateService } from '../services/proman-state.service';\nimport { Action } from '@proman/interfaces/object-interfaces';\nimport $ from 'jquery';\nimport { ACL } from '@proman/services/acl.service';\nimport { Parameter } from '@proman/interfaces/entity-interfaces';\nimport { InlineListService } from '@proman/inline-list/inline-list.service';\nimport { ParametersService } from '@proman/parameters/services/parameters.service';\nimport { Store } from '@ngrx/store';\nimport { getCurrUser } from '@proman/store/curr-user';\nimport {\n ParameterMaterialFilterSetupDialogComponent\n} from '@proman/shared-dialogs/dialogs/article-material-filter-setup-dialog.component';\nimport {\n ParameterMaterialCategoryFilterSetupDialogComponent\n} from '@proman/shared-dialogs/dialogs/article-material-category-filter-setup-dialog.component';\n\n@Component({\n selector: 'pm-parameters',\n template: `\n \n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n `\n})\n\nexport class ParametersComponent implements OnInit, OnChanges, OnDestroy {\n @Input() model: any;\n @Input() config: {\n entity?: EntityNameType;\n extraJoin?: string[];\n context?: string;\n modelKey?: string;\n removeEnabled?: boolean;\n isMove?: boolean;\n isMoveGroup?: boolean;\n isAdd?: boolean;\n isHyperlink?: boolean;\n positionData?: any;\n groupActions?: any[];\n article?: any;\n images?: boolean;\n hideFilter?: boolean;\n preventExpressionCheck?: boolean;\n updateFiltered?: boolean;\n createKey?: string;\n isVisibility?: boolean;\n autoCreated?: boolean;\n hideExpression?: boolean;\n disableExpression?: boolean;\n showId?: boolean;\n isEraser?: boolean;\n addCallback?: ((data: any) => Promise);\n fromArticlesTest?: boolean;\n isProductionParams?: boolean;\n };\n @Input() groupActions: Action[];\n @Input() disabled: any;\n @Input() evaluateParameters: boolean = true;\n @Input() timeStamp: number;\n @Input() form: UntypedFormGroup;\n @Output() onInit: EventEmitter = new EventEmitter();\n @Output() onUpdate: EventEmitter = new EventEmitter();\n @Output() addLayerCallback: EventEmitter = new EventEmitter();\n entityInstance: any;\n childEntityInstance: any;\n parameters: any = [];\n isLoaded: any;\n reloading: any;\n parametersConfig: any;\n dragulaId: any;\n subscriberDrag: any;\n subscriberDrop: any;\n dragParameter: any;\n parametersList: any;\n isMovable: any;\n parameterEntity: any;\n parametersConfigBind: any = {};\n isCustomer: boolean;\n\n constructor(\n public ACL: ACL,\n private Entity: Entity,\n private Dialog: Dialog,\n private Toast: ToastService,\n private InlineListService: InlineListService,\n private Dragula: DragulaService,\n private QueryExpression: QueryExpressionService,\n private Parameter: ParametersService,\n private PromanState: PromanStateService,\n private store: Store,\n ) {\n this.store.select(getCurrUser).subscribe((user) => {\n if (user) this.isCustomer = user.isCustomer\n })\n this.parameterEntity = this.Entity.get('parameter');\n this.dragulaId = 'parameters' + new Date().valueOf() + Math.random() * 11234; // randomize for multiple pmParameters like in orderCreateForm\n Dragula.createGroup(this.dragulaId, {\n moves: (el: any, source: any, handle: any) => {\n const element = $(handle);\n const isMove = (element: any) => element.hasClass('Parameters-moveHandle');\n this.isMovable = isMove(element) || isMove(element.parent()) || isMove(element.parent().parent());\n return this.isMovable;\n },\n\n invalid: (el: any, handle: any) => {\n const element = $(handle);\n const isGroupParameter = (element: any) => element.hasClass('List-row');\n return isGroupParameter(element) || isGroupParameter(element.parent()) || isGroupParameter(element.parent().parent());\n },\n });\n\n this.subscriberDrag = Dragula.drag(this.dragulaId).subscribe(({ name, el, source }) => {\n if (this.isMovable) {\n const index = [].slice.call(el.parentElement.children).indexOf(el);\n this.dragParameter = Object.assign({}, this.parameters[index]);\n }\n\n });\n\n this.subscriberDrop = Dragula.drop(this.dragulaId).subscribe(({ name, el, source }) => {\n if (this.isMovable) {\n const index = [].slice.call(el.parentElement.children).indexOf(el);\n const swapParameter = this.parameters[index];\n this.setPosition(this.dragParameter, swapParameter);\n this.dragParameter = null;\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n\n if (changes.timeStamp && !changes.timeStamp.isFirstChange() && changes.timeStamp.currentValue !== changes.timeStamp.previousValue) {\n this.init();\n }\n\n if (changes.model && changes.model.currentValue && !changes.model.isFirstChange()) {\n this.init();\n }\n\n }\n\n ngOnDestroy() {\n this.Dragula.destroy(this.dragulaId);\n this.subscriberDrag.unsubscribe();\n this.subscriberDrop.unsubscribe();\n }\n\n aggregateGroupParameters(parameters: any, currParam: any, offset: any) {\n const aggregated = {\n id: currParam.id,\n type: 'parameter_group',\n parameter: currParam.parameter,\n parameters: [currParam],\n isVisible: currParam.isVisible\n };\n let parameter;\n let iter;\n\n for (iter = offset + 1; iter < parameters.length; iter++) {\n parameter = parameters[iter];\n\n if (parameter.parameter.type === 'parameter_group' && currParam.parameter.id === parameter.parameter.id) {\n aggregated.parameters.push(parameter);\n\n }\n\n }\n\n return aggregated;\n }\n\n handleParameters(items: any) {\n const parameters = [];\n const tmpIds = [];\n\n // join group parameters\n for (let iter = 0, count = items?.length; iter < count; iter++) {\n const item = items[iter];\n\n if (isDefined(item.forEachBooking)) item._isForEachOperation = true;\n\n if (tmpIds.indexOf(item.parameter.id) === -1 && item.parameter.type === 'parameter_group') {\n const boo = this.aggregateGroupParameters(items, item, iter);\n\n tmpIds.push(item.parameter.id);\n parameters.push(boo);\n\n } else if (item.parameter.type !== 'parameter_group') {\n parameters.push(item);\n }\n }\n\n return parameters;\n }\n\n init = () => {\n let params;\n if (this.config.fromArticlesTest) {\n params = {\n join: ['parameter', 'children', 'articleTestParameter', 'children.parameter'],\n sort: { 'articleTestParameter.position': 'asc' }\n };\n } else if (this.config.isProductionParams) {\n params = {\n join: ['parameter', 'children', 'articleProductionParameter', 'children.parameter'],\n sort: { 'position': 'asc' }\n };\n } else {\n params = {\n join: ['parameter', 'children', 'children.parameter'],\n sort: { position: 'asc' },\n translate: true\n }\n }\n\n if (this.config.extraJoin) {\n const extraJoin = this.config.extraJoin;\n\n for (const join of extraJoin) {\n params.join.push(join);\n\n }\n\n }\n params.join.push('parameterFunction')\n\n this.parametersConfig = {\n addLayer: this.addLayer,\n removeLayer: this.removeLayer,\n update: this.update,\n updateChild: this.updateChild,\n setPosition: this.setPosition,\n isMove: this.config.isMove || this.config.isMoveGroup,\n groupActions: this.groupActions,\n article: this.config.article,\n modelKey: this.config.modelKey,\n images: this.config.images,\n hideFilter: this.config.hideFilter,\n showId: this.config.showId\n };\n\n this.parametersConfig[this.config.modelKey] = this.model;\n\n params[this.config.modelKey + '.id'] = this.model.id;\n\n return this.entityInstance\n .search(params)\n .then((response: any) => {\n this.parameters = this.handleParameters(response);\n this.setParametersConfig();\n\n this.setVisibleParameters(this.parameters);\n\n this.setModelParams();\n\n this.getParametersList();\n this.isLoaded = true;\n this.reloading = false;\n this.onInit.emit();\n\n });\n };\n\n createParameter(data: any, key: any) {\n data[key] = this.model.id;\n\n this.entityInstance.create(data).then(this.init);\n }\n\n createListParameter(data: any, key: any) {\n let defaultValues = '';\n\n data[key] = this.model.id;\n\n this.entityInstance\n .create(data)\n .then((response: any) => {\n this.Entity.get('parameter_dropdown_option')\n .search({ 'parameter.id': data.parameter, 'translate': true })\n .then((values: any) => {\n\n if (values.length) {\n defaultValues = '[\"' + flatten(values, 'name').join('\",\"') + '\"]';\n\n this\n .update(defaultValues, { id: response.data })\n .then(this.init);\n\n } else {\n this.init();\n\n }\n\n });\n });\n }\n\n handleUpdate = () => {\n this.onUpdate.emit();\n this.setModelParams();\n if (!this.config.preventExpressionCheck) this.checkExpressions();\n\n if (this.config.updateFiltered && this.parameters.some((p: any) => !!p.filter)) this.updateFiltered();\n };\n\n ngOnInit() {\n this.entityInstance = this.Entity.get(this.config.entity);\n this.childEntityInstance = this.Entity.get(this.config.entity.replace('parameter', 'child_parameter') as EntityNameType);\n\n this.init();\n }\n\n addLayer = ($event: any, parameter: any, parameters: any) => {\n\n if (this.addLayerCallback.observers.length) {\n this.addLayerCallback.emit({ $event, parameter, parameters });\n } else {\n const params = { parameter: parameter.parameter.id };\n\n params[this.config.modelKey] = this.model.id;\n this.Dialog.entityCreate(this.config.entity, params).then(() => this.init());\n }\n\n };\n\n removeLayer = (layer: any) => {\n let ids;\n let promise;\n\n if (layer.type === 'parameter_group') {\n ids = flatten(layer.parameters, 'id');\n\n promise = this.entityInstance.remove({ id: ids });\n\n } else {\n promise = this.entityInstance.remove({ id: layer.id });\n\n }\n\n promise.then(() => this.init());\n };\n\n getWorkgroupParameters(parameters: any) {\n const output: any = [];\n\n parameters.forEach((item: any) => {\n\n item.children.forEach((parameter: any) => {\n\n if (parameter.parameter.type === this.parameterEntity.WORKGROUP) {\n output.push(parameter);\n\n }\n\n });\n });\n\n return output;\n }\n\n setPosition = (parameter: any, swapParameter: any) => {\n const position = getIndexByProperty(this.parametersList, 'id', swapParameter.id);\n\n if (typeof position === 'undefined') return;\n\n this.reloading = true;\n\n const data = Object.assign(this.config.positionData || {}, { positionId: parameter.id, positionAt: position });\n\n this.entityInstance.reposition(data).then(this.init);\n\n };\n\n setProperty = (parameter: any, property: string, value: any) => {\n this.entityInstance\n .update({ id: parameter.id, [property]: value })\n .then(() => {\n parameter[property] = value;\n this.init();\n });\n };\n\n updateChild = (parameter: any, value: any, parameters: any) => {\n this.childEntityInstance.update({ id: parameter.id, value, evaluateParameters: this.evaluateParameters })\n .then(() => {\n if (!this.evaluateParameters) return;\n let allWorkgroupParameters: any;\n let allEmpty = true;\n let ids;\n\n // If we edit one workplace in the group and all others are empty, set same workplace value for all empty ones\n if (parameter.parameter.type === this.parameterEntity.WORKGROUP) {\n\n allWorkgroupParameters = this.getWorkgroupParameters(parameters)\n .filter((workgroupParameter: any) => workgroupParameter.id !== parameter.id);\n\n for (const item of allWorkgroupParameters) {\n\n if (this.Parameter.empty(item)) continue;\n\n allEmpty = false;\n break;\n }\n\n if (allEmpty && allWorkgroupParameters.length > 0) {\n ids = allWorkgroupParameters.map(mapId);\n\n return this.childEntityInstance.update({ id: ids, value })\n .then(() => allWorkgroupParameters.forEach((parameter: any) => parameter.value = value));\n }\n }\n }).then(() => {\n if (this.evaluateParameters) {\n this.handleUpdate();\n this.init();\n }\n });\n };\n\n update(value: any, parameter: any, rerender: boolean = false) {\n return this.entityInstance.update({ id: parameter.id, value, evaluateParameters: this.evaluateParameters })\n .then(() => {\n parameter.value = value;\n\n if (rerender) {\n parameter._isRerendering = true;\n setTimeout(() => parameter._isRerendering = false);\n }\n\n this.handleUpdate();\n });\n }\n\n updateExpression(parameter: any, value: any) {\n if (value?.id) {\n this.entityInstance.update({ id: parameter.id, 'ParameterFunction': value.id, 'expression': 'null' });\n parameter.parameterFunction = value;\n parameter.expression = null;\n } else {\n this.entityInstance.update({ id: parameter.id, 'ParameterFunction': 'null', 'expression': value });\n parameter.parameterFunction = null;\n parameter.expression = value;\n }\n }\n\n async add($event: MouseEvent) {\n const context = this.config.context;\n const data = { context: this.QueryExpression.eqStrict(context) };\n let singularParameterPresent: boolean = false;\n\n if (this.config.context === 'production' && this.config.article?.id) {\n const ids = await this.Entity.get('article')\n .get({\n id: this.config.article?.id || '',\n join: [\n 'productionParameters',\n 'productionParameters.parameter',\n ], })\n .then((response) => {\n return response.productionParameters.length ? response.productionParameters.map((pp) => pp.parameter.id) : []\n });\n\n data['id'] = this.QueryExpression.in(ids);\n }\n\n this.parameterEntity.search(data).then((response: Parameter[]) => {\n this.InlineListService.show({\n data: response.map((param) => ({ ...param, name: `#${param.id} - ${param.name}` })),\n event: $event,\n closeOnSelect: true,\n onSelect: (parameter: Parameter) => {\n const data: { parameter?: number } = { parameter: parameter.id };\n const key = this.config.createKey ? this.config.createKey : this.config.modelKey;\n let tmpVal: any;\n let i = 0;\n\n while (!singularParameterPresent && i < this.parameters.length - 1) {\n if (this.parameters[i]?.parameter?.id === parameter.id && !parameter.multiple) {\n singularParameterPresent = true;\n this.Toast.pop('error', 'Parameter already present and is not multiple usage.')\n }\n i++;\n }\n\n if (!singularParameterPresent) {\n if (this.config.addCallback) {\n this.config.addCallback(parameter)\n .then(this.init);\n } else if (parameter.type === this.parameterEntity.PARAMETER_GROUP) {\n data[key] = this.model.id;\n\n this.Dialog\n .entityCreate(this.config.entity, data, {\n mainField: {\n key: 'name',\n name: 'name',\n config: {required: true}\n }\n })\n .then(this.init);\n\n } else {\n\n if (parameter.type === 'workgroup' && context === 'production') {\n tmpVal = JSON.parse(parameter.value);\n\n if (tmpVal === null || tmpVal.operationId === null) {\n // Require parameter default value to be assigned\n this.Toast.pop('warning', 'parameter_has_no_default_value', {parameter: parameter.name});\n\n } else {\n // Require parameter operation to be assigned for article\n this.Entity.get('article_operation')\n .get({\n 'article.id': this.model.id,\n 'operation.id': tmpVal.operationId\n })\n .then(\n () => this.createParameter(data, key),\n () => this.Entity.get('operation').get({id: tmpVal.operationId})\n .then((response: any) => this.Toast.pop('error', 'article_has_no_operation', {operation: response.name}))\n );\n }\n\n } else if (parameter.type === 'list') {\n this.createListParameter(data, key);\n\n } else {\n this.createParameter(data, key);\n\n }\n\n }\n }\n }\n });\n });\n }\n\n getParameterConfig(parameter: any) {\n const _parameter = parameter.parameter || parameter;\n\n return Object.assign({}, this.parametersConfig, { required: _parameter.required })\n }\n\n getParametersList() {\n const result: any = [];\n\n this.parameters.forEach((item: any) => {\n\n if (item.type === 'parameter_group') {\n item.parameters.forEach((parameter: any) => result.push(parameter));\n\n } else {\n result.push(item);\n\n }\n });\n\n this.parametersList = result;\n }\n\n handleLock = (parameter: any) => {\n const value = !parameter.isLocked;\n\n this.Entity.get(this.config.entity)\n .update({ id: parameter.id, isLocked: value })\n .then(() => parameter.isLocked = value);\n\n };\n\n handleForEachBooking = (parameter: any) => {\n const value = !parameter.forEachBooking;\n\n this.Entity.get('article_operation_parameter')\n .update({ id: parameter.id, forEachBooking: value })\n .then(() => parameter.forEachBooking = value);\n\n };\n\n setModelParams = () => {\n this.model._parameters = this.parameters;\n };\n\n setupMaterialFilter = (parameter: any, type: string) => {\n let promise;\n if (type === 'material') {\n promise = this.Dialog\n .open2(ParameterMaterialFilterSetupDialogComponent, { material: parameter }, { width: '450px' });\n } else {\n promise = this.Dialog\n .open2(ParameterMaterialCategoryFilterSetupDialogComponent, { materialCategory: parameter }, { width: '450px' });\n }\n\n promise.afterClosed()\n .subscribe((result) => {\n if (!result) return;\n\n const stringResult = JSON.stringify(result);\n\n this.entityInstance\n .update({ id: parameter.id, filter: stringResult })\n .then(() => parameter.filter = stringResult);\n });\n };\n\n setVisibleParameters = (parameters: any[]) => {\n parameters.forEach((p: any) => {\n p._isVisible = this.config.isVisibility ? true : (!isDefined(p.isVisible) || isDefined(p.isVisible) && p.isVisible);\n });\n\n };\n\n goToParameter = (event: MouseEvent, parameter: any) => {\n const isNewTab = (event.ctrlKey || event.metaKey);\n\n this.PromanState.to('Parameter', parameter.parameter.id, parameter.parameter.deleted ? { deleted: true } : null, isNewTab);\n };\n\n checkExpressions = () => {\n this.parameters.forEach((parameter: any) => {\n if (parameter.expression) {\n this.entityInstance\n .get({ id: parameter.id })\n .then((response: any) => {\n parameter = Object.assign(parameter, response);\n\n parameter._isRerendering = true;\n setTimeout(() => parameter._isRerendering = false);\n });\n }\n });\n\n };\n\n updateFiltered = () => {\n const filtered = this.parameters.filter((p: any) => !!p.filter);\n const ids = filtered.map(mapId);\n this.entityInstance\n .search(Object.assign({ id: this.QueryExpression.in(ids) }))\n .then((response: any) => {\n response.forEach((p: any) => {\n const par = findById(this.parameters, p);\n\n if (par && par.value != p.value) {\n Object.assign(par, p);\n\n par._isRerendering = true;\n setTimeout(() => par._isRerendering = false);\n }\n });\n });\n\n };\n\n setParametersConfig() {\n this.parametersConfigBind = {};\n\n this.parameters.forEach((p: any) => {\n this.parametersConfigBind[p.id] = this.getParameterConfig(p);\n });\n }\n\n clearValue(parameter: any) {\n this.update(null, parameter, true);\n if (parameter.type === 'parameter_group') {\n parameter.parameters.forEach((parameterChild: any) => {\n this.update(null, parameterChild, true);\n parameterChild.value = null;\n parameterChild.children.forEach((parameterGrandchild: any) => {\n parameterGrandchild.value = null;\n this.childEntityInstance.update({ id: parameterGrandchild.id, value: null });\n })\n })\n }\n }\n}\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { CorporateNamespace, PublicSystemOptions } from '@proman/interfaces/entity-interfaces';\nimport { getNamespaces, getPublicSystemOptions } from '@proman/store/system-options';\nimport { Store } from '@ngrx/store';\nimport { CorporateNamespaceEntityInterface } from '@proman/resources/corporate_namespace';\nimport { Entity, EntityNameType } from '@proman/services/entity.service';\nimport { ACL } from '@proman/services/acl.service';\nimport { findById, findByProperty, isDefinedNotNull } from '@proman/utils';\nimport { filter } from 'rxjs/operators';\n\n@Component({\n selector: 'pm-corporate-panel',\n template: `\n @if (systemOptions.corporate && ACL.check('permission.edit')) {\n \n
{{ 'name_spaces' | translate }} \n @if (config.single) {\n @if (children) {\n
\n }\n } @else {\n
\n @for (namespace of children; track $index) {\n
\n @if (namespace.name !== systemOptions.namespace) {\n
\n }\n
\n }\n }\n
\n }\n `\n})\n\nexport class CorporatePanelComponent implements OnInit {\n @Input() entity: any;\n @Input() disabled: boolean = false;\n @Input() class: EntityNameType;\n @Input() config: {\n single?: boolean;\n singleKey?: string;\n selectedChildrenArray?: any,\n class?: EntityNameType,\n entity?: any,\n };\n @Output() onSingleChange: EventEmitter = new EventEmitter();\n @Output() onChange: EventEmitter = new EventEmitter();\n systemOptions: PublicSystemOptions;\n children: CorporateNamespace[];\n entityEntity: any;\n namespaceEntity: CorporateNamespaceEntityInterface;\n\n constructor(\n private Entity: Entity,\n private store: Store,\n public ACL: ACL\n ) {\n }\n\n ngOnInit() {\n this.store.select(getPublicSystemOptions).subscribe((value) => this.systemOptions = value);\n\n this.store.select(getNamespaces).pipe(filter((val) => !!val)).subscribe((value) => {\n this.children = value;\n if (this.config?.single) {\n this.entity = findByProperty(this.children, 'name', this.entity);\n }\n });\n\n this.namespaceEntity = this.Entity.get('corporate_namespace');\n\n // For corporate parameter component start\n if (this.config.class) this.class = this.config.class;\n if (this.config.entity) this.entity = this.config.entity;\n // For corporate parameter component end\n\n if (this.config.selectedChildrenArray) {\n this.children = this.config.selectedChildrenArray;\n this.setInitial();\n }\n this.entityEntity = this.class ? this.Entity.get(this.class) : null;\n if (!this.config.single) {\n this.loadEntity();\n } else {\n if (!this.config.singleKey) this.entity = findByProperty(this.children, 'name', this.entity);\n }\n }\n\n loadEntity() {\n if (isDefinedNotNull(this.entity.id)) this.entityEntity.get({ id: this.entity.id, join: ['namespaces'] }).then((value: any) => this.entity = value);\n }\n\n toggleConnect = (nameSpace: CorporateNamespace, entity: any, value: boolean) => {\n if (this.onChange.observers.length > 0) {\n if (value) this.onChange.emit([nameSpace]);\n if (!value) this.onChange.emit(nameSpace);\n } else {\n if (value) this.namespaceEntity.addAssociation({ id: nameSpace.id, [this.class]: entity.id });\n if (!value) this.namespaceEntity.removeAssociation({ id: nameSpace.id, [this.class]: entity.id });\n }\n };\n\n getValue = (namespace: CorporateNamespace) => {\n if (!isDefinedNotNull(this.entity)) return false;\n return this.entity.namespaces?.some((child: CorporateNamespace) => child.name === namespace.name);\n };\n\n setSingle = (value: CorporateNamespace) => {\n this.entity = value;\n if (this.config.singleKey) {\n this.onSingleChange.emit(value[this.config.singleKey]);\n } else {\n this.onSingleChange.emit(value);\n }\n };\n\n setInitial() {\n this.entity = findById(this.children, this.entity);\n }\n\n selectAllNamespace(entity: any, value: boolean) {\n this.children.forEach((namespace: CorporateNamespace) => this.toggleConnect(namespace, entity, value));\n setTimeout(() => {\n this.loadEntity();\n }, 1000);\n }\n}\n","import * as i0 from '@angular/core';\nimport { forwardRef, InjectionToken, EventEmitter, Directive, Output, Input, ViewChild, ContentChildren, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, Attribute, NgModule } from '@angular/core';\nimport * as i3 from '@angular/material/core';\nimport { mixinDisableRipple, mixinTabIndex, MatCommonModule, MatRippleModule } from '@angular/material/core';\nimport * as i1 from '@angular/cdk/a11y';\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport * as i2 from '@angular/cdk/collections';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\n// Increasing integer for generating unique ids for radio components.\nconst _c0 = [\"input\"];\nconst _c1 = [\"*\"];\nlet nextUniqueId = 0;\n/** Change event object emitted by radio button and radio group. */\nclass MatRadioChange {\n constructor( /** The radio button that emits the change event. */\n source, /** The value of the radio button. */\n value) {\n this.source = source;\n this.value = value;\n }\n}\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nconst MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: /*#__PURE__*/forwardRef(() => MatRadioGroup),\n multi: true\n};\n/**\n * Injection token that can be used to inject instances of `MatRadioGroup`. It serves as\n * alternative token to the actual `MatRadioGroup` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nconst MAT_RADIO_GROUP = /*#__PURE__*/new InjectionToken('MatRadioGroup');\nconst MAT_RADIO_DEFAULT_OPTIONS = /*#__PURE__*/new InjectionToken('mat-radio-default-options', {\n providedIn: 'root',\n factory: MAT_RADIO_DEFAULT_OPTIONS_FACTORY\n});\nfunction MAT_RADIO_DEFAULT_OPTIONS_FACTORY() {\n return {\n color: 'accent'\n };\n}\n/**\n * Base class with all of the `MatRadioGroup` functionality.\n * @docs-private\n */\nlet _MatRadioGroupBase = /*#__PURE__*/(() => {\n class _MatRadioGroupBase {\n /** Name of the radio button group. All radio buttons inside this group will use this name. */\n get name() {\n return this._name;\n }\n set name(value) {\n this._name = value;\n this._updateRadioButtonNames();\n }\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n get labelPosition() {\n return this._labelPosition;\n }\n set labelPosition(v) {\n this._labelPosition = v === 'before' ? 'before' : 'after';\n this._markRadiosForCheck();\n }\n /**\n * Value for the radio-group. Should equal the value of the selected radio button if there is\n * a corresponding radio button with a matching value. If there is not such a corresponding\n * radio button, this value persists to be applied in case a new radio button is added with a\n * matching value.\n */\n get value() {\n return this._value;\n }\n set value(newValue) {\n if (this._value !== newValue) {\n // Set this before proceeding to ensure no circular loop occurs with selection.\n this._value = newValue;\n this._updateSelectedRadioFromValue();\n this._checkSelectedRadioButton();\n }\n }\n _checkSelectedRadioButton() {\n if (this._selected && !this._selected.checked) {\n this._selected.checked = true;\n }\n }\n /**\n * The currently selected radio button. If set to a new radio button, the radio group value\n * will be updated to match the new selected button.\n */\n get selected() {\n return this._selected;\n }\n set selected(selected) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n this._checkSelectedRadioButton();\n }\n /** Whether the radio group is disabled */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n /** Whether the radio group is required */\n get required() {\n return this._required;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n constructor(_changeDetector) {\n this._changeDetector = _changeDetector;\n /** Selected value for the radio group. */\n this._value = null;\n /** The HTML name attribute applied to radio buttons in this group. */\n this._name = `mat-radio-group-${nextUniqueId++}`;\n /** The currently selected radio button. Should match value. */\n this._selected = null;\n /** Whether the `value` has been set to its initial value. */\n this._isInitialized = false;\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n this._labelPosition = 'after';\n /** Whether the radio group is disabled. */\n this._disabled = false;\n /** Whether the radio group is required. */\n this._required = false;\n /** The method to be called in order to update ngModel */\n this._controlValueAccessorChangeFn = () => {};\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n this.onTouched = () => {};\n /**\n * Event emitted when the group value changes.\n * Change events are only emitted when the value changes due to user interaction with\n * a radio button (the same behavior as ` `).\n */\n this.change = new EventEmitter();\n }\n /**\n * Initialize properties once content children are available.\n * This allows us to propagate relevant attributes to associated buttons.\n */\n ngAfterContentInit() {\n // Mark this component as initialized in AfterContentInit because the initial value can\n // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n // NgModel occurs *after* the OnInit of the MatRadioGroup.\n this._isInitialized = true;\n }\n /**\n * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n * radio buttons upon their blur.\n */\n _touch() {\n if (this.onTouched) {\n this.onTouched();\n }\n }\n _updateRadioButtonNames() {\n if (this._radios) {\n this._radios.forEach(radio => {\n radio.name = this.name;\n radio._markForCheck();\n });\n }\n }\n /** Updates the `selected` radio button from the internal _value state. */\n _updateSelectedRadioFromValue() {\n // If the value already matches the selected radio, do nothing.\n const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n if (this._radios && !isAlreadySelected) {\n this._selected = null;\n this._radios.forEach(radio => {\n radio.checked = this.value === radio.value;\n if (radio.checked) {\n this._selected = radio;\n }\n });\n }\n }\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent() {\n if (this._isInitialized) {\n this.change.emit(new MatRadioChange(this._selected, this._value));\n }\n }\n _markRadiosForCheck() {\n if (this._radios) {\n this._radios.forEach(radio => radio._markForCheck());\n }\n }\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn) {\n this._controlValueAccessorChangeFn = fn;\n }\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n this._changeDetector.markForCheck();\n }\n static {\n this.ɵfac = function _MatRadioGroupBase_Factory(t) {\n return new (t || _MatRadioGroupBase)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: _MatRadioGroupBase,\n inputs: {\n color: \"color\",\n name: \"name\",\n labelPosition: \"labelPosition\",\n value: \"value\",\n selected: \"selected\",\n disabled: \"disabled\",\n required: \"required\"\n },\n outputs: {\n change: \"change\"\n }\n });\n }\n }\n return _MatRadioGroupBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n// Boilerplate for applying mixins to MatRadioButton.\n/** @docs-private */\nclass MatRadioButtonBase {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}\nconst _MatRadioButtonMixinBase = /*#__PURE__*/mixinDisableRipple( /*#__PURE__*/mixinTabIndex(MatRadioButtonBase));\n/**\n * Base class with all of the `MatRadioButton` functionality.\n * @docs-private\n */\nlet _MatRadioButtonBase = /*#__PURE__*/(() => {\n class _MatRadioButtonBase extends _MatRadioButtonMixinBase {\n /** Whether this radio button is checked. */\n get checked() {\n return this._checked;\n }\n set checked(value) {\n const newCheckedState = coerceBooleanProperty(value);\n if (this._checked !== newCheckedState) {\n this._checked = newCheckedState;\n if (newCheckedState && this.radioGroup && this.radioGroup.value !== this.value) {\n this.radioGroup.selected = this;\n } else if (!newCheckedState && this.radioGroup && this.radioGroup.value === this.value) {\n // When unchecking the selected radio button, update the selected radio\n // property on the group.\n this.radioGroup.selected = null;\n }\n if (newCheckedState) {\n // Notify all radio buttons with the same name to un-check.\n this._radioDispatcher.notify(this.id, this.name);\n }\n this._changeDetector.markForCheck();\n }\n }\n /** The value of this radio button. */\n get value() {\n return this._value;\n }\n set value(value) {\n if (this._value !== value) {\n this._value = value;\n if (this.radioGroup !== null) {\n if (!this.checked) {\n // Update checked when the value changed to match the radio group's value\n this.checked = this.radioGroup.value === value;\n }\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n }\n }\n }\n /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n get labelPosition() {\n return this._labelPosition || this.radioGroup && this.radioGroup.labelPosition || 'after';\n }\n set labelPosition(value) {\n this._labelPosition = value;\n }\n /** Whether the radio button is disabled. */\n get disabled() {\n return this._disabled || this.radioGroup !== null && this.radioGroup.disabled;\n }\n set disabled(value) {\n this._setDisabled(coerceBooleanProperty(value));\n }\n /** Whether the radio button is required. */\n get required() {\n return this._required || this.radioGroup && this.radioGroup.required;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n }\n /** Theme color of the radio button. */\n get color() {\n // As per Material design specifications the selection control radio should use the accent color\n // palette by default. https://material.io/guidelines/components/selection-controls.html\n return this._color || this.radioGroup && this.radioGroup.color || this._providerOverride && this._providerOverride.color || 'accent';\n }\n set color(newValue) {\n this._color = newValue;\n }\n /** ID of the native input element inside `` */\n get inputId() {\n return `${this.id || this._uniqueId}-input`;\n }\n constructor(radioGroup, elementRef, _changeDetector, _focusMonitor, _radioDispatcher, animationMode, _providerOverride, tabIndex) {\n super(elementRef);\n this._changeDetector = _changeDetector;\n this._focusMonitor = _focusMonitor;\n this._radioDispatcher = _radioDispatcher;\n this._providerOverride = _providerOverride;\n this._uniqueId = `mat-radio-${++nextUniqueId}`;\n /** The unique ID for the radio button. */\n this.id = this._uniqueId;\n /**\n * Event emitted when the checked state of this radio button changes.\n * Change events are only emitted when the value changes due to user interaction with\n * the radio button (the same behavior as ` `).\n */\n this.change = new EventEmitter();\n /** Whether this radio is checked. */\n this._checked = false;\n /** Value assigned to this radio. */\n this._value = null;\n /** Unregister function for _radioDispatcher */\n this._removeUniqueSelectionListener = () => {};\n // Assertions. Ideally these should be stripped out by the compiler.\n // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n this.radioGroup = radioGroup;\n this._noopAnimations = animationMode === 'NoopAnimations';\n if (tabIndex) {\n this.tabIndex = coerceNumberProperty(tabIndex, 0);\n }\n }\n /** Focuses the radio button. */\n focus(options, origin) {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n } else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n /**\n * Marks the radio button as needing checking for change detection.\n * This method is exposed because the parent radio group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }\n ngOnInit() {\n if (this.radioGroup) {\n // If the radio is inside a radio group, determine if it should be checked\n this.checked = this.radioGroup.value === this._value;\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n // Copy name from parent radio group\n this.name = this.radioGroup.name;\n }\n this._removeUniqueSelectionListener = this._radioDispatcher.listen((id, name) => {\n if (id !== this.id && name === this.name) {\n this.checked = false;\n }\n });\n }\n ngDoCheck() {\n this._updateTabIndex();\n }\n ngAfterViewInit() {\n this._updateTabIndex();\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin && this.radioGroup) {\n this.radioGroup._touch();\n }\n });\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._removeUniqueSelectionListener();\n }\n /** Dispatch change event with current value. */\n _emitChangeEvent() {\n this.change.emit(new MatRadioChange(this, this._value));\n }\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n _onInputClick(event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `radio-button` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n }\n /** Triggered when the radio button receives an interaction from the user. */\n _onInputInteraction(event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n if (!this.checked && !this.disabled) {\n const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n this.checked = true;\n this._emitChangeEvent();\n if (this.radioGroup) {\n this.radioGroup._controlValueAccessorChangeFn(this.value);\n if (groupValueChanged) {\n this.radioGroup._emitChangeEvent();\n }\n }\n }\n }\n /** Triggered when the user clicks on the touch target. */\n _onTouchTargetClick(event) {\n this._onInputInteraction(event);\n if (!this.disabled) {\n // Normally the input should be focused already, but if the click\n // comes from the touch target, then we might have to focus it ourselves.\n this._inputElement.nativeElement.focus();\n }\n }\n /** Sets the disabled state and marks for check if a change occurred. */\n _setDisabled(value) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._changeDetector.markForCheck();\n }\n }\n /** Gets the tabindex for the underlying input element. */\n _updateTabIndex() {\n const group = this.radioGroup;\n let value;\n // Implement a roving tabindex if the button is inside a group. For most cases this isn't\n // necessary, because the browser handles the tab order for inputs inside a group automatically,\n // but we need an explicitly higher tabindex for the selected button in order for things like\n // the focus trap to pick it up correctly.\n if (!group || !group.selected || this.disabled) {\n value = this.tabIndex;\n } else {\n value = group.selected === this ? this.tabIndex : -1;\n }\n if (value !== this._previousTabIndex) {\n // We have to set the tabindex directly on the DOM node, because it depends on\n // the selected state which is prone to \"changed after checked errors\".\n const input = this._inputElement?.nativeElement;\n if (input) {\n input.setAttribute('tabindex', value + '');\n this._previousTabIndex = value;\n }\n }\n }\n static {\n this.ɵfac = function _MatRadioButtonBase_Factory(t) {\n i0.ɵɵinvalidFactory();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: _MatRadioButtonBase,\n viewQuery: function _MatRadioButtonBase_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._inputElement = _t.first);\n }\n },\n inputs: {\n id: \"id\",\n name: \"name\",\n ariaLabel: [\"aria-label\", \"ariaLabel\"],\n ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"],\n ariaDescribedby: [\"aria-describedby\", \"ariaDescribedby\"],\n checked: \"checked\",\n value: \"value\",\n labelPosition: \"labelPosition\",\n disabled: \"disabled\",\n required: \"required\",\n color: \"color\"\n },\n outputs: {\n change: \"change\"\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return _MatRadioButtonBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * A group of radio buttons. May contain one or more `` elements.\n */\nlet MatRadioGroup = /*#__PURE__*/(() => {\n class MatRadioGroup extends _MatRadioGroupBase {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatRadioGroup_BaseFactory;\n return function MatRadioGroup_Factory(t) {\n return (ɵMatRadioGroup_BaseFactory || (ɵMatRadioGroup_BaseFactory = i0.ɵɵgetInheritedFactory(MatRadioGroup)))(t || MatRadioGroup);\n };\n })();\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatRadioGroup,\n selectors: [[\"mat-radio-group\"]],\n contentQueries: function MatRadioGroup_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatRadioButton, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._radios = _t);\n }\n },\n hostAttrs: [\"role\", \"radiogroup\", 1, \"mat-mdc-radio-group\"],\n exportAs: [\"matRadioGroup\"],\n features: [i0.ɵɵProvidersFeature([MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, {\n provide: MAT_RADIO_GROUP,\n useExisting: MatRadioGroup\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatRadioGroup;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatRadioButton = /*#__PURE__*/(() => {\n class MatRadioButton extends _MatRadioButtonBase {\n constructor(radioGroup, elementRef, _changeDetector, _focusMonitor, _radioDispatcher, animationMode, _providerOverride, tabIndex) {\n super(radioGroup, elementRef, _changeDetector, _focusMonitor, _radioDispatcher, animationMode, _providerOverride, tabIndex);\n }\n static {\n this.ɵfac = function MatRadioButton_Factory(t) {\n return new (t || MatRadioButton)(i0.ɵɵdirectiveInject(MAT_RADIO_GROUP, 8), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.FocusMonitor), i0.ɵɵdirectiveInject(i2.UniqueSelectionDispatcher), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8), i0.ɵɵdirectiveInject(MAT_RADIO_DEFAULT_OPTIONS, 8), i0.ɵɵinjectAttribute('tabindex'));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatRadioButton,\n selectors: [[\"mat-radio-button\"]],\n hostAttrs: [1, \"mat-mdc-radio-button\"],\n hostVars: 15,\n hostBindings: function MatRadioButton_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"focus\", function MatRadioButton_focus_HostBindingHandler() {\n return ctx._inputElement.nativeElement.focus();\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"id\", ctx.id)(\"tabindex\", null)(\"aria-label\", null)(\"aria-labelledby\", null)(\"aria-describedby\", null);\n i0.ɵɵclassProp(\"mat-primary\", ctx.color === \"primary\")(\"mat-accent\", ctx.color === \"accent\")(\"mat-warn\", ctx.color === \"warn\")(\"mat-mdc-radio-checked\", ctx.checked)(\"_mat-animation-noopable\", ctx._noopAnimations);\n }\n },\n inputs: {\n disableRipple: \"disableRipple\",\n tabIndex: \"tabIndex\"\n },\n exportAs: [\"matRadioButton\"],\n features: [i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c1,\n decls: 13,\n vars: 17,\n consts: [[1, \"mdc-form-field\"], [\"formField\", \"\"], [1, \"mdc-radio\"], [1, \"mat-mdc-radio-touch-target\", 3, \"click\"], [\"type\", \"radio\", 1, \"mdc-radio__native-control\", 3, \"id\", \"checked\", \"disabled\", \"required\", \"change\"], [\"input\", \"\"], [1, \"mdc-radio__background\"], [1, \"mdc-radio__outer-circle\"], [1, \"mdc-radio__inner-circle\"], [\"mat-ripple\", \"\", 1, \"mat-radio-ripple\", \"mat-mdc-focus-indicator\", 3, \"matRippleTrigger\", \"matRippleDisabled\", \"matRippleCentered\"], [1, \"mat-ripple-element\", \"mat-radio-persistent-ripple\"], [1, \"mdc-label\", 3, \"for\"]],\n template: function MatRadioButton_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"div\", 0, 1)(2, \"div\", 2)(3, \"div\", 3);\n i0.ɵɵlistener(\"click\", function MatRadioButton_Template_div_click_3_listener($event) {\n return ctx._onTouchTargetClick($event);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"input\", 4, 5);\n i0.ɵɵlistener(\"change\", function MatRadioButton_Template_input_change_4_listener($event) {\n return ctx._onInputInteraction($event);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(6, \"div\", 6);\n i0.ɵɵelement(7, \"div\", 7)(8, \"div\", 8);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(9, \"div\", 9);\n i0.ɵɵelement(10, \"div\", 10);\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(11, \"label\", 11);\n i0.ɵɵprojection(12);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const _r0 = i0.ɵɵreference(1);\n i0.ɵɵclassProp(\"mdc-form-field--align-end\", ctx.labelPosition == \"before\");\n i0.ɵɵadvance(2);\n i0.ɵɵclassProp(\"mdc-radio--disabled\", ctx.disabled);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"id\", ctx.inputId)(\"checked\", ctx.checked)(\"disabled\", ctx.disabled)(\"required\", ctx.required);\n i0.ɵɵattribute(\"name\", ctx.name)(\"value\", ctx.value)(\"aria-label\", ctx.ariaLabel)(\"aria-labelledby\", ctx.ariaLabelledby)(\"aria-describedby\", ctx.ariaDescribedby);\n i0.ɵɵadvance(5);\n i0.ɵɵproperty(\"matRippleTrigger\", _r0)(\"matRippleDisabled\", ctx._isRippleDisabled())(\"matRippleCentered\", true);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"for\", ctx.inputId);\n }\n },\n dependencies: [i3.MatRipple],\n styles: [\".mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio[hidden]{display:none}.mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\";transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{border-color:CanvasText}}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{content:\\\"\\\";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{border-color:CanvasText}}.mdc-radio__native-control:checked+.mdc-radio__background,.mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:disabled+.mdc-radio__background,[aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mat-mdc-radio-button{--mdc-radio-disabled-selected-icon-opacity:0.38;--mdc-radio-disabled-unselected-icon-opacity:0.38;--mdc-radio-state-layer-size:40px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{padding:calc((var(--mdc-radio-state-layer-size) - 20px) / 2)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-disabled-selected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{top:calc(-1 * (var(--mdc-radio-state-layer-size) - 20px) / 2);left:calc(-1 * (var(--mdc-radio-state-layer-size) - 20px) / 2);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control{top:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);right:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);left:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, black)}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:\\\"\\\"}.mat-mdc-radio-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}[dir=rtl] .mat-mdc-radio-touch-target{left:0;right:50%;transform:translate(50%, -50%)}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatRadioButton;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatRadioModule = /*#__PURE__*/(() => {\n class MatRadioModule {\n static {\n this.ɵfac = function MatRadioModule_Factory(t) {\n return new (t || MatRadioModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatRadioModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [MatCommonModule, CommonModule, MatRippleModule, MatCommonModule]\n });\n }\n }\n return MatRadioModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_RADIO_DEFAULT_OPTIONS, MAT_RADIO_DEFAULT_OPTIONS_FACTORY, MAT_RADIO_GROUP, MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, MatRadioButton, MatRadioChange, MatRadioGroup, MatRadioModule, _MatRadioButtonBase, _MatRadioGroupBase };\n","import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges, OnInit } from '@angular/core';\nimport { findById, findByProperty } from '@proman/utils';\n\n@Component({\n selector: 'pm-radio-group',\n template: `\n {{ config.label | translate }} \n \n \n {{ option[config.displayKey] || option | translate }} \n \n `,\n styles: ['mat-radio-group { display: inline-flex; flex-direction: column; }']\n})\n\nexport class RadioGroupComponent implements OnInit, OnChanges {\n @Input() value: any;\n @Input() options: any;\n @Input() config: any = {};\n @Input() disabled: boolean;\n @Output() onChange: EventEmitter = new EventEmitter();\n\n tmpVal: any;\n\n constructor() {}\n\n ngOnInit() {\n this.tmpVal = this.config.displayKey ? findById(this.options, this.value) : this.value;\n }\n\n ngOnChanges(changes: SimpleChanges) {\n\n if (changes.value) {\n this.tmpVal = this.config.displayKey ? findByProperty(this.options, 'id' , this.value) : changes.value.currentValue;\n\n }\n\n }\n\n handleClick(item: any) {\n\n if (!this.isDisabled(item)) {\n this.tmpVal = item;\n this.onChange.emit(item);\n\n }\n\n }\n\n isDisabled(item: any) {\n\n if (typeof this.config.disabledFilter === 'undefined') {\n return false;\n\n } else {\n return this.config.disabledFilter(item);\n\n }\n\n }\n\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FlexLayoutModule } from 'ngx-flexible-layout';\nimport { PromanParametersModule } from '@proman/parameters/proman-parameters.module';\nimport { MonthpickerComponent } from '@frontend/inputs/components/monthpicker.component';\nimport { ParameterListComponent } from '@frontend/shared/components/parameter-list.component';\nimport { SwitchComponent } from '@frontend/inputs/components/switch.component';\nimport { TimeIntervalComponent } from '@frontend/inputs/components/time-interval.component';\nimport { PromanFilesManagerComponent } from '@proman/files-manager/proman-files-manager.component';\nimport { PriceComponent } from '@frontend/inputs/components/price.component';\nimport { ParameterWorkgroupComponent } from '@frontend/shared/components/parameter-workgroup.component';\nimport { TagsComponent } from '@proman/tags/tags.component';\nimport { IconSelectComponent } from '@frontend/shared/components/icon-select.component';\nimport { AccountCategoryTypeBtnComponent } from '@frontend/accounting/components/account-category-type-btn.component';\nimport { EmojiComponent } from '@frontend/inputs/components/emoji.component';\nimport { HtmlTxtComponent } from '@frontend/inputs/components/html-txt.component';\nimport { AccountingPanelComponent } from '@frontend/shared/components/accounting-panel.component';\nimport { PromanSelectComponent } from '@proman/select';\nimport { InputsModule } from '@frontend/inputs/inputs.module';\nimport { ParametersComponent } from '@frontend/shared/components/parameters.component';\nimport { PipesModule } from '@proman/shared/pipes/pipes.module';\nimport { DragulaModule } from 'ng2-dragula';\nimport { PromanCommonComponentsModule } from '@proman/common-components/proman-common-components.module';\nimport { PromanExpressionModule } from '@proman/expression/proman-expression.module';\nimport { SharedDirectivesModule } from '@proman/shared/directives/shared-directives.module';\nimport {\n ParameterDropdownDefinitionComponent\n} from '@frontend/parameters/components/parameter-dropdown-definition.component';\nimport { CorporatePanelComponent } from '@frontend/shared/components/corporate-panel.component';\n\nconst COMPONENTS = [\n ParametersComponent,\n ParameterWorkgroupComponent,\n ParameterListComponent,\n]\n\n@NgModule({\n declarations: COMPONENTS,\n imports: [\n CommonModule,\n FlexLayoutModule,\n InputsModule,\n DragulaModule.forRoot(),\n PromanSelectComponent,\n PromanCommonComponentsModule,\n PromanExpressionModule,\n SharedDirectivesModule,\n PipesModule,\n PromanFilesManagerComponent,\n PromanParametersModule.forRoot({\n templates: {\n 'month': { component: MonthpickerComponent },\n 'list': { component: ParameterListComponent },\n 'boolean': { component: SwitchComponent },\n 'duration': { component: TimeIntervalComponent },\n 'files': { component: PromanFilesManagerComponent },\n 'price': { component: PriceComponent },\n 'dropdown': { component: ParameterDropdownDefinitionComponent },\n 'workgroup': {\n config: {\n groupBy: 'workgroupName',\n },\n component: ParameterWorkgroupComponent,\n },\n 'tags': { component: TagsComponent },\n 'icon': { component: IconSelectComponent },\n 'namespaces': { component: CorporatePanelComponent },\n 'account_category_type': { component: AccountCategoryTypeBtnComponent },\n 'emoji': {\n config: {\n noPadding: true,\n },\n component: EmojiComponent,\n },\n 'html': {\n component: HtmlTxtComponent,\n },\n 'accounting': {\n component: AccountingPanelComponent,\n config: {\n groupInput: true,\n }\n }\n }\n })\n ],\n providers: [],\n exports: [\n PromanParametersModule,\n ...COMPONENTS\n ]\n})\n\nexport class FrontendParametersModule {}\n","import { Component, Inject } from '@angular/core';\nimport { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogRef } from '@angular/material/legacy-dialog';\nimport { isDefinedNotNull, prepareRequest } from \"@proman/utils\";\n\n@Component({\n selector: 'pm-radio-input-dialog',\n template: `\n \n `\n})\n\nexport class RadioInputDialogComponent {\n parameters: any;\n form: UntypedFormGroup;\n controls: any = {};\n inputData: any = {};\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: any,\n public dialogRef: MatLegacyDialogRef\n ) {\n\n let validators: any = ['', Validators.required];\n\n let mainField: any = {\n key: 'name',\n name: 'name',\n type: 'string',\n config: {\n required: true,\n control: new UntypedFormControl(validators),\n }\n };\n\n this.parameters = [\n Object.assign({}, mainField, this.data.mainField || {})\n ];\n\n if (this.data.parameters) {\n this.parameters = [].concat(this.parameters, this.data.parameters);\n\n }\n\n for (let parameter of this.parameters) {\n\n if (this.data.item) parameter.value = this.data.item[parameter.key];\n\n if (parameter.config.control) {\n this.controls[parameter.key] = parameter.config.control;\n\n }\n\n if (parameter.config.required && !this.controls[parameter.key]) {\n let control = new UntypedFormControl(parameter.value || '', Validators.required);\n\n this.controls[parameter.key] = control;\n parameter.config.control = control;\n\n }\n\n if (parameter.value) {\n this.set(parameter.key, parameter.value);\n\n }\n\n if (parameter.type === 'string') {\n parameter.config = Object.assign({ debounce: 0 }, parameter.config);\n\n }\n\n }\n\n this.form = new UntypedFormGroup(this.controls);\n if (isDefinedNotNull(this.data.defaultValue)) {\n this.set('select', this.data.selections[0]);\n }\n }\n\n set(property: string, value: any) {\n this.inputData[property] = value;\n }\n\n create(createForm: any) {\n if (createForm.valid) {\n let data = prepareRequest(this.inputData);\n this.dialogRef.close(data);\n }\n\n }\n\n getCallback(button: any) {\n\n if (this.form.valid) {\n let data = prepareRequest(this.inputData);\n this.dialogRef.close();\n button.callback(data);\n }\n\n }\n\n}\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'pm-simple-form-field',\n template: ` \n \n \n \n \n \n \n \n \n `\n})\n\nexport class SimpleFormFieldComponent implements OnInit {\n @Input() value: any;\n @Input() config: any;\n @Output() onChange: EventEmitter = new EventEmitter();\n\n constructor(\n\n ) {\n\n }\n\n ngOnInit() {\n if (!this.value && this.config.default) {\n this.handleChange(this.config.default);\n }\n \n }\n\n handleChange(value: any) {\n this.value = value;\n\n this.onChange.emit(value);\n }\n\n}\n","import { forkJoin as observableForkJoin } from 'rxjs';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output\n} from '@angular/core';\nimport { Entity } from '@proman/services/entity.service';\nimport { Template } from '@proman/interfaces/entity-interfaces';\nimport { arraymove, debounce, deepCopy, isArray } from '@proman/utils';\nimport { CdkDragDrop } from '@angular/cdk/drag-drop';\n\n@Component({\n selector: 'pm-elements-builder',\n template: `\n \n
\n
\n {{ 'preview' | translate }} \n
\n \n
\n\n
\n
{{ 'elements' | translate }} \n
\n\n
\n\n \n\n \n\n \n\n
\n\n
\n\n
\n\n
\n
{{ element.className }}
\n
\n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [`\n :host {\n width: 100%;\n }\n .ElementsList {\n /*width: 500px;*/\n max-width: 100%;\n border: solid 1px #ccc;\n display: block;\n background: white;\n border-radius: 4px;\n }\n\n .ElementsBox {\n padding: 20px 10px;\n border-bottom: solid 1px #ccc;\n color: rgba(0, 0, 0, 0.87);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box;\n background: white;\n font-size: 14px;\n }\n .ElementItem:not(:last-child) {\n border-bottom: solid 1px #ccc;\n margin-bottom: 1.5rem;\n }\n\n .DivContentEditable {\n width: 100%;\n }\n\n `]\n})\n\nexport class ElementsBuilderComponent implements OnInit {\n @Input('elements') inputElements: any[];\n @Input() template: Template;\n @Output() onChange: EventEmitter = new EventEmitter();\n elementValues: any[];\n elements: any[];\n rawElements: any[];\n elementEntity: any;\n preview: any;\n updateDebounce: () => void;\n activeInput: number;\n isView: boolean = true;\n\n constructor(\n private Entity: Entity,\n private cd: ChangeDetectorRef,\n ) {\n this.elementEntity = this.Entity.get('element');\n }\n\n ngOnInit() {\n\n this.getElements()\n .then(() => {\n this.elementValues = this.inputElements || [];\n\n if (this.elementValues.length) this.generateElementsPreview();\n });\n\n this.updateDebounce = debounce(() => this.updateElements(), 500);\n\n this.cd.markForCheck();\n\n }\n\n getElements = () => {\n\n return this.elementEntity.list()\n .then((response: any) => {\n\n let elements: any[] = [];\n\n for (let className in response) {\n let item = response[className];\n\n item.options = {};\n\n let keys = Object.keys(item.configuration);\n\n item.keys = keys;\n\n elements.push({ class: className, keys, config: item, className: className.substring(className.lastIndexOf('\\\\') + 1) });\n\n for (let configKey in item.configuration) {\n\n if (item.configuration[configKey].type === 'select') {\n let data = item.configuration[configKey].data;\n item.options[configKey] = [];\n\n for (let optionsKey in data) {\n item.options[configKey].push({ id: optionsKey, name: data[optionsKey] });\n }\n\n }\n }\n\n this.elements = elements;\n\n this.cd.markForCheck();\n\n }\n\n this.rawElements = response;\n\n return Promise.resolve();\n\n })\n };\n\n // old implementation\n /* handleDrop(data: any) {\n\n if (isArray(data.dragData)) {\n let target = data.nativeEvent.target as HTMLElement;\n let dropOnTop = false;\n\n let foo = target;\n let index;\n\n while (!(foo.classList.contains('ElementsList') || dropOnTop)) {\n\n if (foo.classList.contains('ElementItem')) {\n dropOnTop = true;\n index = +foo.getAttribute('data-index');\n\n } else {\n foo = foo.parentNode as HTMLElement;\n\n }\n\n }\n\n let currentIndex = this.elementValues.indexOf(data.dragData);\n\n if (currentIndex > -1) {\n let item = this.elementValues.splice(currentIndex, 1)[0];\n\n this.elementValues.splice(index, 0, item);\n\n }\n\n } else {\n let item = data.dragData;\n let element = [item.class, { }];\n\n item.keys.forEach((key: string) => element[1][key] = this.rawElements[item.class].configuration[key].default);\n\n this.elementValues.push(element);\n\n }\n\n this.updateElements();\n\n this.generateElementsPreview();\n\n }*/\n\n getType(className: string, item: any) {\n return this.rawElements[className]?.configuration[item.key].type;\n }\n\n getOptions(className: string, item: any) {\n return this.rawElements[className].options[item.key];\n }\n\n setElementValue(item: any, key: string, value: any) {\n item[1][key] = value;\n\n this.updateDebounce();\n this.updateElements();\n this.updateView();\n }\n\n removeElement(index: number) {\n this.elementValues.splice(index, 1);\n\n this.updateElements();\n }\n\n updateElements() {\n let request: any = [];\n\n this.elementValues.forEach((item: any) => {\n request.push({ 0: item[0], 1: item[1] });\n });\n\n this.onChange.emit(this.elementValues);\n\n // this.model.update('elements', request);\n\n this.generateElementsPreview();\n }\n\n generateElementsPreview = async () => {\n\n if (this.template) {\n (this.Entity.get('template') as any)\n .render({id: this.template.id})\n .then((response: any) => this.preview = response);\n await this.updateView();\n } else {\n let requests: any[] = [];\n this.elementValues.forEach((item: any) => requests.push({\n output: 'raw',\n configuration: item[1],\n class: item[0]\n }));\n observableForkJoin(requests.map((r: any) => this.elementEntity.render(r)))\n .toPromise()\n .then((values: any[]) => this.preview = values.join(' '));\n await this.updateView();\n }\n\n };\n\n formatStyle(text: string) {\n if (!text) return '';\n\n const words = text.split(' ');\n let newHTML = '';\n\n words.forEach((value) => {\n switch (value.toUpperCase()){\n case 'SELECT':\n case 'LIKE':\n case 'BETWEEN':\n case 'NOT LIKE':\n case 'FALSE':\n case 'IS':\n case 'NULL':\n case 'TRUE':\n case 'NOT IN':\n case 'AND':\n case 'ON':\n case 'FORMAT':\n case 'AS':\n newHTML += `${value} `;\n break;\n\n case 'FROM':\n case 'GROUP BY':\n case 'WHERE':\n case 'HAVING':\n newHTML += `${value} `;\n break;\n\n default:\n newHTML += `${value} `;\n }\n });\n\n const funcs = [\n 'GROUP BY',\n 'DATE_FORMAT',\n 'DATE_FORMAT',\n 'IFNULL',\n ];\n\n const funcsNewLine = [\n 'LEFT JOIN',\n 'RIGHT JOIN',\n 'INNER JOIN',\n 'GROUP BY',\n ];\n\n funcs.forEach((f) => newHTML = newHTML.split(f).join(`${f} `));\n\n funcsNewLine.forEach((f) => newHTML = newHTML.split(f).join(`${f} `));\n\n function replaceFn(match: string, offset: number, string: string) {\n return `${match} `;\n }\n\n newHTML = newHTML.replace(/'.*?'/g, replaceFn);\n\n return newHTML;\n }\n\n getFormattedHTML(item: any) {\n let key = Object.keys(item)[0];\n\n return this.formatStyle(item[key]);\n }\n\n updateView = () => {\n this.cd.markForCheck();\n }\n\n setActiveIndex(index: number) {\n this.isView = false;\n\n setTimeout(() => { // this is used to reload info from proKeys pipe\n this.isView = true;\n this.activeInput = index;\n\n this.updateView();\n });\n\n }\n\n handleCdkDrop(data: CdkDragDrop) {\n console.log('handleCdkDrop', data);\n\n if (data.container.id === 'result') {\n // reorder\n if (data.container === data.previousContainer) {\n arraymove(this.elementValues, data.previousIndex, data.currentIndex);\n\n } else {\n console.log('new item', data);\n const item = deepCopy(this.elements[data.previousIndex]);\n console.log(' item', item);\n\n // let item = data.dragData;\n const element = [item.class, { }];\n\n item.keys.forEach((key: string) => element[1][key] = this.rawElements[item.class].configuration[key].default);\n\n this.elementValues.push(element);\n }\n\n this.updateElements();\n\n this.generateElementsPreview();\n\n\n }\n\n\n\n }\n\n}\n","import {\n Component,\n Output,\n Input,\n EventEmitter,\n ViewChild,\n ElementRef,\n NgZone,\n OnInit,\n OnDestroy\n} from '@angular/core';\nimport { UploaderService } from '@proman/services/uploader.service';\nimport { UiPreferencesService, UI_CLIPBOARD_PASTE_TARGET } from '@proman/services/ui-preferences.service';\nimport $ from 'jquery';\nimport { PromanFile } from '@proman/interfaces/entity-interfaces';\nimport { CropperDialogComponent } from '@proman/cropper/cropper-dialog.component';\nimport { getScreenWidthPercent } from '@proman/utils';\nimport { Dialog } from '@frontend/shared/services/dialog.service';\n\n@Component({\n selector: 'pm-upload',\n template: `\n \n
\n
\n \n
\n
\n {{ 'click_/_drop' | translate }}\n
\n
\n
\n
\n `,\n styles: [\n ':host { width: 100%; }',\n '.Upload { padding: 20px; margin-bottom: 16px; border: 1px dashed #ebedf2; border-radius: 4px; cursor: pointer; }',\n '.Upload-description { padding-left: 8px; color: rgba(0, 0, 0, 0.5) }',\n '.show-overlay { border: 2px dashed #448aff; background-color: rgba(0, 126, 255, 0.1); }'\n ]\n})\n\nexport class UploadComponent implements OnInit, OnDestroy {\n @Output() onUpload: EventEmitter = new EventEmitter();\n @Output() onRemove: EventEmitter = new EventEmitter();\n @Input() file: PromanFile;\n @Input() config: {\n data?: any;\n resizeImageRatio?: number;\n resizeImage?: boolean;\n } = {};\n\n @ViewChild('element', { static: true }) element: ElementRef;\n progress: any;\n isOverlay: any;\n isPasteEnabled: boolean;\n\n constructor(\n private Uploader: UploaderService,\n private UiPrefs: UiPreferencesService,\n private Dialog: Dialog,\n private zone: NgZone,\n ) {\n this.isPasteEnabled = this.UiPrefs.get(UI_CLIPBOARD_PASTE_TARGET);\n }\n\n ngOnInit() {\n let element = this.element.nativeElement;\n\n new window.Dragster(element);\n\n $(element).on('drop', this.uploadDrop);\n $(element).on('dragenter', this.handleDragEnter);\n $(element).on('dragover', this.handleDragOver);\n $(element).on('dragster:enter', this.showOverlay);\n $(element).on('dragster:leave', this.hideOverlay);\n\n if (this.isPasteEnabled) document.addEventListener('paste', this.handlePaste);\n }\n\n ngOnDestroy() {\n let element = this.element.nativeElement;\n\n $(element).off('drop', this.uploadDrop);\n $(element).off('dragenter', this.handleDragEnter);\n $(element).off('dragover', this.handleDragOver);\n $(element).off('dragster:enter', this.showOverlay);\n $(element).off('dragster:leave', this.hideOverlay);\n\n if (this.isPasteEnabled) document.removeEventListener('paste', this.handlePaste);\n }\n\n deleteFile($event: any) {\n $event.stopPropagation();\n this.onRemove.emit();\n }\n\n handleDragEnter(event: any) {\n event.preventDefault();\n }\n\n handleDragOver(event: any) {\n event.stopPropagation();\n event.preventDefault();\n\n return false;\n }\n\n uploadDrop = (event: any) => {\n this.isOverlay = false;\n\n event.stopPropagation();\n event.preventDefault();\n\n this.tryResizingUpload(event.originalEvent.dataTransfer.files);\n };\n\n showOverlay = () => {\n this.zone.run(() => {\n this.isOverlay = true;\n });\n };\n\n hideOverlay = () => {\n this.zone.run(() => {\n this.isOverlay = false;\n });\n };\n\n callback(event: any) {\n this.progress = ((event.loaded / event.total) * 100);\n }\n\n upload() {\n let uploaderSettings = {};\n\n this.Uploader\n .init(this.callback, this.config?.data || {})\n .show(uploaderSettings)\n .then(this.handleFile);\n }\n\n handleFile = (response: any) => {\n this.onUpload.emit(response);\n this.file = response[0];\n };\n\n handlePaste = (event: any) => {\n if (event.clipboardData.files.length) {\n this.Uploader\n .init(this.callback)\n .upload(event.clipboardData.files, {})\n .then(this.handleFile);\n }\n\n };\n\n tryResizingUpload = (files: FileList) => {\n if (this.canResizeFiles(files)) {\n this.Dialog.open(CropperDialogComponent,\n { file: files[0], aspectRatio: this.config.resizeImageRatio },\n { width: `${getScreenWidthPercent(80)}px`, disableClose: true })\n .then((result: File) => {\n this.uploadFiles([result] as unknown as FileList);\n });\n } else {\n this.uploadFiles(files)\n }\n };\n\n uploadFiles = (files: FileList) => {\n this.Uploader\n .init(this.callback, this.config?.data || {})\n .upload(files as unknown as any[], {})\n .then(this.handleFile);\n };\n\n canResizeFiles = (files: FileList) => {\n return this.config.resizeImage && files.length === 1 && files[0].type?.includes('image');\n };\n\n}\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { Entity, EntityNameType } from '@proman/services/entity.service';\nimport { deepCopy } from '@proman/utils';\n\n@Component({\n selector: 'pm-upload-entity-photo',\n template: `\n \n `\n})\n\nexport class UploadEntityPhotoComponent implements OnInit {\n @Input() value: any;\n @Input() config: { resource: EntityNameType; key?: string, resizeImageRatio?: number; resizeImage?: boolean };\n @Output() onChange: EventEmitter = new EventEmitter();\n entityInstance: any;\n key: string;\n\n constructor(\n private Entity: Entity,\n ) {\n\n }\n\n ngOnInit() {\n this.key = this.config.key || 'photo';\n this.entityInstance = this.Entity.get(this.config.resource);\n }\n\n add(response: any) {\n let data: any = { id: this.value.id };\n\n try {\n // response contains array of uploaded file names\n data[this.key] = response[0].id;\n\n } catch (e) {\n return;\n }\n\n this.entityInstance\n .update(data)\n .then(() => {\n const tempValue = deepCopy(this.value);\n tempValue[this.key] = response[0];\n this.value = tempValue;\n this.onChange.emit();\n });\n }\n\n remove() {\n this.entityInstance\n .update({ id: this.value.id, [this.key]: null })\n .then((): any => {\n const tempValue = deepCopy(this.value);\n tempValue[this.key] = null;\n this.value = tempValue;\n this.onChange.emit();\n });\n }\n}\n","import { Component, Input } from '@angular/core';\n\n/**\n * `pmProgressBar` component\n *\n * Attributes:\n * color\n * mode\n * value\n * buffer-value\n *\n */\n@Component({\n selector: 'pm-progress-bar',\n template: `\n \n \n `\n})\nexport class ProgressBarComponent {\n @Input() color: string = 'accent';\n @Input() mode: string = 'indeterminate';\n @Input() value: number = 50;\n @Input() bufferValue: number = 75;\n}\n","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { Action } from '@proman/interfaces/object-interfaces';\nimport { TagType } from '@proman/resources/tag';\n\n@Injectable({ providedIn: 'root' })\nexport class ToolbarService {\n item: any;\n title: string;\n subtitle: string;\n subtitleIcon: any;\n subtitleWarn: boolean;\n actions: Action[];\n actionsEditable: boolean;\n entity: any;\n newsFeedEntityType: any;\n entityName: string;\n tagType: TagType;\n tabs: any;\n parentState: any;\n parentStateFilter: any;\n hideBacklink: boolean;\n hasColor: boolean;\n hasTags: boolean;\n additionalState: boolean;\n backlink: { name: string; state: string };\n timeStampSubject: Subject = new Subject();\n\n constructor(\n\n ) {\n\n }\n\n reset() {\n this.item = null;\n this.title = null;\n this.subtitle = null;\n this.subtitleIcon = null;\n this.actions = null;\n this.actionsEditable = null;\n this.entity = null;\n this.newsFeedEntityType = null;\n this.entityName = '';\n this.tagType = null;\n this.tabs = null;\n this.parentState = null;\n this.parentStateFilter = null;\n this.additionalState = null;\n this.backlink = null;\n this.hideBacklink = false;\n this.hasColor = false;\n this.hasTags = false;\n }\n\n update() {\n this.timeStampSubject.next(new Date().getTime());\n }\n\n}\n","import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { ToolbarService } from '../services/toolbar.service';\nimport { Action, TabState } from '@proman/interfaces/object-interfaces';\nimport { isDefinedNotNull } from \"@proman/utils\";\nimport { TagType } from '@proman/resources/tag';\n\n/**\n * `pmToolbarDriver` component\n *\n * Attributes:\n * title\n * subtitle\n * entityName\n * actions\n * entity\n * tabs\n * parentState\n * parentStateFilter\n * hideBacklink\n * hasTags\n * hasColor\n *\n */\n\n@Component({\n selector: 'pm-toolbar-driver',\n template: ``\n})\n\nexport class ToolbarDriverComponent implements OnInit, OnChanges{\n @Input() item: any;\n @Input() entity: any;\n @Input() actions: Action[];\n @Input() actionsEditable: boolean;\n @Input() title: any;\n @Input() subtitle: any;\n @Input() subtitleIcon: any;\n @Input() subtitleWarn: boolean;\n @Input() entityName: any;\n @Input() tagType: TagType;\n @Input() parentState: any;\n @Input() parentStateFilter: (state: TabState) => boolean;\n @Input() additionalState: any;\n @Input() hideBacklink: any;\n @Input() timeStamp: number;\n @Input() hasColor: boolean;\n @Input() hasTags: boolean;\n @Input() backlink: { name: string; state: string };\n\n constructor(private Toolbar: ToolbarService) {\n\n }\n\n ngOnInit() {\n const props = [\n 'item',\n 'entity',\n 'actions',\n 'actionsEditable',\n 'title',\n 'subtitle',\n 'subtitleIcon',\n 'subtitleWarn',\n 'entityName',\n 'tagType',\n 'parentState',\n 'parentStateFilter',\n 'additionalState',\n 'hideBacklink',\n 'hasColor',\n 'hasTags',\n 'backlink',\n ];\n\n this.Toolbar.reset();\n\n for (const prop of props) {\n if (isDefinedNotNull(prop)) {\n this.Toolbar[prop] = this[prop];\n }\n }\n\n this.Toolbar.update();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n for (const key in changes) {\n\n if (!changes[key].isFirstChange()) {\n this.setThing(key, changes[key]);\n\n }\n\n }\n\n this.Toolbar.update();\n }\n\n setThing(prop: any, thing: any) {\n this.Toolbar[prop] = thing.currentValue;\n\n }\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { PromanStateService } from '../services/proman-state.service';\nimport { EntityNameType } from '@proman/services/entity.service';\nimport { TagType } from '@proman/resources/tag';\n\n@Component({\n selector: 'pm-navigation-header',\n template: `\n \n\n\n `,\n styles: [`\n .NavigationHeader { background: rgb(224, 224, 224); }\n h5 { font-size: 24px; font-weight: 300; line-height: 32px; margin: 4px 0; }\n `]\n})\n\nexport class NavigationHeaderComponent {\n @Input() headerText: string;\n @Input() headerTextSub: string;\n @Input() headerBrackets: string;\n @Input() dynamicStatus: string;\n @Input() backButton: string;\n @Input() tagItem: any;\n @Input() entityName: EntityNameType;\n @Input() tagType: TagType;\n @Input() hasTags: boolean;\n @Output() onAdd: EventEmitter = new EventEmitter();\n\n constructor(\n private promanState: PromanStateService\n ) {\n\n }\n\n handleBack() {\n this.promanState.to(this.backButton);\n }\n\n}\n","import { Component, EventEmitter, Inject, Input, OnInit, Output } from '@angular/core';\nimport { CONFIG } from '@proman/config';\nimport { PreferencesService } from '@proman/services/preferences.service';\nimport { Entity, EntityInterface } from '@proman/services/entity.service';\nimport { CurrUser } from '@proman/interfaces/object-interfaces';\nimport { PublicSystemOptions } from '@proman/interfaces/entity-interfaces';\nimport { Store } from '@ngrx/store';\nimport { getPublicSystemOptions } from '@proman/store/system-options';\nimport { getCurrUser } from '@proman/store/curr-user';\n\n@Component({\n selector: 'pm-language-switch',\n template: `\n \n \n {{ language | uppercase }}\n \n \n \n\n \n {{ 'language' | translate }} \n {{ currLang }} \n \n `\n})\n\nexport class LanguageSwitchComponent implements OnInit {\n @Input() isUser: any;\n @Input() preventReload: boolean = false;\n @Output() onChange: EventEmitter = new EventEmitter();\n currLang: string;\n languages: string[];\n currUser: CurrUser;\n publicSystemOptions: PublicSystemOptions;\n personEntity: EntityInterface;\n\n constructor(\n private Entity: Entity,\n private store: Store,\n private Preferences: PreferencesService,\n ) {\n this.personEntity = this.Entity.get('person');\n this.store.select(getPublicSystemOptions)\n .subscribe((value) => this.publicSystemOptions = value);\n\n this.store.select(getCurrUser)\n .subscribe((value) => this.currUser = value);\n }\n\n ngOnInit() {\n if (!this.publicSystemOptions) return;\n\n if (typeof this.isUser === 'undefined') {\n this.languages = CONFIG.languages;\n this.currLang = this.Preferences.language() || this.publicSystemOptions.defaultLanguage;\n\n } else {\n this.languages = this.currUser?.languages;\n this.currLang = this.currUser?.language;\n\n }\n\n }\n\n handleLanguageChange(lang: any) {\n this.Preferences.language(lang);\n this.onChange.emit(lang);\n\n if (!this.preventReload) window.location.reload();\n }\n\n setLanguage(lang: any) {\n\n if (typeof this.isUser === 'undefined') {\n this.handleLanguageChange(lang);\n\n } else {\n this.Entity\n .get(this.currUser.isCustomer ? 'customer_employee' : this.currUser.type)\n .update({ id: this.currUser.person.id, language: lang })\n .then(() => this.handleLanguageChange(lang));\n\n }\n\n }\n}\n","import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';\nimport { isLocalhost, isProman, isSmarton } from '@proman/utils';\n\nconst DEFAULT_USER_PLACEHOLDER = 'assets/images/placeholder.png';\nconst PROMAN_LOGO_PLACEHOLDER = 'assets/images/proman_logo_white.png';\nconst SMARTON_LOGO_PLACEHOLDER = 'assets/images/smarton_logo_notext.png';\nconst LOCALHOST_LOGO_PLACEHOLDER = 'assets/images/icon-512x512.png';\n\n@Component({\n selector: 'pm-user-thumb',\n template: `\n \n @if (thumb) {\n
\n } @else {\n @if (isUserThumb) {\n
\n }\n }\n \n @if (!(thumb || isUserThumb)) {\n
\n }\n
\n `,\n styles: [`\n .UserThumbnail > img { padding: 10px; }\n `]\n})\n\nexport class UserThumbComponent implements OnInit {\n @ViewChild('img') img: ElementRef;\n @Input() thumb: any;\n @Input() isUserThumb: boolean;\n isProman: boolean = isProman();\n isSmarton: boolean = isSmarton();\n isLocal: boolean = isLocalhost();\n placeholderUrl: string = DEFAULT_USER_PLACEHOLDER;\n\n constructor(\n\n ) {\n }\n\n ngOnInit() {\n if (this.isUserThumb) this.placeholderUrl = this.getPlaceHolder();\n }\n\n handleError(error: any) {\n error.target.src = this.placeholderUrl;\n }\n\n getPlaceHolder = () => {\n if (this.isProman) {\n return PROMAN_LOGO_PLACEHOLDER;\n }\n if (this.isSmarton) {\n return SMARTON_LOGO_PLACEHOLDER;\n }\n if (this.isLocal) {\n return LOCALHOST_LOGO_PLACEHOLDER;\n }\n\n }\n\n}\n","import {\n Component, AfterViewInit, Input, ElementRef, ViewChild, Output, EventEmitter,\n SimpleChanges, OnChanges, OnInit,\n} from '@angular/core';\nimport { Entity, EntityNameType } from '@proman/services/entity.service';\nimport { FilterService } from '@proman/services/filter.service';\nimport { dateTime } from '@proman/interfaces/common.interface';\nimport { Store } from '@ngrx/store';\nimport { CurrUser } from '@proman/interfaces/object-interfaces';\nimport { getCurrUser } from '@proman/store/curr-user';\nimport { findByProperty } from '@proman/utils';\nimport { PromanFile } from '@proman/interfaces/entity-interfaces';\n\nconst REACTIONS = [\n 'thumbs-up',\n 'heart',\n];\n\ndeclare interface TimelineChatReaction {\n icon: string;\n users: string[];\n isMyReaction?: boolean;\n}\n\ninterface TimelineMessage {\n id: number;\n createdAt: dateTime;\n updatedAt: dateTime;\n type: 'person_email'|'message'|'git_commit';\n content: {\n author: string;\n author_id: number;\n message: string;\n commit_link: string;\n commit_branch: string;\n };\n internal: boolean;\n isEdited?: boolean;\n isEditMode?: boolean;\n preview?: string;\n isPreview?: boolean;\n newId?: string;\n file?: PromanFile;\n reactions: TimelineChatReaction[];\n}\n\n@Component({\n selector: 'pm-timeline-chat',\n template: `\n \n
\n
\n
\n
\n \n @if (item.replyTo) {\n
\n }\n \n @switch (item.type) {\n @case ('git_commit') {\n
\n }\n @default {\n
\n }\n }\n
\n
\n
\n
\n @if (replyTo) {\n
\n \n \n \n
\n }\n
\n
\n\n \n @if (item.reactions?.length === 0) {\n \n }\n\n \n @for (reaction of messageReactions; track $index) {\n \n }\n
\n\n @for (reaction of item.reactions; track $index) {\n \n \n @if (reaction.users?.length > 1) { {{ reaction.users.length }} }\n
\n }\n \n `,\n styles: [\n `\n .Icon img {\n width: 24px;\n }\n\n fa.accent {\n color: #2196f3;\n }\n\n .TimelineChat-ReactionsContainer {\n margin-right: 8px;\n cursor: pointer;\n position: relative;\n display: flex;\n flex-direction: row;\n\n &> div {\n margin-right: 8px;\n }\n\n fa[name=\"face-smile-plus\"].Empty {\n color: #b9b9b9;\n }\n\n }\n\n .TimelineChat-ReactionsContainer_AddReaction {\n display: none;\n position: absolute;\n top: -7px;\n right: 14px;\n float: right;\n direction: rtl;\n background: white;\n border: 2px solid #4c96d2;\n border-radius: 2px;\n padding: 2px;\n box-sizing: border-box;\n z-index: 1;\n\n fa {\n margin: 0 2px;\n\n &:hover {\n color: orange;\n }\n &:focus {\n color: red;\n }\n\n }\n }\n\n .TimelineChat-ReactionsContainer:hover .TimelineChat-ReactionsContainer_AddReaction {\n display: block;\n }\n\n .TimelineChat-ReactionsContainer_ReactionContainer {\n position: relative;\n\n fa.MineReaction {\n color: #2196f3;\n }\n\n span {\n position: absolute;\n bottom: -8px;\n right: -8px;\n }\n }\n\n .TimelineChat--ReplyButton {\n color: #b9b9b9;\n margin-right: 8px;\n cursor: pointer;\n }\n\n .ReplyToContainer {\n position: relative;\n padding: 4px 16px;\n color: #666;\n border-top: 1px solid grey;\n border-bottom: 1px solid grey;\n\n fa {\n color: #b9b9b9;\n margin-left: 8px;\n margin-right: 8px;\n }\n\n fa[name=\"times\"] {\n color: #f44336;\n position: absolute;\n right: 0;\n top: 0;\n padding: 6px;\n cursor: pointer;\n }\n }\n\n `\n ]\n})\nexport class TimelineChatComponent implements AfterViewInit, OnChanges {\n @Input() entity: { id: number };\n @Input() entityType: EntityNameType;\n @Input() internalMode: boolean = false;\n @ViewChild('element', { static: true }) element: ElementRef;\n @ViewChild('input', { static: true }) input: ElementRef;\n params: any;\n\n timelineEntity: any;\n timelineMsgEntity: any;\n newMessage: string = '';\n history: TimelineMessage[] = [];\n isEditMode: boolean = false;\n pending: boolean = false;\n editableMessage: any;\n currUser: CurrUser;\n messageReactions: string[] = REACTIONS;\n replyTo: string = '';\n\n constructor(\n Entity: Entity,\n private Filter: FilterService,\n private store: Store,\n ) {\n this.store.select(getCurrUser)\n .subscribe((value) => this.currUser = value);\n this.timelineEntity = Entity.get({ name: 'timeline', get: ['formatted'] });\n this.timelineMsgEntity = Entity.get('timeline_message');\n }\n\n ngOnChanges(changes: SimpleChanges) {\n let entity = changes.entity;\n\n if (entity && !entity.firstChange) {\n this.ngAfterViewInit();\n }\n\n }\n\n ngAfterViewInit() {\n this.params = {\n entityType: this.entityType,\n entityId: this.entity.id\n };\n\n if (this.internalMode && !this.currUser.isEmployee) {\n Object.assign(this.params, {internal: false});\n this.internalMode = false;\n } else if (this.internalMode && this.currUser.isEmployee)\n {\n Object.assign(this.params, {internal: true});\n this.internalMode = true;\n }\n this.loadHistory();\n }\n\n toggleEditMode(message: TimelineMessage, last: boolean) {\n if (last) message.isEditMode = !message.isEditMode;\n }\n\n editMessage(message: TimelineMessage) {\n let element = this.element.nativeElement;\n\n this.isEditMode = !this.isEditMode;\n\n if (this.isEditMode) {\n this.newMessage = message.content.message;\n this.editableMessage = message;\n element.querySelector('.TimelineChat-Input input')?.focus();\n\n } else {\n this.newMessage = null;\n element.querySelector('.TimelineChat-Input input')?.blur();\n }\n\n }\n\n deleteMessage(message: TimelineMessage) {\n this.timelineMsgEntity\n .remove({ id: message.id })\n .then(this.loadHistory);\n }\n\n setInternal(message: TimelineMessage) {\n this.timelineMsgEntity.update({ id: message.id, internal: !message.internal }).then(() => {\n this.loadHistory();\n })\n }\n\n async send(secondaryCheck: boolean = false) {\n\n this.pending = false;\n\n if (!(this.newMessage && this.newMessage.length)) {\n\n if (!secondaryCheck) await setTimeout(() => this.send(true), 300);\n\n return;\n\n }\n\n if (this.isEditMode) {\n this.editableMessage.message = this.newMessage;\n\n this.timelineMsgEntity\n .update({\n id: this.editableMessage.id,\n message: this.newMessage\n })\n .then(() => {\n this.loadHistory();\n this.isEditMode = false;\n this.sendSuccess();\n });\n\n } else {\n this.timelineMsgEntity\n .create(Object.assign({},\n { message: this.newMessage },\n this.replyTo ? { replyTo: this.replyTo } : {},\n this.params)\n )\n .then(() => {\n this.sendSuccess();\n this.loadHistory();\n })\n .catch(this.sendSuccess);\n\n }\n\n this.sendSuccess();\n\n }\n\n sendSuccess = () => {\n this.newMessage = '';\n this.replyTo = '';\n }\n\n setMessage = (message: string) => this.newMessage = message;\n\n setScrollPosition() {\n setTimeout(() => {\n let messagesContainerElement: any = document.querySelectorAll('.TimelineChat-Messages--Container');\n\n if (messagesContainerElement[0]) {\n messagesContainerElement[0].scrollTop = messagesContainerElement[0].scrollHeight;\n\n }\n\n });\n };\n\n loadHistory = () => {\n const userId = this.currUser.id.toString();\n\n this.timelineEntity\n .formatted(this.params)\n .then((response: TimelineMessage[]) => {\n if (!response) return;\n\n this.history = response.map((item ) => {\n if (item.updatedAt && item.updatedAt !== item.createdAt) item.isEdited = true;\n\n if (item.type === 'person_email') {\n item.preview = this.Filter.maxLength(item.content.message, 35);\n item.isPreview = true;\n\n }\n\n item.reactions.filter((react) => typeof react !== 'string')\n .forEach((react) => {\n\n if (react.users?.includes(userId)) {\n react.isMyReaction = true;\n }\n });\n\n item.reactions = item.reactions.filter((react) => typeof react !== 'string');\n\n if (item.newId) item.file = { newId: item.newId } as PromanFile;\n\n return item;\n });\n\n this.setScrollPosition();\n });\n };\n\n handleMessageClick(item: TimelineMessage, isLast: boolean) {\n const isMyMessage = item.content.author_id === this.currUser.person.id;\n\n if (item.type === 'person_email') {\n item.isPreview = !item.isPreview;\n\n } else if (isMyMessage) {\n this.toggleEditMode(item, isLast);\n\n }\n\n }\n\n handleReaction(message: TimelineMessage, reactionIcon: string){\n const userId = this.currUser.id.toString();\n const hasMyReaction = (message.reactions || []).find((_reaction) => _reaction.users?.includes(userId));\n const hasThisReaction = !!(message.reactions || []).find((_reaction) => { return _reaction.icon.match(reactionIcon) });\n\n const removeReaction = (_icon: string): TimelineChatReaction[] => {\n let reactions: TimelineChatReaction[] = message.reactions;\n\n reactions = reactions.map((_reac) => {\n if (_reac.icon === _icon) {\n _reac.users = _reac.users?.filter((_userId) => _userId !== userId);\n\n if (_reac.users?.length === 0) {\n return null;\n }\n return _reac;\n } else {\n return _reac;\n }\n })\n .filter((_reac) => !!_reac);\n\n return reactions;\n };\n const addReaction = (reactions: TimelineChatReaction[], _icon: string): TimelineChatReaction[] => {\n const thisReaction: TimelineChatReaction|undefined = findByProperty(reactions, 'icon', reactionIcon);\n if (thisReaction) {\n if (!thisReaction.users) { thisReaction.users = [userId]; }\n\n thisReaction.users.push[userId];\n } else {\n reactions.push({ icon: reactionIcon, users: [userId] });\n\n }\n\n return reactions;\n };\n\n if (hasMyReaction) {\n if (hasThisReaction) {\n let reactions = removeReaction(reactionIcon);\n\n this.timelineMsgEntity\n .update({ id: message.id, reactions: reactions.length ? reactions : \"-\" })\n .then(() => message.reactions = reactions);\n\n } else {\n let reactions = message.reactions || [];\n removeReaction(hasMyReaction.icon);\n reactions = addReaction(reactions, reactionIcon);\n\n this.timelineMsgEntity\n .update({ id: message.id, reactions })\n .then(() => message.reactions = reactions.map((_react) => {\n if (_react.icon === reactionIcon) {\n _react.isMyReaction = true;\n }\n\n return _react;\n }));\n\n\n }\n\n\n } else {\n let reactions = message.reactions || [];\n\n addReaction(reactions, reactionIcon);\n\n this.timelineMsgEntity\n .update({ id: message.id, reactions })\n .then(() => message.reactions = reactions.map((_react) => {\n if (_react.icon === reactionIcon) {\n _react.isMyReaction = true;\n }\n\n return _react;\n }));\n }\n }\n\n handleReply(item: TimelineMessage) {\n console.log('handleReply', item);\n this.replyTo = `${item.content.author}: ${item.content.message}`;\n this.element.nativeElement.querySelector('.TimelineChat-Input input')?.focus();\n\n }\n\n cancelReply() {\n this.replyTo = '';\n }\n\n}\n\n","import { Component, Input, Output, EventEmitter, SimpleChanges, OnInit, OnChanges } from '@angular/core';\nimport { Entity, EntityNameType } from '@proman/services/entity.service';\nimport { mapId, removeByProperty } from '@proman/utils';\nimport { QueryExpressionService } from '@proman/services/query-expression.service';\nimport { ParametersOptionsService } from '@proman/services/parameters-options.service';\nimport { PromanStateService } from '../services/proman-state.service';\nimport { CustomerEmployee, Employee } from '@proman/interfaces/entity-interfaces';\n\n@Component({\n selector: 'pm-contacts-manager',\n template: `\n \n `\n})\n\nexport class ContactsManagerComponent implements OnInit, OnChanges {\n @Input() config: any;\n @Input() value: any;\n @Input() disabled: any;\n @Input() searchParams: any;\n @Input() options: any;\n @Input() onSearch: any;\n @Input() entity: { id: number };\n @Input() entityType: EntityNameType;\n @Output() onChange: EventEmitter = new EventEmitter();\n @Output() onAdd: EventEmitter = new EventEmitter();\n @Output() onRemove: EventEmitter = new EventEmitter();\n SearchEntity: any;\n isAddContactMode: boolean;\n localValue: any;\n mainEntity: any;\n contact: any;\n\n constructor(\n private promanState: PromanStateService,\n private Entity: Entity,\n private QueryExpressionService: QueryExpressionService,\n private ParametersOptions: ParametersOptionsService,\n private QueryExpression: QueryExpressionService,\n ) {\n\n }\n\n ngOnInit() {\n\n if (this.config.searchEntity) {\n this.SearchEntity = this.Entity.get(this.config.searchEntity);\n\n }\n\n if (this.config.mainEntity) {\n this.mainEntity = this.Entity.get(this.config.mainEntity);\n\n }\n\n this.setLocalValue(this.value);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n\n if (changes.value) this.setLocalValue(changes.value.currentValue);\n\n }\n\n setLocalValue(value: any) {\n this.localValue = value || [];\n\n this.getEmployeeData();\n }\n\n async handleAddContact(contact: any) {\n setTimeout(() => this.isAddContactMode = false);\n\n if (this.mainEntity || this.config.postRequest) {\n this.localValue.push(contact);\n await this.addItem(contact);\n\n }\n\n if (this.onAdd.observers.length) this.onAdd.emit(contact);\n\n const result = this.config.emitMapped ? this.localValue.map(mapId) : this.localValue;\n\n this.onChange.emit(result);\n this.getEmployeeData();\n\n }\n\n addItem(value: any) {\n const data = Object.assign({}, this.config.mainParams);\n\n if (this.config.isCreate) return;\n\n if (this.config.postRequest) {\n data[this.config.key] = [value.id];\n\n return this.mainEntity.postRequest('add_' + this.config.postRequest, data);\n\n } else {\n data[this.config.key] = value.id;\n return this.mainEntity.addAssociation(data);\n\n }\n\n }\n\n removeItem(value: any) {\n const data = Object.assign({}, this.config.mainParams);\n\n if (this.config.isCreate) {\n return;\n }\n\n if (this.config.postRequest) {\n data[this.config.removeKey] = [value.id];\n\n return this.mainEntity.postRequest('remove_' + this.config.postRequest, data);\n\n } else {\n data[this.config.key] = value.id;\n\n return this.mainEntity.removeAssociation(data);\n\n }\n\n }\n\n handleRemoveContact(contact: any) {\n\n if (this.mainEntity || this.config.postRequest) {\n this.removeItem(contact);\n removeByProperty(this.localValue, contact, 'id');\n\n }\n\n if (this.onRemove.observers.length) {\n this.onRemove.emit(contact);\n\n }\n\n }\n\n getUsedIds(items: any) {\n const output = [];\n\n for (const item of items) {\n output.push(item.id);\n\n }\n\n return output;\n }\n\n searchContacts(query: string) {\n let usedIds = [];\n let params: any;\n\n if (!this.config.searchEntity) {\n this.options = this.onSearch(query);\n\n } else {\n\n if (this.localValue) usedIds = this.getUsedIds(this.localValue);\n\n params = {\n name: query,\n join: ['photo']\n };\n\n if (usedIds.length) params.id = this.QueryExpressionService.notIn(usedIds);\n\n if (this.config.searchParams) params = Object.assign({}, params, this.config.searchParams);\n\n this.options = this.SearchEntity.search(params);\n }\n }\n\n addContact() {\n this.isAddContactMode = true;\n }\n\n setContact(value: any) {\n this.handleAddContact(value);\n }\n\n removeContact(value: any) {\n this.handleRemoveContact(value);\n }\n\n cancelAddContact() {\n this.isAddContactMode = false;\n }\n\n goToEmployee = (person: any) => {\n\n if (person._customerEmployee) {\n this.promanState.to('CustomerEmployee', { employeeId: person.id, customerId: person._customerEmployee.customer.id });\n }\n\n if (person._employee) {\n this.promanState.to('Employee', { employeeId: person.id });\n }\n\n };\n\n getEmployeeData = () => {\n const ids = this.localValue.map(mapId);\n if (ids?.length) Promise.all([\n this.ParametersOptions\n .search({\n entity: 'employee',\n entityParams: { id: this.QueryExpression.in(ids) }\n }),\n this.ParametersOptions\n .search({\n entity: 'customer_employee',\n entityParams: { id: this.QueryExpression.in(ids), join: ['customer'] }\n })\n ])\n .then((values: [Employee[], CustomerEmployee[]]) => {\n if (values[0]) {\n values[0].forEach((item) => {\n for (const person of this.localValue) {\n if (person.id === item.id) {\n person._employee = item;\n person.hasLink = true;\n break;\n }\n\n }\n });\n }\n if (values[1]) {\n values[1].forEach((item) => {\n for (const person of this.localValue) {\n if (person.id === item.id) {\n person.customer = item.customer;\n person._customerEmployee = item;\n person.hasLink = true;\n break;\n }\n\n }\n });\n }\n });\n };\n\n handleNotification(contact: { id: number, notified: boolean }) {\n contact.notified = true;\n this.Entity.get(this.entityType).sendNotification({ id: this.entity.id, person: contact.id });\n }\n\n}\n","import { Component, Input, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'pm-user-contacts-card',\n template: `\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\n\nexport class UserContactsCardComponent {\n @Input() user: any;\n\n constructor() {\n\n }\n\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'pm-update-data',\n template: `\n \n
\n {{ item[key + 'At'] | proDateTime }} \n
\n {{ item[key + 'By'].name }}\n \n
\n `\n})\n\nexport class UpdateDataComponent {\n @Input() item: any;\n @Input() key: string = 'updated';\n\n}\n","import { Component, OnDestroy, ElementRef, ViewChild, OnInit, Input, HostListener } from '@angular/core';\nimport { ObservablesService } from '@proman/services/observables.service';\n\nconst SIDENAV_CLASS = '.mat-sidenav.mat-drawer-side';\n\n@Component({\n selector: 'pm-bottom-toolbar',\n template: `\n \n \n
\n `\n})\nexport class BottomToolbarComponent implements OnDestroy, OnInit {\n @ViewChild('elementRef', { static: true }) elementRef: ElementRef;\n @Input() positionStatic: boolean = false;\n wrapperEl: Node;\n element: HTMLElement;\n\n constructor(\n private Observables: ObservablesService,\n ) {\n this.Observables.layout.subject.subscribe(() => this.setPosition());\n }\n\n ngOnInit() {\n this.element = this.elementRef.nativeElement;\n this.wrapperEl = this.element.parentNode;\n\n this.render();\n this.setPosition();\n }\n\n ngOnDestroy() {\n this.element.remove();\n }\n\n render() {\n let parentElement = document.querySelector('.Copyrights');\n\n setTimeout(() => {\n this.wrapperEl.parentElement.style.marginBottom = this.element.offsetHeight + 'px';\n }, 1000);\n\n parentElement?.parentNode.insertBefore(this.element, parentElement);\n }\n\n setPosition() {\n let sidenavElement = document.querySelector(SIDENAV_CLASS);\n\n if (sidenavElement) {\n setTimeout(() => {\n if (window.innerWidth > 425) {\n this.element.style.left = sidenavElement.offsetWidth + 'px';\n } else {\n this.element.style.left = '0';\n }\n });\n\n } else {\n setTimeout(() => this.setPosition(), 50);\n }\n\n }\n\n @HostListener('window:resize', ['$event'])\n onResize(event: any) {\n this.setPosition();\n }\n}\n","import { Component, Input, OnChanges } from '@angular/core';\nimport { Action } from '@proman/interfaces/object-interfaces';\n\n@Component({\n selector: 'pm-actions',\n template: `\n \n `\n})\n\nexport class ActionsComponent implements OnChanges {\n @Input() actions: Action[];\n\n constructor() {\n\n }\n\n ngOnChanges() {\n\n if (this.actions) {\n\n for (let action of this.actions) {\n\n if (typeof action.isVisible === 'undefined') action.isVisible = () => true;\n\n }\n\n }\n }\n\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'pm-frame',\n template: `\n \n \n
\n `,\n styles: [`\n .Frame {\n border-radius: inherit;\n box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12);\n width: 100%;\n position: relative;\n }\n `]\n})\n\nexport class FrameComponent {\n\n constructor() {}\n\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'pm-content',\n template: `\n \n \n
\n `,\n styles: ['.Content { overflow: auto; max-height: 100%; }']\n})\n\nexport class ContentComponent {\n @Input() height: number = 400;\n\n constructor() {}\n\n}\n","import * as i0 from '@angular/core';\nimport { InjectionToken, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Inject, ViewChild, Input, NgModule } from '@angular/core';\nimport { mixinColor, MatCommonModule } from '@angular/material/core';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\n\n// Boilerplate for applying mixins to MatProgressBar.\nconst _c0 = [\"determinateSpinner\"];\nfunction MatProgressSpinner_ng_template_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 11);\n i0.ɵɵelement(1, \"circle\", 12);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"viewBox\", ctx_r0._viewBox());\n i0.ɵɵadvance(1);\n i0.ɵɵstyleProp(\"stroke-dasharray\", ctx_r0._strokeCircumference(), \"px\")(\"stroke-dashoffset\", ctx_r0._strokeCircumference() / 2, \"px\")(\"stroke-width\", ctx_r0._circleStrokeWidth(), \"%\");\n i0.ɵɵattribute(\"r\", ctx_r0._circleRadius());\n }\n}\nconst _MatProgressSpinnerBase = /*#__PURE__*/mixinColor(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}, 'primary');\n/** Injection token to be used to override the default options for `mat-progress-spinner`. */\nconst MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS = /*#__PURE__*/new InjectionToken('mat-progress-spinner-default-options', {\n providedIn: 'root',\n factory: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY\n});\n/** @docs-private */\nfunction MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY() {\n return {\n diameter: BASE_SIZE\n };\n}\n/**\n * Base reference size of the spinner.\n */\nconst BASE_SIZE = 100;\n/**\n * Base reference stroke width of the spinner.\n */\nconst BASE_STROKE_WIDTH = 10;\nlet MatProgressSpinner = /*#__PURE__*/(() => {\n class MatProgressSpinner extends _MatProgressSpinnerBase {\n constructor(elementRef, animationMode, defaults) {\n super(elementRef);\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n this.mode = this._elementRef.nativeElement.nodeName.toLowerCase() === 'mat-spinner' ? 'indeterminate' : 'determinate';\n this._value = 0;\n this._diameter = BASE_SIZE;\n this._noopAnimations = animationMode === 'NoopAnimations' && !!defaults && !defaults._forceAnimations;\n if (defaults) {\n if (defaults.color) {\n this.color = this.defaultColor = defaults.color;\n }\n if (defaults.diameter) {\n this.diameter = defaults.diameter;\n }\n if (defaults.strokeWidth) {\n this.strokeWidth = defaults.strokeWidth;\n }\n }\n }\n /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\n get value() {\n return this.mode === 'determinate' ? this._value : 0;\n }\n set value(v) {\n this._value = Math.max(0, Math.min(100, coerceNumberProperty(v)));\n }\n /** The diameter of the progress spinner (will set width and height of svg). */\n get diameter() {\n return this._diameter;\n }\n set diameter(size) {\n this._diameter = coerceNumberProperty(size);\n }\n /** Stroke width of the progress spinner. */\n get strokeWidth() {\n return this._strokeWidth ?? this.diameter / 10;\n }\n set strokeWidth(value) {\n this._strokeWidth = coerceNumberProperty(value);\n }\n /** The radius of the spinner, adjusted for stroke width. */\n _circleRadius() {\n return (this.diameter - BASE_STROKE_WIDTH) / 2;\n }\n /** The view box of the spinner's svg element. */\n _viewBox() {\n const viewBox = this._circleRadius() * 2 + this.strokeWidth;\n return `0 0 ${viewBox} ${viewBox}`;\n }\n /** The stroke circumference of the svg circle. */\n _strokeCircumference() {\n return 2 * Math.PI * this._circleRadius();\n }\n /** The dash offset of the svg circle. */\n _strokeDashOffset() {\n if (this.mode === 'determinate') {\n return this._strokeCircumference() * (100 - this._value) / 100;\n }\n return null;\n }\n /** Stroke width of the circle in percent. */\n _circleStrokeWidth() {\n return this.strokeWidth / this.diameter * 100;\n }\n static {\n this.ɵfac = function MatProgressSpinner_Factory(t) {\n return new (t || MatProgressSpinner)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8), i0.ɵɵdirectiveInject(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatProgressSpinner,\n selectors: [[\"mat-progress-spinner\"], [\"mat-spinner\"]],\n viewQuery: function MatProgressSpinner_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._determinateCircle = _t.first);\n }\n },\n hostAttrs: [\"role\", \"progressbar\", \"tabindex\", \"-1\", 1, \"mat-mdc-progress-spinner\", \"mdc-circular-progress\"],\n hostVars: 16,\n hostBindings: function MatProgressSpinner_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-valuemin\", 0)(\"aria-valuemax\", 100)(\"aria-valuenow\", ctx.mode === \"determinate\" ? ctx.value : null)(\"mode\", ctx.mode);\n i0.ɵɵstyleProp(\"width\", ctx.diameter, \"px\")(\"height\", ctx.diameter, \"px\")(\"--mdc-circular-progress-size\", ctx.diameter + \"px\")(\"--mdc-circular-progress-active-indicator-width\", ctx.diameter + \"px\");\n i0.ɵɵclassProp(\"_mat-animation-noopable\", ctx._noopAnimations)(\"mdc-circular-progress--indeterminate\", ctx.mode === \"indeterminate\");\n }\n },\n inputs: {\n color: \"color\",\n mode: \"mode\",\n value: \"value\",\n diameter: \"diameter\",\n strokeWidth: \"strokeWidth\"\n },\n exportAs: [\"matProgressSpinner\"],\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 14,\n vars: 11,\n consts: [[\"circle\", \"\"], [\"aria-hidden\", \"true\", 1, \"mdc-circular-progress__determinate-container\"], [\"determinateSpinner\", \"\"], [\"xmlns\", \"http://www.w3.org/2000/svg\", \"focusable\", \"false\", 1, \"mdc-circular-progress__determinate-circle-graphic\"], [\"cx\", \"50%\", \"cy\", \"50%\", 1, \"mdc-circular-progress__determinate-circle\"], [\"aria-hidden\", \"true\", 1, \"mdc-circular-progress__indeterminate-container\"], [1, \"mdc-circular-progress__spinner-layer\"], [1, \"mdc-circular-progress__circle-clipper\", \"mdc-circular-progress__circle-left\"], [3, \"ngTemplateOutlet\"], [1, \"mdc-circular-progress__gap-patch\"], [1, \"mdc-circular-progress__circle-clipper\", \"mdc-circular-progress__circle-right\"], [\"xmlns\", \"http://www.w3.org/2000/svg\", \"focusable\", \"false\", 1, \"mdc-circular-progress__indeterminate-circle-graphic\"], [\"cx\", \"50%\", \"cy\", \"50%\"]],\n template: function MatProgressSpinner_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, MatProgressSpinner_ng_template_0_Template, 2, 8, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementStart(2, \"div\", 1, 2);\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(4, \"svg\", 3);\n i0.ɵɵelement(5, \"circle\", 4);\n i0.ɵɵelementEnd()();\n i0.ɵɵnamespaceHTML();\n i0.ɵɵelementStart(6, \"div\", 5)(7, \"div\", 6)(8, \"div\", 7);\n i0.ɵɵelementContainer(9, 8);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(10, \"div\", 9);\n i0.ɵɵelementContainer(11, 8);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(12, \"div\", 10);\n i0.ɵɵelementContainer(13, 8);\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n const _r1 = i0.ɵɵreference(1);\n i0.ɵɵadvance(4);\n i0.ɵɵattribute(\"viewBox\", ctx._viewBox());\n i0.ɵɵadvance(1);\n i0.ɵɵstyleProp(\"stroke-dasharray\", ctx._strokeCircumference(), \"px\")(\"stroke-dashoffset\", ctx._strokeDashOffset(), \"px\")(\"stroke-width\", ctx._circleStrokeWidth(), \"%\");\n i0.ɵɵattribute(\"r\", ctx._circleRadius());\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"ngTemplateOutlet\", _r1);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngTemplateOutlet\", _r1);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngTemplateOutlet\", _r1);\n }\n },\n dependencies: [i1.NgTemplateOutlet],\n styles: [\"@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}.mat-mdc-progress-spinner{--mdc-circular-progress-active-indicator-width:4px;--mdc-circular-progress-size:48px}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner circle{stroke-width:var(--mdc-circular-progress-active-indicator-width)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-1 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-2 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-3 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-4 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner .mdc-circular-progress{width:var(--mdc-circular-progress-size) !important;height:var(--mdc-circular-progress-size) !important}.mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatProgressSpinner;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @deprecated Import Progress Spinner instead. Note that the\n * `mat-spinner` selector isn't deprecated.\n * @breaking-change 16.0.0\n */\n// tslint:disable-next-line:variable-name\nconst MatSpinner = MatProgressSpinner;\nlet MatProgressSpinnerModule = /*#__PURE__*/(() => {\n class MatProgressSpinnerModule {\n static {\n this.ɵfac = function MatProgressSpinnerModule_Factory(t) {\n return new (t || MatProgressSpinnerModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatProgressSpinnerModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule, MatCommonModule]\n });\n }\n }\n return MatProgressSpinnerModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS, MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY, MatProgressSpinner, MatProgressSpinnerModule, MatSpinner };\n","import { ChangeDetectorRef, Component, OnInit } from '@angular/core';\nimport { CONFIG } from '@proman/config';\nimport { RequestService } from '@proman/services/request.service';\n\n@Component({\n selector: 'pm-update',\n template: `\n \n \n\n
\n `,\n styles: [\n ':host { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; z-index: 9999; background-color: rgba(255, 255, 255, 0.95); }'\n ]\n})\n\nexport class UpdateComponent implements OnInit {\n\n constructor(\n private Request: RequestService,\n private cd: ChangeDetectorRef,\n ) {\n this.cd.markForCheck();\n }\n\n ngOnInit() {\n this.refresh();\n\n this.cd.markForCheck();\n }\n\n refresh = () => {\n const reload = () => setTimeout(() => {\n this.refresh();\n\n }, 5000);\n\n this.Request.get(`${CONFIG.root}ping`)\n .then((response: any) => {\n\n response.deploy ?\n reload() :\n window.location.reload();\n\n })\n .catch(() => reload());\n };\n\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogRef } from '@angular/material/legacy-dialog';\nimport { Entity } from '@proman/services/entity.service';\nimport { mapOption, mapOptionTranslate, parseTimeUtc, prepareRequest, twoDigit } from '@proman/utils';\nimport moment from 'moment';\nimport { FilterService } from '@proman/services/filter.service';\nimport { DynamicFieldsService } from '@proman/services/dynamic-fields.service';\nimport { ModelItemInterface, ModelService } from '@proman/services/model.service';\nimport { ConsumerBookingEntityInterface } from '@proman/resources/consumer_booking';\nimport { OrderConsumerBooking } from '@proman/interfaces/entity-interfaces';\nimport { SelectOption } from '@proman/interfaces/object-interfaces';\n\nconst STATUSES = ['created', 'confirmed'];\n\n@Component({\n selector: 'pm-consumer-booking-dialog',\n template: `\n \n \n\n
\n
\n\n
\n\n
\n\n
\n
\n\n
\n\n
\n\n
\n\n
\n
\n
{{ 'day_shorthand' | translate }} \n
\n
{{ 'hour_shorthand' | translate }} \n
\n
\n
{{ 'minute_shorthand' | translate }} \n
\n\n
\n\n
\n\n
\n\n
\n\n
\n\n
\n\n
\n\n
\n \n `\n})\n\nexport class ConsumerBookingDialogComponent {\n consumerBookingEntity: ConsumerBookingEntityInterface;\n item: OrderConsumerBooking;\n statusOptions: SelectOption[];\n dynamicFieldsData: any;\n dynamicFieldsValid: any;\n model: ModelItemInterface;\n\n duration: number = 2 * 60 * 60;\n durationData: { days: string; hours: string; minutes: string } = { days: '00', hours: '02', minutes: '00' };\n startTimeData: { hours: string; minutes: string } = { hours: '02', minutes: '00' };\n dayValues: string[] = ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25' , '26', '27', '28', '29', '30']\n hoursValues: string[] = ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23'];\n minutesValues: string[] = ['00', '15', '30', '45'];\n hoursOptions: SelectOption[];\n minutesOptions: SelectOption[];\n daysOptions: SelectOption[];\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: any,\n private Entity: Entity,\n private Filter: FilterService,\n private Model: ModelService,\n private DynamicFields: DynamicFieldsService,\n private dialogRef: MatLegacyDialogRef,\n ) {\n this.consumerBookingEntity = this.Entity.get('consumer_booking');\n this.statusOptions = STATUSES.map((item: string) => mapOptionTranslate(item, this.Filter.translate));\n this.hoursOptions = this.hoursValues.map(mapOption);\n this.daysOptions = this.dayValues.map(mapOption);\n this.minutesOptions = this.minutesValues.map(mapOption);\n\n this.item = this.data.item && this.data.item.id ? this.data.item : {};\n\n if (!this.item.id) {\n const startTime = moment().startOf('hour').add(1, 'h').format();\n\n this.item = {\n start: parseTimeUtc(moment().startOf('hour').add(1, 'h').format()),\n end: parseTimeUtc(moment(startTime).add(this.duration, 's').format()),\n status: STATUSES[0],\n } as OrderConsumerBooking;\n\n } else {\n const start = moment(this.item.start);\n const end = moment(this.item.end);\n\n this.duration = moment.duration(end.diff(start)).asSeconds();\n }\n\n this.model = this.Model.get(this.item, 'consumer_booking');\n\n this.calculateTimeOptions();\n this.calculateDurationOptions();\n\n }\n\n set(property: string, value: any) {\n const item = this.item;\n\n this.item[property] = value;\n\n if (item.id) {\n this.consumerBookingEntity\n .update(prepareRequest({\n id: item.id,\n [property]: value\n }));\n }\n\n if (property === 'start') return this.setEnd();\n\n }\n\n calculateTimeOptions() {\n const start = this.item.start;\n\n this.startTimeData.hours = twoDigit(moment(start).hours());\n this.startTimeData.minutes = twoDigit(moment(start).minutes());\n }\n\n calculateDurationOptions() {\n const durationInSeconds = this.duration;\n\n const day = Math.floor(durationInSeconds / (24 * 60 * 60));\n const hour = Math.floor((durationInSeconds - day * 24 * 60 * 60) / 60 / 60);\n const seconds = Math.floor((durationInSeconds - (day * 24 + hour) * 60 * 60) / 60);\n\n this.durationData.days = twoDigit(day);\n this.durationData.hours = twoDigit(hour);\n this.durationData.minutes = twoDigit(seconds);\n }\n\n setDuration(value: number) {\n this.duration = value;\n\n this.setEnd();\n }\n\n setEnd = () => {\n this.set('end', parseTimeUtc(moment(this.item.start).add(this.duration, 's').subtract(moment(this.item.start).utcOffset(), 'm').format()));\n };\n\n create() {\n this.consumerBookingEntity\n .create(prepareRequest(this.item))\n .then(async (response: any) => {\n const result = response.data || response;\n let requests: any = [];\n\n this.dynamicFieldsData.forEach((item: any) => {\n requests.push(this.DynamicFields.createFieldValue(Object.assign({ entityId: result }, item)));\n });\n\n return await Promise.all(requests)\n .then(() => this.dialogRef.close(result))\n .catch(() => this.dialogRef.close(result));\n });\n }\n\n handleDynamicFields(data: any) {\n this.dynamicFieldsValid = data.isValid;\n this.dynamicFieldsData = data.values;\n }\n\n setStartTimeData(property: string, value: string) {\n let date = property === 'date' ? value : this.item.start;\n\n const startTimeData = this.startTimeData;\n\n startTimeData[property] = value;\n\n const startValue = moment(date).hours(+startTimeData.hours).minutes(+startTimeData.minutes).utc().format();\n\n this.set('start', startValue);\n\n }\n\n setDurationData(property: string, value: string) {\n const durationData = this.durationData;\n\n durationData[property] = value;\n\n this.setDuration(((+durationData.days * 24 + +durationData.hours) * 60 + +durationData.minutes) * 60);\n }\n\n}\n","export const ENTITY_TO_STATE = {\n sale_opportunity: 'SaleOpportunity',\n development_project: 'DevelopmentProject',\n order: 'OrderInfo',\n employee: 'Employee',\n production: 'Production',\n workplace: 'Workplace',\n purchase: 'Purchase',\n sale_event: 'SaleEvent',\n};\n\nexport const ENTITY_TABLE_STATE = [\n {\n entity: 'sale_opportunity',\n table: 'sale_opportunity_projects',\n state: 'SaleOpportunity'\n },\n {\n entity: 'development_project',\n table: 'development_project',\n state: 'DevelopmentProject'\n },\n {\n entity: 'order',\n table: 'orders',\n state: 'OrderInfo'\n },\n {\n entity: 'production_operation',\n table: 'events',\n state: 'Event'\n },\n {\n entity: 'production',\n table: 'production',\n state: 'Production'\n },\n {\n entity: 'article',\n table: 'articles',\n state: 'ArticleInfo'\n },\n {\n entity: 'material',\n table: 'materials',\n state: 'Material'\n },\n {\n entity: 'product',\n table: 'products',\n state: 'Product'\n },\n {\n entity: 'shipment',\n table: 'shipments',\n state: 'Shipment'\n },\n];\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n OnChanges,\n OnInit,\n ViewEncapsulation\n} from '@angular/core';\nimport { Entity, EntityNameType } from '@proman/services/entity.service';\nimport { FilterService } from '@proman/services/filter.service';\nimport { InputDialogComponent } from '@frontend/shared/components/input-dialog.component';\nimport { Dialog } from '@frontend/shared/services/dialog.service';\nimport { ParametersOptionsService } from '@proman/services/parameters-options.service';\nimport { ACL, PermissionType } from '@proman/services/acl.service';\nimport { ConsumerBookingDialogComponent } from '../../orders/components/consumer-booking-dialog.component';\nimport { PromanStateService } from '@frontend/shared/services/proman-state.service';\nimport { ENTITY_TO_STATE } from '@proman/resources/entity_to_state';\nimport { isSmarton } from \"@proman/utils\";\nimport { PromanRequest } from '@proman/interfaces/object-interfaces';\nimport { Store } from '@ngrx/store';\nimport { Customer, LooseRelation, SystemOptions } from '@proman/interfaces/entity-interfaces';\nimport { QueryExpressionService } from '@proman/services/query-expression.service';\nimport { getSystemOptions } from '@proman/store/system-options';\nimport { LooseRelationEntityInterface } from '@proman/resources/loose_relation';\nimport { UiPreferencesService } from \"@proman/services/ui-preferences.service\";\nimport { InlineListService } from '@proman/inline-list/inline-list.service';\n\nconst STATES = {\n sale_opportunity: {\n name: 'SaleOpportunity',\n key: 'saleOpportunityId'\n },\n order: {\n name: 'OrderInfo',\n key: 'orderId'\n },\n production: {\n name: 'Production',\n key: 'productionId'\n },\n article: {\n name: 'Article',\n key: 'articleId'\n },\n development_project: {\n name: 'DevelopmentProject',\n key: 'developmentProjectId'\n },\n article_test: {\n name: 'ArticleTest',\n key: 'articleTestId'\n },\n consumer_booking: {\n name: 'ConsumerBookings',\n key: '',\n nameKey: 'comment',\n dialog: ConsumerBookingDialogComponent,\n extraGet: { join: ['files'] }\n },\n order_proposal: {\n name: 'OrderCreate',\n key: 'OrderCreate'\n },\n sale_event: {\n name: 'SalesEvent',\n key: 'saleEventId'\n },\n};\n\n@Component({\n selector: 'pm-loose-relation',\n template: `\n \n
\n
\n {{ 'relations' | translate }}\n \n\n
\n
\n
\n\n\n
\n\n
\n\n
\n `,\n styles: [`\n .Relation {\n padding: 4px;\n }\n\n .warn {\n color: #F44336;\n }\n\n .dark-mode .warn {\n color: #ff6c6c;\n }\n\n .relationContent {\n white-space: nowrap;\n overflow: hidden;\n display: block;\n text-overflow: ellipsis;\n }\n `],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\n\nexport class LooseRelationComponent implements OnInit, OnChanges {\n @Input() item: { name: string; id: number; customer?: Customer };\n @Input() entityName: string;\n @Input() disabled: boolean;\n\n relations: LooseRelation[]\n looseRelationEntity: LooseRelationEntityInterface;\n _inited: boolean = false;\n systemOptions: SystemOptions;\n\n constructor(\n private cd: ChangeDetectorRef,\n private ACL: ACL,\n private Dialog: Dialog,\n private Entity: Entity,\n private Filter: FilterService,\n private InlineList: InlineListService,\n private PromanState: PromanStateService,\n private store: Store,\n private QueryExpression: QueryExpressionService,\n private ParametersOptions: ParametersOptionsService,\n private UiPrefs: UiPreferencesService,\n ) {\n this.looseRelationEntity = this.Entity.get('loose_relation');\n this.store.select(getSystemOptions)\n .subscribe((value) => this.systemOptions = value);\n }\n\n ngOnChanges() {\n if (this._inited) this.ngOnInit();\n }\n\n ngOnInit() {\n\n this.looseRelationEntity.getRelations({ tableName: this.entityName, entityId: this.item.id })\n .then((response) => {\n if (!response) return;\n this.relations = response;\n\n this.relations.forEach((item) => {\n const fromState = STATES[item.fromTableName].name;\n const fromParams = item.fromEntityId;\n\n const toState = STATES[item.toTableName].name;\n const toParams = item.toEntityId;\n\n const from = item.fromTableName === this.entityName && parseInt(item.fromEntityId) === this.item.id;\n\n item._relation = item.looseRelationType[from ? 'fromName' : 'toName'];\n\n item['a'] = {\n entityName: from ? item.fromTableName : item.toTableName,\n id: from ? item.fromEntityId : item.toEntityId,\n name: from ? fromState : toState,\n params: from ? fromParams : toParams,\n nameKey: STATES[from ? item.fromTableName : item.toTableName].nameKey || 'name'\n };\n\n item['b'] = {\n entityName: !from ? item.fromTableName : item.toTableName,\n id: !from ? item.fromEntityId : item.toEntityId,\n name: !from ? fromState : toState,\n params: !from ? fromParams : toParams,\n nameKey: STATES[!from ? item.fromTableName : item.toTableName].nameKey || 'name'\n };\n\n item.style = { color: `#${item.looseRelationType.color}` };\n\n if (this.ACL.check(`${item.a.entityName}.view` as PermissionType) || (this.entityName === 'sale_opportunity' && this.ACL.check('sale_opportunity.view'))) {\n this.ParametersOptions\n .get({ entity: item.a.entityName as EntityNameType, entityParams: { id: item.a.id, select: [item.a.nameKey] } })\n .then((response) => {\n item.a._name = response[item.a.nameKey] || item.a.name;\n this.cd.markForCheck();\n })\n .catch(() => {\n item.a._name = '';\n });\n }\n\n if (this.ACL.check(`${item.b.entityName}.view` as PermissionType) || (this.entityName === 'sale_opportunity' && this.ACL.check('sale_opportunity.view'))) {\n this.ParametersOptions\n .get({ entity: item.b.entityName as EntityNameType, entityParams: { id: item.b.id, select: [item.b.nameKey] } })\n .then((response) => {\n item.b._name = response[item.b.nameKey] || item.b.name;\n this.cd.markForCheck();\n })\n .catch(() => {\n item.b._name = '';\n });\n }\n\n });\n\n this.cd.markForCheck();\n\n this._inited = true;\n });\n }\n\n getOptions = (entity: EntityNameType) => {\n\n const getSearchRequest = (query: string) => {\n let searchRequest: PromanRequest<{}> = { search: { id: query, name: query }, limit: 50 };\n\n if (entity === 'consumer_booking') {\n searchRequest = { search: { id: query, name: query, comment: query, start: query }, limit: 50 };\n }\n\n if (entity !== 'article' && entity !== 'production') {\n if (!this.ACL.check('customer.view_all') && this.item.customer) {\n searchRequest['customer.id'] = this.item.customer.id;\n } else if (this.systemOptions.projectsRelationsSameCustomer && this.item.customer) {\n searchRequest['customer.id'] = this.item.customer.id;\n }\n }\n\n return searchRequest;\n\n };\n\n return (query: string) => this.Entity\n .get({ name: entity })\n .search(getSearchRequest(query))\n .then((response: Array<{ id: number; name?: string; comment?: string }>) => {\n if (entity === 'consumer_booking') {\n response.forEach((item) => item.name = item.comment);\n }\n\n return response;\n });\n };\n\n handleAdd($event: Event) {\n let defaultVal: any;\n let data: any = [\n { id: 'sale_opportunity', name: this.Filter.translate('sale') },\n { id: 'development_project', name: this.Filter.translate('development') },\n ];\n\n if (this.ACL.check('order.view')) data.push({ id: 'order', name: this.Filter.translate('order') });\n if (this.ACL.check('order_proposal.view')) data.push({ id: 'order_proposal', name: this.Filter.translate('order_proposal') });\n if (isSmarton()) data.push({ id: 'consumer_booking', name: this.Filter.translate('consumer_booking') });\n\n if (this.entityName === 'article_test') {\n if (this.ACL.check('article.view')) data.push({ id: 'article', name: this.Filter.translate('article') });\n if (this.ACL.check('production.view')) data.push({ id: 'production', name: this.Filter.translate('production') });\n }\n\n if (this.entityName === 'sale_opportunity') {\n data.push({ id: 'sale_event', name: this.Filter.translate('sale_event') });\n }\n\n this.Entity.get('loose_relation_type')\n .get()\n .then((response: any) => defaultVal = response);\n\n this.InlineList.show({\n data,\n event: $event,\n closeOnSelect: true,\n onSelect: (item: any) => {\n\n this.Dialog\n .open(InputDialogComponent, {\n mainField: { key: 'object', name: 'object', type: 'autocomplete', config: { getOptions: this.getOptions(item.id) } },\n parameters: [{ key: 'type', name: 'type', type: 'autocomplete', config: { entity: 'loose_relation_type' }, value: defaultVal }],\n header: 'add',\n variant: 'add'\n },\n {\n width: '500px'\n })\n .then((result: any) => {\n if (!(result && result.type && result.object)) return;\n\n this.Entity\n .get('loose_relation')\n .create({\n fromTableName: this.entityName,\n fromEntityId: this.item.id,\n toTableName: item.id,\n toEntityId: result.object,\n looseRelationType: result.type\n })\n .then(() => this.ngOnInit());\n\n });\n\n }\n });\n\n }\n\n removeRelation(item: any) {\n this.looseRelationEntity\n .remove({ id: item.id })\n .then(() => this.ngOnInit());\n }\n\n async handleRelationClick(relation: LooseRelation, event: MouseEvent) {\n\n if (!relation.b._name) return;\n\n const entity = relation.b.entityName;\n const state = ENTITY_TO_STATE[relation.b.entityName];\n\n const isNewTab = !!(event.ctrlKey || event.metaKey);\n\n if (!!state) {\n this.PromanState.to(state, relation.b.id, null, isNewTab);\n\n } else if (STATES[entity].dialog) {\n let item = await this.Entity.get(entity as EntityNameType).get(Object.assign(STATES[entity].extraGet || {}, { id: relation.b.id }));\n\n this.Dialog.open2(STATES[entity].dialog, { item }, { disableAutoFocus: true });\n\n } else if (relation.toTableName === 'order_proposal') {\n this.UiPrefs.set('activeOrderProposal', relation.b.id);\n this.PromanState.to('OrderCreate', null, null, isNewTab);\n }\n\n }\n\n}\n","import { Component, Input, ChangeDetectionStrategy, ChangeDetectorRef, OnInit, OnChanges } from '@angular/core';\n\n@Component({\n selector: 'pm-errors',\n template: `\n @for (e of errorValues; track $index) {\n {{ e }} \n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\n\nexport class ErrorsComponent implements OnInit, OnChanges {\n @Input() errors: any;\n errorValues: any;\n\n constructor(\n private cd: ChangeDetectorRef\n ) {\n\n }\n\n ngOnInit() {\n\n }\n\n ngOnChanges() {\n this.handleErrors();\n\n this.cd.markForCheck();\n }\n\n handleErrors() {\n this.errorValues = [];\n\n for (const key in this.errors) {\n const error = this.errors[key];\n\n this.errorValues.push(`error.${error.code} ${error.value && error.value.join(', ') || error.message}`);\n }\n\n }\n\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogRef } from '@angular/material/legacy-dialog';\nimport { UntypedFormGroup } from '@angular/forms';\nimport { Entity } from '@proman/services/entity.service';\nimport { Store } from '@ngrx/store';\nimport { getCurrUser } from '@proman/store/curr-user';\nimport { filter } from 'rxjs/operators';\n\n@Component({\n selector: 'pm-bug-tracker-dialog',\n template: `\n \n `\n})\n\nexport class BugTrackerDialogComponent {\n form: UntypedFormGroup = new UntypedFormGroup({});\n bugTrackerEntity: any;\n message: any;\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) private data: any,\n private Entity: Entity,\n private store: Store,\n private dialogRef: MatLegacyDialogRef\n ) {\n this.bugTrackerEntity = this.Entity.get('bug_tracker');\n this.store.select(getCurrUser).pipe(filter(value => !!value))\n .subscribe((currUser) => {\n this.message = {\n person: currUser.person.id,\n screenshot: this.data.screenshot,\n url: this.data.url,\n comment: ''\n };\n });\n }\n\n set(property: any, value: any) {\n this.message[property] = value;\n };\n\n confirm() {\n this.bugTrackerEntity\n .postRequest('post', this.message)\n .then(() => {\n this.dialogRef.close(1);\n });\n };\n}\n","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\nimport { findById } from '@proman/utils';\n\n@Component({\n selector: 'pm-tree-select',\n template: `\n \n
\n {{ config.label | translate }}
\n
\n
\n `\n})\n\nexport class TreeSelectComponent implements OnInit, OnChanges {\n @Input() value: any;\n @Input() config: any = {};\n @Input() options: any;\n @Output() onChange: EventEmitter = new EventEmitter();\n\n tmpVal: any;\n\n ngOnInit() {\n this.tmpVal = this.getTmpValue(this.value, this.options);\n\n if (!this.config.disabled) this.config.disabled = () => false;\n }\n\n ngOnChanges(changes: SimpleChanges) {\n let value = changes.value;\n let options = changes.options;\n\n if (value && !value.isFirstChange()) {\n this.tmpVal = this.getTmpValue(value.currentValue, null);\n\n }\n\n if (options && !options.isFirstChange()) {\n this.tmpVal = this.getTmpValue(null, options.currentValue);\n\n }\n\n }\n\n getTmpValue(value: any, options: any) {\n let tmpOptions = options || this.options;\n let tmpValue = value || this.value;\n\n if (tmpValue && tmpOptions) {\n return findById(tmpOptions, tmpValue);\n\n }\n\n }\n}\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'pm-entity-category-recursive',\n template: `\n \n
\n
\n {{ category.id }} - {{ category.name }}\n
\n
\n
\n
\n
\n\n `,\n styles: [`\n ._category-children {\n margin: 8px 0;\n padding: 0px 16px;\n border-left: 2px dashed #BFBFBF;\n }\n `]\n})\n\nexport class EntityParentCategoryRecursiveComponent implements OnInit {\n @Input() category: any;\n @Input() isEditMode: boolean;\n @Output() toggle: EventEmitter = new EventEmitter();\n\n constructor(\n\n ) {\n\n }\n\n ngOnInit() {\n\n }\n\n handleToggle = (field: string, category: any, value: boolean) => {\n this.toggle.emit({ field, category, value });\n };\n\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { Entity, EntityNameType } from '@proman/services/entity.service';\nimport { ModelService } from '@proman/services/model.service';\nimport { flatten } from '@proman/utils';\n\n@Component({\n selector: 'pm-entity-parent-categories',\n template: `\n \n `\n})\n\nexport class EntityParentCategoriesComponent implements OnInit {\n @Input() entity: any;\n @Input() entityName: EntityNameType;\n @Input() entityParams: any;\n @Input() disabled: boolean;\n\n isEditMode: boolean = false;\n model: any;\n entityCategoryEntity: any;\n categories: any;\n\n constructor(\n private Entity: Entity,\n private Model: ModelService,\n ) {\n\n }\n\n ngOnInit() {\n const entity = this.Entity.get({ name: this.entityName });\n\n this.entityCategoryEntity = this.Entity.get({ name: (this.entityName + '_category' as EntityNameType) });\n\n this.model = this.Model.get(this.entity, entity);\n\n let treeParams = Object.assign({ tree: true }, this.entityParams || {});\n let categoryParams = Object.assign({ }, this.entityParams || {});\n\n categoryParams[`${this.entityName}s.id`] = this.entity.id;\n\n Promise.all([\n this.entityCategoryEntity.search(treeParams),\n this.entityCategoryEntity.search(categoryParams)\n ])\n .then((response: any) => {\n let categoriesTree = response[0];\n let selectedCategories = response[1];\n let selectedCategoriesIds = flatten(selectedCategories, 'id');\n\n this.getEnabled(categoriesTree, selectedCategoriesIds);\n\n this.categories = categoriesTree;\n });\n }\n\n getEnabled = (categories: any, selectedCategoriesIds: any, parent?: any, root?: any): any => {\n let t;\n\n for (let category of categories) {\n\n if (category.__children?.length) {\n\n if (selectedCategoriesIds.indexOf(category.id) > -1) {\n category.isEnabled = true;\n if (parent) {\n t = true;\n\n parent.isActiveParent = true;\n }\n\n }\n\n t = this.getEnabled(category.__children, selectedCategoriesIds, category, root || category);\n\n if (parent && t) {\n parent.isActiveParent = true;\n category.isActiveParent = true;\n }\n\n } else {\n\n if (selectedCategoriesIds.indexOf(category.id) > -1) {\n category.isEnabled = true;\n\n if (parent) {\n t = true;\n\n if (!parent.isActiveParent) {\n parent.isActiveParent = true;\n\n this.enableAllParents(parent, root || category)\n\n }\n\n }\n }\n }\n }\n\n return t;\n };\n\n private enableAllParents(parent: any, root: any) {\n if (parent.__children?.length) {\n\n if (parent.root === root.id) {\n root.isActiveParent = true;\n }\n\n }\n\n }\n\n toggleEditMode = () => this.isEditMode = !this.isEditMode;\n\n toggle = (field: string, value: any, added: boolean) => {\n return this.model[(added ? 'removeAssociation' : 'addAssociation')](field, value);\n };\n\n}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'pm-category-recursive',\n template: `\n \n\n `,\n styles: ['.CategoryRecursive--Children { margin: 8px 0; padding: 0 16px; border-left: 2px dashed #BFBFBF; }']\n})\n\nexport class CategoryRecursiveComponent {\n @Input() category: any;\n @Input() isEditMode: boolean;\n @Output() onToggle: EventEmitter = new EventEmitter();\n\n constructor() {\n\n }\n\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogRef } from '@angular/material/legacy-dialog';\nimport { Entity, EntityNameType } from '@proman/services/entity.service';\nimport { mapOptionTranslate, prepareRequest } from '@proman/utils';\nimport { FilterService } from '@proman/services/filter.service';\nimport { MATERIAL_STOCK } from '@proman/resources/material';\nimport {AccountCategory} from \"@proman/interfaces/entity-interfaces\";\nimport { ToastService } from '@proman/services/toast.service';\n\n@Component({\n selector: 'pm-category-create-dialog',\n template: `\n \n \n \n `\n})\n\nexport class CreateCategoryDialogComponent {\n entityName: EntityNameType;\n entity: any;\n treeSelectConfig: any;\n parents: any;\n category: any = {};\n header: string;\n typeOptions: any[];\n metadataOptions: any[];\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: any,\n private Entity: Entity,\n private Toast: ToastService,\n private Filter: FilterService,\n public dialogRef: MatLegacyDialogRef\n ) {\n this.entityName = data.entity;\n this.entity = Entity.get({ name: this.entityName as EntityNameType });\n this.treeSelectConfig = { label: 'parent_category', disabled: () => false, isNone: true };\n\n if (this.entityName === 'account_category') {\n this.typeOptions = ['D', 'C'].map((type: string) => mapOptionTranslate(type, this.Filter.translate));\n this.category.parent = data.parent || null;\n if (this.category.entity && this.category.entityField) {\n this.getMetadataFields();\n }\n }\n\n this.loadCategories();\n\n this.setHeader();\n }\n\n set = (property: string, value: any) => {\n this.category[property] = value;\n };\n\n setEntity = (entity: string) => {\n this.category.entity = null;\n setTimeout(() => {\n this.set('entity', entity);\n this.getMetadataFields();\n });\n\n };\n\n confirm = () => {\n let category: any = this.category;\n let data: any = prepareRequest(category);\n\n if (this.data.entity === 'account_category') {\n data.rootParent = category.parent ? (category.parent.root || category.parent.id) : null;\n\n if (!category.keyName) {\n this.Toast.pop('error', 'error.illegal_argument');\n return;\n }\n\n }\n\n this.handleMaterialCategoryParams(data);\n this.entity.create(data).then((response: any) => this.dialogRef.close(response.data));\n };\n\n loadCategories = () => {\n let params: any = { _treeSort: true };\n this.handleMaterialCategoryParams(params);\n this.entity.search(params).then((data: any) => {\n this.parents = data;\n this.parents.map((category: AccountCategory) => category.name = this.getOptionName(category));\n });\n };\n\n getOptionName = (option: AccountCategory) => option.keyName ? `${option.keyName} - ${option.name}` : option.name;\n\n handleMaterialCategoryParams(params: any) {\n if (this.data.entity === 'material_category') {\n params.stock = this.data.inventory ? MATERIAL_STOCK.INVENTORY : MATERIAL_STOCK.MATERIAL;\n\n }\n }\n\n setHeader() {\n\n switch (this.data.entity) {\n\n case 'article_category':\n this.header = 'new_article_category';\n break;\n\n case 'material_category':\n this.header = 'new_material_category';\n break;\n\n case 'account_category':\n this.header = 'new_account_category';\n break;\n\n default:\n this.header = 'create'\n\n }\n\n }\n\n getMetadataFields = () => {\n this.Entity.get('public/metadata')\n .customizedRequest(this.category.entity)\n .then((response: { api: any; entity: { [key: string]: any } }) => {\n this.metadataOptions = [];\n for (let id of Object.keys(response.entity)) {\n const name = this.Filter.translate(id);\n this.metadataOptions.push({ id, name });\n }\n })\n };\n\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogRef } from '@angular/material/legacy-dialog';\nimport {Entity, EntityInterface, EntityNameType} from '@proman/services/entity.service';\nimport {AccountCategory, Role} from \"@proman/interfaces/entity-interfaces\";\nimport {TaxEntityInterface} from \"@proman/resources/tax\";\nimport {FilterService} from \"@proman/services/filter.service\";\nimport { findById } from '@proman/utils';\n\n@Component({\n selector: 'pm-tax-type-create-dialog',\n template: `\n \n \n
\n
\n
\n \n
\n \n
\n\n
\n
\n \n
\n \n
\n \n
\n \n
\n
\n\n \n \n `\n})\n\nexport class CreateTaxTypeDialogComponent {\n entityName: EntityNameType;\n taxEntityInterface: TaxEntityInterface\n taxTypesEntityInterface: EntityInterface\n typeDbit: string = 'D';\n typeCrdt: string = 'C';\n taxType: any;\n salaryParts: any[] = [];\n salaryPartsOptions: any[];\n taxesTypesOptions: any[] = [];\n parts: any[] = [];\n role: Role;\n type: any;\n accCatCrdt: any;\n accCatDbit: any;\n name: string = '';\n mode: string = '';\n ready: boolean = false;\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: any,\n private Entity: Entity,\n private Filter: FilterService,\n public dialogRef: MatLegacyDialogRef\n ) {\n this.mode = data.mode;\n\n if (this.mode === 'edit' && data.item) {\n this.role = data.item.role;\n this.type = data.item.type;\n this.typeDbit = data.item.typeDbit ?? '';\n this.typeCrdt = data.item.typeCrdt ?? '';\n for (let i = 0; i < 4; i++) this.parts[i] = data.item.parts ? (data.item.parts[i] ?? '') : '';\n this.accCatCrdt = data.item.accountCategoryCrdt;\n if (this.accCatCrdt) this.accCatCrdt.name = this.accCatCrdt ? this.getCategoryName(this.accCatCrdt) : '';\n this.accCatDbit = data.item.accountCategoryDbit;\n if (this.accCatDbit) this.accCatDbit.name = this.accCatDbit ? this.getCategoryName(this.accCatDbit) : '';\n this.name = data.item.name;\n }\n this.taxTypesEntityInterface = Entity.get('tax_types');\n this.taxEntityInterface = Entity.get('tax');\n this.taxEntityInterface.getTaxTypesList().then((response) => {\n Object.values(response).forEach((type: any) =>\n this.taxesTypesOptions.push({ id: type, name: this.Filter.translate(type) }));\n }).then(() => {\n console.log(this.type, this.taxesTypesOptions, findById(this.taxesTypesOptions, { id: this.type }));\n if (this.mode === 'edit' && data.item) this.type = findById(this.taxesTypesOptions, { id: this.type });\n });\n\n this.Entity.get('employee').getSalaryParts().then((response) => {\n this.salaryPartsOptions = response;\n Object.keys(response).forEach((part: any) =>\n this.salaryParts.push({ id: part, name: this.salaryPartsOptions[part] }));\n this.ready = true;\n });\n }\n\n confirm = () => {\n this.taxTypesEntityInterface.create({\n name: this.name,\n typeCrdt: this.typeCrdt,\n typeDbit: this.typeDbit,\n accountCategoryDbit: this.accCatDbit?.id,\n accountCategoryCrdt: this.accCatCrdt?.id,\n parts: this.parts,\n type: this.type.id,\n role: this.role?.id,\n }).then((response: any) => this.dialogRef.close(response.data));\n };\n\n save = () => {\n this.taxTypesEntityInterface.update({\n id: this.data.item.id,\n name: this.name,\n typeCrdt: this.typeCrdt,\n typeDbit: this.typeDbit,\n accountCategoryDbit: this.accCatDbit?.id,\n accountCategoryCrdt: this.accCatCrdt?.id,\n parts: this.parts,\n type: this.type.id,\n role: this.role?.id,\n }).then((response: any) => this.dialogRef.close(response.data));\n };\n\n getCategoryName = (cat: AccountCategory) => cat ? `${cat.keyName} - ${cat.name}` : '';\n\n}\n","import { Injectable } from '@angular/core';\nimport { Entity } from '@proman/services/entity.service';\nimport { resourcesConfig } from '@proman/resources';\nimport { FilterService } from '@proman/services/filter.service';\nimport { WarehousesService } from '../../workplaces/warehouses.service';\nimport { Product, SystemOptions } from \"@proman/interfaces/entity-interfaces\";\nimport { CurrUser, TableField } from '@proman/interfaces/object-interfaces';\nimport { PromanStateService } from '../../shared/services/proman-state.service';\nimport { ProductEntityInterface } from '@proman/resources/product';\nimport { isDefinedNotNull, removeHtmlTags, uniq } from '@proman/utils';\nimport { Store } from \"@ngrx/store\";\nimport { getSystemOptions } from \"@proman/store/system-options\";\nimport { getCurrUser } from '@proman/store/curr-user';\nimport { filter } from 'rxjs/operators';\n\n@Injectable()\nexport class ProductsService {\n productEntity: ProductEntityInterface;\n systemOptions: SystemOptions;\n currUser: CurrUser;\n getExtraParameters = resourcesConfig['product'].params.extraParameters;\n\n constructor(\n private Entity: Entity,\n private Filter: FilterService,\n private PromanState: PromanStateService,\n private Warehouses: WarehousesService,\n private store: Store,\n ) {\n this.productEntity = this.Entity.get('product');\n this.store.select(getSystemOptions).subscribe(value => this.systemOptions = value);\n this.store.select(getCurrUser).pipe(filter((val) => !!val)).subscribe((value) => this.currUser = value);\n }\n\n private getName(customerAlias: any, articleCode?: any, name?: string) {\n\n if (!name) {\n this.Filter.translate('product');\n\n }\n\n return name;\n }\n\n getNew = (customerAlias: any) => {\n return {name: this.getName(customerAlias), quantity: 1};\n };\n\n private static getOrders(rowData: Product) {\n if (rowData.orderProducts) {\n return rowData.orderProducts\n .map((item) => item.order)\n .map((item) => item.name)\n .join(', ')\n }\n return '-';\n }\n\n getEntity = (): ProductEntityInterface => {\n return this.productEntity;\n };\n\n getStorageInfo = (id: number) => {\n return this.Entity.get('production_product')\n .search({\n 'orderProduct.product.id': id,\n 'join': [\n 'production',\n 'orderProduct',\n 'orderProduct.order',\n 'orderProduct.order.customer'\n ]\n })\n .then((response: any) => {\n return response\n .map((productionProduct: any) => {\n const order = productionProduct.orderProduct.order;\n\n return {\n orderId: order.id,\n orderName: order.name,\n orderNumber: order.number,\n customerName: order.customer.name,\n quantity: productionProduct.packagedQuantity,\n date: productionProduct.production.deadline\n };\n });\n });\n };\n\n getPackageName = (item: any) => {\n return `${item.material.name} ${this.Filter.quantName(item)}`;\n };\n\n getPackageValue = (row: any) => {\n if (!row.package) return '';\n\n return this.getPackageName(row.package);\n };\n\n getFields = (): TableField[] => {\n if (this.currUser.bookkeepingUser) {\n return [\n {\n name: 'ID',\n key: 'id'\n },\n {\n name: '',\n key: 'photo',\n formatter: 'image',\n },\n {\n name: 'name',\n key: 'name'\n },\n {\n name: 'lot_number',\n key: 'lotNumber',\n hidden: true,\n },\n {\n name: 'article',\n key: 'article.name',\n },\n {\n name: 'unit',\n key: 'unit',\n },\n {\n name: 'weight',\n key: 'weight',\n getValue: (row: Product) => `${row.weight || 0}${row.article?.weightUnit || ''}`,\n },\n {\n name: 'quantity',\n key: 'storedQuantity',\n filter: {\n type: 'numeric',\n value: '>0',\n userValueExpiry: 1000 * 60 * 60 * 24\n },\n stats: ['sum']\n },\n {\n name: 'minimum_quantity',\n key: 'minimumQuantity',\n stats: ['sum']\n },\n {\n name: 'reserved_quantity',\n key: 'reservedQuantity',\n stats: ['sum']\n },\n {\n name: 'remnant',\n key: 'remnantQuantity',\n hidden: true,\n filter: null,\n stats: ['sum']\n },\n {\n name: 'expire_duration',\n key: 'article.productExpireAfter',\n hidden: true,\n },\n {\n name: 'created_at',\n key: 'createdAt',\n formatter: 'dateTime'\n },\n this.Warehouses.getTableField(),\n {\n name: 'barcode',\n key: 'productBarcode.value',\n hidden: true,\n },\n {\n name: 'vat',\n key: 'vat',\n getValue: (item: Product) => item.vat ? (item.vat?.name + ' - ' + item.vat?.percentage + '%') : '',\n filter: {\n type: 'search',\n keys: ['vat.name', 'vat.percentage'],\n },\n hidden: true,\n },\n {\n name: 'price',\n key: 'cost',\n formatter: 'money',\n formatterConfig: 4,\n hidden: true,\n acl: 'product.show_price',\n },\n {\n name: 'sale_price',\n key: 'salePrice',\n formatter: 'money',\n formatterConfig: 4,\n hidden: true,\n acl: 'product.show_price',\n },\n {\n name: 'suppliers',\n key: 'suppliers.name',\n getValue: (product: Product) => product.suppliers.map((category) => category.name).join(', '),\n },\n ];\n }\n\n return [\n {\n name: 'ID',\n key: 'id'\n },\n {\n name: '',\n key: 'photo',\n formatter: 'image',\n },\n {\n name: 'name',\n key: 'name'\n },\n {\n name: 'lot_number',\n key: 'lotNumber',\n hidden: true,\n },\n {\n name: 'code',\n key: 'article.altName'\n },\n {\n name: 'article',\n acl: 'article.display',\n key: 'article.name',\n state: {\n name: 'Article',\n key: 'articleId',\n id: 'article.id'\n }\n },\n {\n name: 'weight',\n key: 'weight',\n getValue: (row: Product) => `${row.weight || 0}${row.article?.weightUnit || ''}`,\n },\n {\n name: 'type',\n key: 'article.type.name'\n },\n {\n name: 'article_categories',\n key: 'article.categories.name',\n getValue: (product: Product) => product.article.categories.filter((category) => !!category).map((category) => category.name).join(', '),\n hidden: true,\n },\n {\n name: 'orders',\n key: 'orderProducts.order.name',\n getValue: ProductsService.getOrders,\n sort: null,\n filter: {\n type: 'search',\n keys: [\n 'orderProducts.order.number',\n 'orderProducts.order.number',\n 'orderProducts.order.name'\n ]\n },\n maxLength: 5\n },\n {\n name: 'order_id',\n key: 'orderProducts.order.id',\n getValue: (row: Product) => {\n let result: number[] = [];\n\n row.orderProducts?.forEach((oP) => {\n result.push(oP.order.id);\n });\n\n result = uniq(result);\n\n return result.join(', ');\n },\n sort: null,\n },\n {\n name: 'validity',\n key: 'validity',\n translate: true,\n },\n {\n name: 'customer',\n key: 'orderProducts.order.customer.name',\n getValue: (item: Product) => {\n const result: string[] = [];\n item.orderProducts?.forEach((oProduct) => {\n if (oProduct.order && oProduct.order.customer) result.push(oProduct.order.customer.name);\n });\n\n return uniq(result).join(', ');\n },\n },\n {\n name: 'quantity',\n key: 'storedQuantity',\n filter: {\n type: 'numeric',\n value: '>0',\n userValueExpiry: 1000 * 60 * 60 * 24\n },\n stats: ['sum']\n },\n {\n name: 'minimum_quantity',\n key: 'minimumQuantity',\n stats: ['sum']\n },\n {\n name: 'reserved_quantity',\n key: 'reservedQuantity',\n stats: ['sum']\n },\n {\n name: 'remnant',\n key: 'remnantQuantity',\n hidden: true,\n filter: null,\n stats: ['sum']\n },\n {\n name: 'package_quantity',\n key: 'packagingQuantity',\n stats: ['sum']\n },\n {\n name: 'reserved_package_quantity',\n key: 'reservedPackagingQuantity',\n stats: ['sum']\n },\n {\n name: 'expire_date',\n key: 'expireAt',\n formatter: 'dateTime',\n formatterConfig: '_datetime_js',\n hidden: true,\n },\n {\n name: 'parameters',\n key: 'parameters',\n filter: {\n type: 'search',\n keys: ['parameters.parameter.name', 'parameters.parameter.alias', 'parameters.value'],\n },\n formatter: 'parameters',\n extraJoins: [\n 'parameters',\n 'parameters.parameter',\n ],\n preloadParametersData: true,\n hidden: true,\n },\n {\n name: 'status',\n key: 'status',\n translate: true\n },\n {\n name: 'created_at',\n key: 'createdAt',\n formatter: 'dateTime'\n },\n {\n name: 'warehouse',\n key: 'warehouseLocation.warehouse.name',\n getValue: (item: Product) => item.warehouseLocation && item.warehouseLocation.warehouse.name || '',\n hidden: true,\n },\n this.Warehouses.getTableField(),\n {\n name: 'store_location',\n key: 'storeLocation',\n hidden: true,\n },\n {\n name: 'store_name',\n key: 'storeName'\n },\n {\n name: 'barcode',\n key: 'productBarcode.value',\n hidden: true,\n },\n {\n name: 'vat',\n key: 'vat',\n getValue: (item: Product) => item.vat ? (item.vat?.name + ' - ' + item.vat?.percentage + '%') : '',\n filter: {\n type: 'search',\n keys: ['vat.name', 'vat.percentage'],\n },\n hidden: true,\n },\n {\n name: 'sale_price',\n key: 'salePrice',\n formatter: 'money',\n formatterConfig: 4,\n hidden: true,\n acl: 'product.show_price',\n },\n {\n name: 'capacity',\n key: 'capacity',\n hidden: true,\n formatter: 'numeric',\n formatterConfig: this.systemOptions.defaultDecimalPlacesProductWeight,\n getValue: (item: Product) => +item.storedQuantity * +item.capacity,\n stats: ['capacity']\n },\n {\n name: 'extent',\n key: 'extent',\n formatter: 'numeric',\n formatterConfig: this.systemOptions.defaultDecimalPlacesProductWeight,\n getValue: (item: Product) => +item.storedQuantity * +item.extent,\n hidden: true,\n stats: ['extent']\n },\n {\n name: 'comments',\n key: 'comments',\n getValue: (row) => isDefinedNotNull(row.comments) ? removeHtmlTags(row.comments) : '',\n },\n {\n name: 'customer_comments',\n key: 'customerComments',\n getValue: (row) => isDefinedNotNull(row.customerComments) ? removeHtmlTags(row.customerComments) : '',\n },\n ];\n };\n\n evaluatePackageQuantity(product: Product, packagingQuantity: number) {\n return this.productEntity\n .evaluatePackageQuantity({ id: product.id, packagingQuantity})\n .then((response: { data: number }) => response.data);\n }\n\n evaluateProductQuantity(product: Product, productQuantity: number) {\n return this.productEntity.evaluateProductQuantity({ id: product.id, productQuantity })\n .then((response: { data: number }) => response.data);\n }\n\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogRef } from '@angular/material/legacy-dialog';\nimport { ProductsService } from '../../products/services/products.service';\n\n@Component({\n selector: 'pm-product-storage-info-dialog',\n template: `\n \n \n
\n
\n \n \n {{ 'order' | translate }} \n {{ 'customer' | translate }} \n {{ 'date' | translate }} \n {{ 'quantity' | translate }} \n \n \n \n \n {{ record.orderNumber }} {{ record.orderName }} \n {{ record.customerName }} \n {{ record.date | proDateTime }} \n {{ record.quantity }} \n \n \n
\n
\n
\n \n\n `\n})\n\nexport class ProductStorageInfoDialogComponent {\n info: any;\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: any,\n productService: ProductsService,\n public dialogRef: MatLegacyDialogRef\n ) {\n productService\n .getStorageInfo(this.data.product.id)\n .then((response: any) => this.info = response);\n }\n\n}\n","import { Component, SimpleChanges, Input, Output, EventEmitter, OnChanges, OnInit } from '@angular/core';\nimport { ProductStorageInfoDialogComponent } from '../../events/components/product-storage-info-dialog.component';\nimport { Dialog } from '@frontend/shared/services/dialog.service';\nimport { TableButton, TableConfig } from '@proman/interfaces/object-interfaces';\nimport { ProductionContainerCreateDialogComponent } from '../../events/components/production-container-create-dialog.component';\nimport { ProductionOperation } from '@proman/interfaces/entity-interfaces';\nimport { ACL } from '@proman/services/acl.service';\n\n@Component({\n selector: 'pm-products-table',\n template: `\n \n \n \n `\n})\n\nexport class ProductsTableComponent implements OnInit, OnChanges {\n @Input() products: any;\n @Input() state: any;\n @Input() topButtons: any;\n @Input() showPackagedQuantity: boolean;\n @Input() showStorageInfo: boolean;\n @Input() showRequiredQuantity: boolean;\n @Input() showParameters: boolean;\n @Input() editPackagedQuantity: boolean;\n @Input() showStoredQuantity: boolean;\n @Input() editRequiredQuantity: boolean;\n @Input() removeProducts: boolean;\n @Input() header: any = null;\n @Input() tableTimeStamp: number;\n @Input() event: ProductionOperation;\n @Output() onRemove: EventEmitter = new EventEmitter();\n @Output() onEditPackagedQuantity: EventEmitter = new EventEmitter();\n @Output() onEditRequiredPackaging: EventEmitter = new EventEmitter();\n @Output() onEditRequiredQuantity: EventEmitter = new EventEmitter();\n\n isProductionProduct: boolean = false;\n tableConfig: TableConfig;\n tablePayload: any = { data: [], total: 0 };\n\n constructor(\n private ACL: ACL,\n private Dialog: Dialog,\n ) {\n\n }\n\n ngOnInit() {\n this.tableConfig = {\n hideSettings: true,\n multiselect: true,\n header: this.header,\n headerState: {\n name: 'Products'\n },\n aclRoot: 'product',\n preventFixedHeader: true,\n transform: (data: any) => {\n let name;\n let parameters;\n let storedQuantity;\n let requiredQuantity;\n let packagedQuantity;\n let packagingQuantity;\n\n for (let product of data) {\n\n if (product.parameters) {\n // product\n parameters = product.parameters;\n name = product.name;\n requiredQuantity = product.quantity;\n storedQuantity = product.storedQuantity;\n\n }\n\n if (product.product) {\n // order_product\n parameters = product.product.parameters;\n name = product.product.name;\n requiredQuantity = product.quantity;\n storedQuantity = product.product.storedQuantity;\n packagedQuantity = product.packagedQuantity;\n\n } else if (product.orderProduct) {\n // production_product\n\n parameters = product.orderProduct.product.parameters;\n name = product.orderProduct.product.name;\n requiredQuantity = product.productionQuantity;\n storedQuantity = product.orderProduct.product.storedQuantity;\n packagedQuantity = product.packagedQuantity;\n packagingQuantity = product.orderProduct.packagingQuantity;\n\n if (product.orderProduct.parentOrderProduct) name = ' ' + name;\n\n this.isProductionProduct = true;\n\n } else {\n throw Error('Unknown product subclass');\n\n }\n\n product._name = name;\n product.name = name;\n product.parameters = parameters;\n product._requiredQuantity = requiredQuantity;\n product._storedQuantity = storedQuantity;\n product._packagedQuantity = packagedQuantity;\n product._packagingQuantity = packagingQuantity;\n }\n\n this.updateButtons();\n\n return data;\n }\n };\n\n this.updateButtons();\n this.initFields();\n };\n\n ngOnChanges(changes: SimpleChanges) {\n let products = changes.products;\n let state = changes.state;\n let topButtons = changes.topButtons;\n let tableTimeStamp = changes.tableTimeStamp;\n\n if (products && Array.isArray(products.currentValue) && products.currentValue !== products.previousValue) {\n this.handleProducts(products.currentValue);\n\n }\n\n if (state && (state.currentValue !== state.previousValue)) {\n if (!this.tableConfig) return;\n\n this.updateButtons();\n this.initFields();\n this.refresh();\n\n }\n\n if (topButtons && topButtons.currentValue !== topButtons.previousValue) {\n this.tableConfig.topButtons = topButtons.currentValue;\n\n }\n\n if (tableTimeStamp && tableTimeStamp.currentValue) this.refresh();\n\n };\n\n refresh = () => this.tableTimeStamp = new Date().getTime();\n\n onRemoveCallback = (product: any) => {\n this.onRemove.emit(product);\n };\n\n onEditRequiredQuantityCallback = (product: any, requiredQuantity: number|string) => {\n this.onEditRequiredQuantity.emit({ product, requiredQuantity });\n };\n\n onEditRequiredPackagingCallback = (product: any, requiredPackaging: number|string) => {\n this.onEditRequiredPackaging.emit({ product, requiredPackaging });\n };\n\n onEditPackagedQuantityCallback = (product: any, packagedQuantity: number|string) => {\n this.onEditPackagedQuantity.emit({ product, packagedQuantity });\n };\n\n showStorageInfoCallback = (product: any) => {\n\n if (product.product) {\n product = product.product;\n\n } else if (product.orderProduct) {\n product = product.orderProduct.product;\n\n }\n\n this.Dialog.open2(ProductStorageInfoDialogComponent, { product });\n };\n\n updateButtons = () => {\n let removeAction: TableButton;\n\n this.tableConfig.rowButtons = [];\n\n if (this.showStorageInfo) {\n this.tableConfig.rowButtons.push({\n icon: 'question-circle',\n tooltip: 'show_orders',\n callback: this.showStorageInfoCallback,\n });\n\n }\n\n if (this.state) {\n\n if (this.onRemove.observers.length) {\n removeAction = {\n icon: 'trash',\n tooltip: 'delete',\n label: 'remove',\n action: 'remove',\n theme: 'warn',\n callback: this.onRemoveCallback\n };\n\n this.tableConfig.rowButtons.push(removeAction);\n\n this.tableConfig.actionButtons = [removeAction];\n\n }\n\n }\n\n if (this.isProductionProduct && this.event) {\n this.tableConfig.rowButtons.push({\n icon: 'barcode',\n tooltip: 'barcode',\n acl: null,\n callback: (productionProduct: any) => {\n this.Dialog.open(ProductionContainerCreateDialogComponent, {productionProduct, event: this.event})\n .then(this.refresh)\n }\n });\n }\n\n this.tableConfig = { ...this.tableConfig };\n };\n\n initFields = () => {\n this.tableConfig.fields = [];\n\n this.tableConfig.fields.push({\n name: 'product',\n key: 'orderProduct.product.name',\n sortable: false,\n filter: null,\n state: this.ACL.check('product.display') ? {\n name: 'Product',\n key: 'productId',\n id: 'orderProduct.product.id'\n } : null\n });\n\n if (this.showParameters) {\n this.tableConfig.fields.push({\n name: 'parameters',\n key: 'parameters',\n filter: null,\n sortable: false,\n formatter: 'parameters'\n });\n\n }\n\n if (this.showRequiredQuantity) {\n this.tableConfig.fields.push({\n name: 'required_quantity',\n key: 'requiredQuantity',\n filter: null,\n sortable: false,\n stats: ['sum'],\n });\n\n } else if (this.editRequiredQuantity) {\n this.tableConfig.fields.push({\n name: 'required_quantity',\n key: 'requiredQuantity',\n filter: null,\n sortable: false,\n formatter: 'input',\n callback: this.onEditRequiredQuantityCallback,\n stats: ['sum'],\n },\n {\n name: 'required_packaging',\n key: 'packagingQuantity',\n filter: null,\n sortable: false,\n formatter: 'input',\n callback: this.onEditRequiredPackagingCallback,\n stats: ['sum'],\n });\n\n }\n\n if (this.showPackagedQuantity) {\n this.tableConfig.fields.push({\n name: 'packaged_quantity',\n key: 'packagedQuantity',\n filter: null,\n sortable: false,\n stats: ['sum'],\n });\n\n } else if (this.editPackagedQuantity) {\n this.tableConfig.fields.push({\n name: 'packaged_quantity',\n key: 'packagedQuantity',\n filter: null,\n sortable: false,\n formatter: 'input',\n callback: this.onEditPackagedQuantityCallback,\n stats: ['sum'],\n });\n\n }\n\n if (this.showStoredQuantity) {\n this.tableConfig.fields.push({\n name: 'stored_quantity',\n key: 'storedQuantity',\n filter: null,\n sortable: false,\n stats: ['sum'],\n });\n\n }\n\n };\n\n handleProducts = (products: any) => {\n this.tablePayload = { data: products, total: products.length };\n this.refresh();\n };\n\n}\n","import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { ACL } from '@proman/services/acl.service';\n\n@Component({\n selector: 'pm-event-parameters',\n template: `\n \n
\n {{ config.label | translate }} \n
\n
\n\n
\n
\n \n \n {{ 'layer' | translate }} \n {{ child.parameter.name }} \n \n \n \n \n {{ layer.name }} \n \n \n \n \n \n
\n
\n\n
\n\n `\n})\n\nexport class EventParametersComponent implements OnChanges {\n @Input() event: any;\n @Input() parameters: any;\n @Input() config: any = {};\n\n orderParameters: any;\n productionParameters: any;\n productionGroups: any;\n productionMaterialCategories: any;\n canShow: boolean;\n\n constructor(public ACL: ACL) {\n this.canShow = ACL.check('parameter.display');\n }\n\n ngOnChanges(changes: SimpleChanges) {\n let parameters = changes.parameters;\n\n // console.log('changes', changes);\n // console.log('parameters', parameters);\n\n if (parameters && parameters.currentValue) {\n\n if (this.parameters.orderParameters) {\n this.orderParameters = this.parameters.orderParameters;\n\n }\n\n if (this.parameters.productionParameters) {\n this.productionParameters = this.parameters.productionParameters;\n\n }\n\n if (this.parameters.productionGroups) {\n this.productionGroups = [];\n\n for (let key in this.parameters.productionGroups) {\n this.productionGroups.push(this.parameters.productionGroups[key]);\n\n }\n\n }\n\n if (this.parameters.productionMaterialCategories) {\n this.productionMaterialCategories = this.parameters.productionMaterialCategories;\n\n }\n\n }\n\n }\n\n}\n","import { Component, OnInit, OnChanges, Input, SimpleChanges } from '@angular/core';\nimport { Location, PlatformLocation } from '@angular/common';\nimport { PromanStateService } from '../services/proman-state.service';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { hasSubstring, isDefined, cloneDeep, isArray, isSmarton } from \"@proman/utils\";\nimport { ACL } from '@proman/services/acl.service';\nimport { CurrUser, TabState, UserType } from '@proman/interfaces/object-interfaces';\nimport { ToolbarService } from '../services/toolbar.service';\nimport { Store } from '@ngrx/store';\nimport { getCurrUser } from '@proman/store/curr-user';\nimport { PublicSystemOptions } from '@proman/interfaces/entity-interfaces';\nimport { getPublicSystemOptions } from '@proman/store/system-options';\nimport { MatTabChangeEvent } from '@angular/material/tabs';\n\nconst tabStates: {\n [key: string]: {\n keys: string[];\n states: TabState[];\n };\n} = {\n Order: {\n keys: ['orderId'],\n states: [\n { name: 'options', params: ['orders', 'orderId'], acl: 'order.display', },\n { name: 'products', params: ['orders', 'orderId', 'products'], acl: 'order.display', },\n { name: 'additional_operations', params: ['orders', 'orderId', 'operations'], acl: 'event.display', },\n { name: 'productions', params: ['orders', 'orderId', 'production'], acl: 'production.view', },\n { name: 'history', params: ['orders', 'orderId', 'history'], acl: 'order.display', },\n { name: 'documents', params: ['orders', 'orderId', 'documents'], acl: 'order.edit', },\n { name: 'payments', params: ['orders', 'orderId', 'payments'], acl: 'invoice.edit', },\n { name: 'shipments', params: ['orders', 'orderId', 'shipments'] },\n { name: 'materials_used', params: ['orders', 'orderId', 'costs'], acl: 'purchase.display' },\n { name: 'article_tests', params: ['orders', 'orderId', 'articles-tests'], acl: 'article_test.view' },\n { name: 'issues', params: ['orders', 'orderId', 'issues'], acl: 'customer_claim.display' },\n { name: 'log', params: ['orders', 'orderId', 'log'] },\n ]\n },\n Production: {\n keys: ['productionId'],\n states: [\n { name: 'options', params: ['production', 'productionId', ''] },\n { name: 'files', params: ['production', 'productionId', 'files'] },\n { name: 'parameters', params: ['production', 'productionId', 'technology'] },\n { name: 'operations', params: ['production', 'productionId', 'operations'] },\n { name: 'materials', params: ['production', 'productionId', 'materials'], acl: 'purchase.display' },\n { name: 'log', params: ['production', 'productionId', 'log'] },\n ]\n },\n ShipmentsTabs: {\n keys: [],\n states: [\n { name: 'shipments', params: ['shipments', ''] },\n { name: 'overdue_shipments', params: ['shipments', 'overdue'] },\n { name: 'date_changes', params: ['shipments', 'logs'], acl: 'shipment.master' },\n { name: 'products', params: ['shipments', 'products'], acl: 'shipment.master' },\n { name: 'containers', params: ['shipments', 'containers'] },\n ],\n },\n Employee: {\n keys: ['employeeId'],\n states: [\n { name: 'information', params: ['employees', 'employeeId'] },\n { name: 'specialisation', params: ['employees', 'employeeId', 'roles'], acl: 'specialisation.view_all' },\n { name: 'permissions', params: ['employees', 'employeeId', 'permissions'], acl: 'permission.edit' },\n { name: 'menu', params: ['employees', 'employeeId', 'menu'], acl: 'permission.edit' },\n { name: 'workplaces', params: ['employees', 'employeeId', 'workplaces'], acl: 'workplace.view' },\n { name: 'schedule', params: ['employees', 'employeeId', 'schedule'] },\n { name: 'attendance', params: ['employees', 'employeeId', 'attendance'] },\n { name: 'operations', params: ['employees', 'employeeId', 'operations'] },\n { name: 'payments', params: ['employees', 'employeeId', 'payments'] },\n { name: 'salary', params: ['employees', 'employeeId', 'salary'] },\n { name: 'documents', params: ['employees', 'employeeId', 'documents'] },\n { name: 'vacations', params: ['employees', 'employeeId', 'vacations'], acl: 'employee.edit' },\n { name: 'customers', params: ['employees', 'employeeId', 'customers'], acl: 'customer.view' },\n { name: 'agents', params: ['employees', 'employeeId', 'agents'], acl: 'agent.view' },\n { name: 'consumers', params: ['employees', 'employeeId', 'consumers'], acl: 'consumer.edit' },\n { name: 'assets', params: ['employees', 'employeeId', 'assets'] },\n ]\n },\n EmployeesDocuments: {\n keys: [],\n states: [\n { name: 'documents', params: ['employees', 'documents']},\n { name: 'defect_acts', params: ['employees', 'documents', 'defect-acts']},\n { name: 'instructions', params: ['employees', 'documents', 'instructions']},\n ]\n },\n Product: {\n keys: ['productId'],\n states: [\n { name: 'options', params: ['products', 'productId'] },\n { name: 'orders', params: ['products', 'productId', 'orders'] },\n { name: 'orders_products', params: ['products', 'productId', 'order-products'] },\n { name: 'purchase', params: ['products', 'productId', 'purchase'] },\n { name: 'containers', params: ['products', 'productId', 'containers'] },\n { name: 'events', params: ['products', 'productId', 'events'] },\n { name: 'logs', params: ['products', 'productId', 'logs'] },\n { name: 'tests', params: ['products', 'productId', 'tests'] },\n ]\n },\n Article: {\n keys: ['articleId'],\n states: [\n { name: 'options', params: ['articles', 'articleId'] },\n { name: 'operations', params: ['articles', 'articleId', 'operations'] },\n { name: 'parameters', params: ['articles', 'articleId', 'parameters'] },\n { name: 'features', params: ['articles', 'articleId', 'features'] },\n { name: 'materials', params: ['articles', 'articleId', 'materials'], acl: 'material.display' },\n { name: 'technical_information', params: ['articles', 'articleId', 'summary'] },\n { name: 'productions', params: ['articles', 'articleId', 'productions'] },\n { name: 'article_categories', params: ['articles', 'articleId', 'categories'] },\n { name: 'orders', params: ['articles', 'articleId', 'orders'] },\n { name: 'tests', params: ['articles', 'articleId', 'tests'] },\n { name: 'development', params: ['articles', 'articleId', 'development'] },\n { name: 'article_children', params: ['articles', 'articleId', 'children'] },\n { name: 'time_restrictions', params: ['articles', 'articleId', 'time-restrictions'] },\n { name: 'discounts', params: ['articles', 'articleId', 'discounts'] },\n { name: 'log', params: ['articles', 'articleId', 'log'] },\n { name: 'pricing', params: ['articles', 'articleId', 'pricing'] },\n ]\n },\n ArticleParameters: {\n keys: ['articleId'],\n states: [\n { name: 'order_parameters', params: ['articles', 'articleId', 'parameters'] },\n { name: 'product_parameters', params: ['articles', 'articleId', 'parameters', 'product'] },\n { name: 'production_parameters', params: ['articles', 'articleId', 'parameters', 'production'] },\n { name: 'test_parameters', params: ['articles', 'articleId', 'parameters', 'test'] },\n ]\n },\n ArticleOperation: {\n keys: ['articleId', 'articleOperationId'],\n states: [\n { name: 'options', params: ['articles', 'articleId', 'operations', 'articleOperationId'] },\n { name: 'resources', params: ['articles', 'articleId', 'operations', 'articleOperationId', 'resources'] },\n { name: 'comments', params: ['articles', 'articleId', 'operations', 'articleOperationId', 'history'] },\n { name: 'materials', params: ['articles', 'articleId', 'operations', 'articleOperationId', 'materials'] },\n { name: 'inventory', params: ['articles', 'articleId', 'operations', 'articleOperationId', 'inventory'] },\n { name: 'parameters', params: ['articles', 'articleId', 'operations', 'articleOperationId', 'parameters'] },\n\n ]\n },\n Material: {\n keys: ['materialId'],\n states: [\n { name: 'overview', params: ['materials', 'materialId', ''] },\n { name: 'material_movement', params: ['materials', 'materialId', 'remnants-movement'] },\n { name: 'material_categories', params: ['materials', 'materialId', 'categories'] },\n { name: 'status', params: ['materials', 'materialId', 'status'] },\n { name: 'materials_reservations', params: ['materials', 'materialId', 'reservations'] },\n { name: 'articles', params: ['materials', 'materialId', 'articles'] },\n { name: 'formulas', params: ['materials', 'materialId', 'formulas'] },\n { name: 'materials_tests', params: ['materials', 'materialId', 'tests'] },\n { name: 'log', params: ['materials', 'materialId', 'log'] },\n ]\n },\n MaterialsFormulas: {\n keys: [],\n states: [\n { name: 'formulas', params: ['formulas', ''] },\n { name: 'scales_wizard', params: ['formulas', 'mix'] },\n { name: 'log', params: ['formulas', 'log'] },\n ]\n },\n MaterialsReservations: {\n keys: [],\n states: [\n { name: 'materials_reservations', params: ['materials-reservations', ''] },\n { name: 'orders', params: ['materials-reservations', 'unconfirmed'] },\n { name: 'materials_out_of_stock', params: ['materials-reservations', 'out-of-stock'] },\n ]\n },\n Inventory: {\n keys: ['materialId'],\n states: [\n { name: 'overview', params: ['inventory', 'materialId', ''] },\n { name: 'material_movement', params: ['inventory', 'materialId', 'remnants-movement'] },\n { name: 'material_categories', params: ['inventory', 'materialId', 'categories'] },\n { name: 'status', params: ['inventory', 'materialId', 'status'] },\n { name: 'materials_reservations', params: ['inventory', 'materialId', 'reservations'] },\n { name: 'materials_tests', params: ['inventory', 'materialId', 'tests'] },\n ]\n },\n Suppliers: {\n keys: [],\n states: [\n { name: 'suppliers', params: ['suppliers', ''] },\n { name: 'evaluation', params: ['suppliers', 'evaluation'] },\n { name: 'delays', params: ['suppliers', 'delayed-arrivals'] },\n { name: 'debts', params: ['suppliers', 'debts'] },\n { name: 'documents', params: ['suppliers', 'documents' ]},\n { name: 'discounts', params: ['suppliers', 'all-discounts'] },\n ]\n },\n Supplier: {\n keys: ['supplierId'],\n states: [\n { name: 'options', params: ['suppliers', 'supplierId', ''] },\n { name: 'contacts', params: ['suppliers', 'supplierId', 'contacts'] },\n { name: 'materials', params: ['suppliers', 'supplierId', 'materials'], acl: 'material.view' },\n { name: 'purchase', params: ['suppliers', 'supplierId', 'purchase'], acl: 'purchase.view' },\n { name: 'payments', params: ['suppliers', 'supplierId', 'supplier-payments'] },\n { name: 'documents', params: ['suppliers', 'supplierId', 'documents'] },\n { name: 'discounts', params: ['suppliers', 'supplierId', 'discounts'] },\n ]\n },\n Agent: {\n keys: ['agentId'],\n states: [\n { name: 'options', params: ['agents', 'agentId', ''] },\n { name: 'customers', params: ['agents', 'agentId', 'customers'] },\n { name: 'managers', params: ['agents', 'agentId', 'managers'] },\n { name: 'menu', params: ['agents', 'agentId', 'menu'] },\n { name: 'orders', params: ['agents', 'agentId', 'orders'] },\n { name: 'invoices', params: ['agents', 'agentId', 'invoices'] },\n ]\n },\n Carrier: {\n keys: ['carrierId'],\n states: [\n { name: 'options', params: ['carriers', 'carrierId', ''] },\n { name: 'employees', params: ['carriers', 'carrierId', 'employees'] },\n ]\n },\n Customer: {\n keys: ['customerId'],\n states: [\n { name: 'options', params: ['customers', 'customerId', ''] },\n { name: 'employees', params: ['customers', 'customerId', 'employees'], acl: 'customer_employee.display' },\n { name: 'supervisors', params: ['customers', 'customerId', 'managers'] },\n { name: 'confirmations', params: ['customers', 'customerId', 'confirmations'] },\n { name: 'sales_events', params: ['customers', 'customerId', 'meetings'] },\n { name: 'orders', params: ['customers', 'customerId', 'orders'], acl: 'order.view' },\n { name: 'order_proposals', params: ['customers', 'customerId', 'order-proposals'] },\n { name: 'documents', params: ['customers', 'customerId', 'documents'] },\n { name: 'payments', params: ['customers', 'customerId', 'payments'] },\n { name: 'projects', params: ['customers', 'customerId', 'sales-opportunities'] },\n { name: 'invoices', params: ['customers', 'customerId', 'invoices'] },\n { name: 'logins', params: ['customers', 'customerId', 'logins'] },\n { name: 'claims', params: ['customers', 'customerId', 'claims'], acl: 'customer_claim.display' },\n { name: 'tests', params: ['customers', 'customerId', 'tests'] },\n { name: 'presentations', params: ['customers', 'customerId', 'presentations'] },\n // { name: 'assets', params: ['customers', 'customerId', 'assets'] },\n ]\n },\n Customers: {\n keys: [],\n states: [\n { name: 'companies', params: ['customers', ''], types: ['employee'] },\n { name: 'persons', params: ['customers', 'customer-employees'], types: ['employee'] },\n { name: 'users', params: ['customers', 'employees-users'], types: ['employee'] },\n { name: 'types', params: ['customers', 'customer-types'], types: ['employee'] },\n { name: 'departments', params: ['customers', 'departments'], types: ['employee'] },\n { name: 'debts', params: ['customers', 'debts'], types: ['employee', 'agent'] },\n { name: 'cards', params: ['customers', 'cards'], types: ['employee'] },\n { name: 'permissions', params: ['customers', 'customers-permissions'], types: ['employee'] },\n { name: 'clients_portal', params: ['customers', 'clients-portal'], types: ['employee'] },\n { name: 'shop_options', params: ['customers', 'shop-options'], types: ['employee'] },\n { name: 'shop_templates', params: ['customers', 'shop-templates'], types: ['employee'], acl: 'system_options.edit' },\n { name: 'customer_claims', params: ['accounting', 'claims'], acl: 'customer_claim.display' },\n { name: 'certificates', params: ['customers', 'certificates'] },\n ]\n },\n DevelopmentProjects: {\n keys: [],\n states: [\n { name: 'development', params: ['dev-projects', ''] },\n { name: 'projects', params: ['dev-projects', 'all'] },\n // { name: 'stages', params: ['dev-projects', 'stages'] },\n { name: 'tasks', params: ['dev-projects', 'tasks'] },\n\n ]\n },\n DevelopmentProjectView: {\n keys: ['developmentProjectId'],\n states: [\n { name: 'options', params: ['dev-projects', 'developmentProjectId', ''] },\n { name: 'articles', params: ['dev-projects', 'developmentProjectId', 'articles'], acl: 'article.view' },\n { name: 'order_proposals', params: ['dev-projects', 'developmentProjectId', 'proposals'], acl: 'order.view' },\n ]\n },\n Role: {\n keys: ['roleId'],\n states: [\n { name: 'options', params: ['roles', 'roleId', ''] },\n { name: 'permissions', params: ['roles', 'roleId', 'permissions'], acl: 'permission.edit' },\n { name: 'specialisations', params: ['roles', 'roleId', 'specialisations'], acl: 'specialisation.display' },\n\n ]\n },\n RoleSpecialisation: {\n keys: ['roleId', 'specialisationId'],\n states: [\n { name: 'employees', params: ['roles', 'roleId', 'specialisations', 'specialisationId', ''] },\n { name: 'options', params: ['roles', 'roleId', 'specialisations', 'specialisationId', 'options'] },\n { name: 'permissions', params: ['roles', 'roleId', 'specialisations', 'specialisationId', 'permissions'], acl: 'permission.edit' },\n { name: 'table_filters', params: ['roles', 'roleId', 'specialisations', 'specialisationId', 'table-filters'], acl: 'filter.edit' },\n { name: 'menu', params: ['roles', 'roleId', 'specialisations', 'specialisationId', 'menu'] },\n ]\n },\n MaintenanceList: {\n keys: [],\n states: [\n { name: 'maintenance', params: ['maintenance', ''] },\n { name: 'periodic_maintenance', params: ['maintenance', 'periodic'] },\n { name: 'maintenance_costs', params: ['maintenance', 'purchases'] },\n { name: 'unoperable_workplaces', params: ['maintenance', 'unoperable-workplaces'] },\n ]\n },\n MaintenanceRecord: {\n keys: ['maintenanceId'],\n states: [\n { name: 'options', params: ['maintenance', 'maintenanceId', ''] },\n { name: 'purchases', params: ['maintenance', 'maintenanceId', 'purchases'] },\n ]\n },\n ResourcesList: {\n keys: [],\n states: [\n { name: 'resources', params: ['resources', ''] },\n { name: 'workplaces', params: ['resources', 'workplaces'], acl: 'workplace.display' },\n { name: 'workplaces_operators', params: ['resources', 'workplaces-operators'] },\n { name: 'workgroups', params: ['resources', 'workgroups'], acl: 'workgroup.display' },\n { name: 'operations', params: ['resources', 'operations'] },\n { name: 'warehouse', params: ['resources', 'warehouse'] },\n { name: 'subcontractors', params: ['resources', 'subcontractors'], acl: 'subcontractor.display' },\n ]\n },\n Workplace: {\n keys: ['workplaceId'],\n states: [\n { name: 'options', params: ['resources', 'workplaces', 'workplaceId', ''] },\n { name: 'employees', params: ['resources', 'workplaces', 'workplaceId', 'employees'] },\n { name: 'maintenance', params: ['resources', 'workplaces', 'workplaceId', 'maintenance'] },\n { name: 'expressions', params: ['resources', 'workplaces', 'workplaceId', 'expressions'] },\n { name: 'parameters', params: ['resources', 'workplaces', 'workplaceId', 'parameters'], acl: 'workplace.edit' },\n { name: 'tools', params: ['resources', 'workplaces', 'workplaceId', 'tools'] },\n { name: 'accounting', params: ['resources', 'workplaces', 'workplaceId', 'accounting'] },\n { name: 'articles', params: ['resources', 'workplaces', 'workplaceId', 'articles'] },\n { name: 'defect_acts', params: ['resources', 'workplaces', 'workplaceId', 'defect_acts'] },\n ]\n },\n Operation: {\n keys: ['operationId'],\n states: [\n { name: 'options', params: ['resources', 'operations', 'operationId', ''], },\n { name: 'resources', params: ['resources', 'operations', 'operationId', 'workgroups'] },\n { name: 'operation_visible_parameters', params: ['resources', 'operations', 'operationId', 'parameters'] },\n { name: 'relations', params: ['resources', 'operations', 'operationId', 'relations'] },\n { name: 'articles', params: ['resources', 'operations', 'operationId', 'articles'] },\n { name: 'materials', params: ['resources', 'operations', 'operationId', 'materials'] },\n ]\n },\n WorkplacesInfo: {\n keys: [],\n states: [\n { name: 'map', params: ['workplaces', ''] },\n { name: 'sensors', params: ['workplaces', 'sensors'], acl: 'sensor.display' },\n { name: 'graph', params: ['workplaces', 'sensor-graph'], acl: 'sensor.display' },\n ]\n },\n Workgroup: {\n keys: ['workgroupId'],\n states: [\n { name: 'options', params: ['resources', 'workgroups', 'workgroupId', ''] },\n { name: 'operations', params: ['resources', 'workgroups', 'workgroupId', 'operations'] },\n { name: 'specialisations', params: ['resources', 'workgroups', 'workgroupId', 'specialisations'] },\n ]\n },\n Subcontractor: {\n keys: ['subcontractorId'],\n states: [\n { name: 'options', params: ['subcontractors', 'subcontractorId', ''] },\n { name: 'employees', params: ['subcontractors', 'subcontractorId', 'employees'] },\n { name: 'supervisors', params: ['subcontractors', 'subcontractorId', 'supervisors'] },\n { name: 'parameters', params: ['subcontractors', 'subcontractorId', 'parameters'] },\n { name: 'operations', params: ['subcontractors', 'subcontractorId', 'operations'] },\n ]\n },\n SystemSettingsDevices: {\n keys: [],\n states: [\n { name: 'entry_sensor', params: ['system-settings', 'devices', ''] },\n { name: 'payment_terminals', params: ['system-settings', 'devices', 'payment-terminals'] },\n { name: 'mqtt_devices', params: ['system-settings', 'devices', 'mqtt'] },\n { name: 'devices', params: ['system-settings', 'devices', 'devices'] },\n { name: 'cameras', params: ['system-settings', 'devices', 'cameras'], acl: 'camera.view' },\n { name: 'tokens', params: ['system-settings', 'devices', 'tokens'], acl: 'system_options.edit' },\n { name: 'e_shops', params: ['system-settings', 'devices', 'e-shops'], acl: 'system_options.edit' },\n { name: 'g_tags', params: ['system-settings', 'devices', 'g-tags'], acl: 'system_options.edit' },\n ]\n },\n SalesReports: {\n keys: [],\n states: [\n { name: 'order_reports', params: ['reports', 'sales', ''], acl: 'order.view' },\n { name: 'income_report', params: ['reports', 'sales', 'income-report'] },\n { name: 'customer_activity_report', params: ['reports', 'sales', 'customer-activity'] },\n { name: 'cash_registers', params: ['reports', 'sales', 'cash-operations'] },\n { name: 'order_products', params: ['reports', 'sales', 'order-products'] },\n { name: 'product_difference', params: ['reports', 'sales', 'product-difference'] },\n { name: 'costs', params: ['reports', 'sales', 'costs'] },\n { name: 'invoices', params: ['reports', 'sales', 'invoices'] },\n { name: 'hourly_orders', params: ['reports', 'sales', 'orders-hourly'] },\n { name: 'orders_sales', params: ['reports', 'sales', 'orders-sales'] },\n { name: 'sales_articles', params: ['reports', 'sales', 'sales-articles'] },\n { name: 'consumer_orders', params: ['reports', 'sales', 'consumer-orders'] },\n { name: 'invoices_and_orders', params: ['reports', 'sales', 'invoices-and-orders'] },\n { name: 'by_payment_type', params: ['reports', 'sales', 'payment-types'] },\n ]\n },\n LoadingReports: {\n keys: [],\n states: [\n { name: 'packed_production_value_report', params: ['reports', 'loading', ''] },\n { name: 'delivery_report', params: ['reports', 'loading', 'delivery'] },\n { name: 'shipments', params: ['reports', 'loading', 'shipment'] },\n { name: 'shipment_delays', params: ['reports', 'loading', 'shipment-delay'] },\n ]\n },\n MaterialsReports: {\n keys: [],\n states: [\n { name: 'material_difference', params: ['reports', 'materials', 'material-difference'] },\n { name: 'material_consumption', params: ['reports', 'materials', 'material-consumption'] },\n { name: 'material_movement', params: ['reports', 'materials', 'material-movement'] },\n ]\n },\n ProductionReports: {\n keys: [],\n states: [\n { name: 'workplaces_load_report', params: ['reports', 'production', ''] },\n { name: 'employees_load_report', params: ['reports', 'production', 'employees-load'] },\n { name: 'specialisation_load_report', params: ['reports', 'production', 'specialisations-load'] },\n { name: 'daily_report', params: ['reports', 'production', 'daily'] },\n { name: 'daily_report_income', params: ['reports', 'production', 'daily-income'] },\n { name: 'production_income', params: ['reports', 'production', 'production-income'] },\n { name: 'operations_estimation', params: ['reports', 'production', 'operations-estimation'] },\n { name: 'articles_reports', params: ['reports', 'production', 'articles'] },\n { name: 'types', params: ['reports', 'production', 'types'] },\n ]\n },\n EntranceReport: {\n keys: [],\n states: [\n { name: 'entrance_report', params: ['reports', 'entrance', ''] },\n { name: 'attendance', params: ['reports', 'entrance', 'truancy'] },\n { name: 'congestion', params: ['reports', 'entrance', 'efficiency'] },\n { name: 'operations', params: ['reports', 'entrance', 'operations'] },\n { name: 'salary_changes', params: ['reports', 'entrance', 'salary-changes'] },\n ]\n },\n UserOptions: {\n keys: [],\n states: [\n { name: 'information', params: ['options', ''] },\n { name: 'settings', params: ['options', 'system-settings'] },\n { name: 'notifications', params: ['options', 'notifications'] },\n { name: 'errors', params: ['options', 'errors'] },\n { name: 'menu', params: ['options', 'menu'] },\n ]\n },\n SaleOpportunitiesList: {\n keys: [],\n states: [\n { name: 'sales_opportunities_active', params: ['sales-opportunities', ''] },\n { name: 'sales_opportunities_all', params: ['sales-opportunities', 'all'] },\n { name: 'chart', params: ['sales-opportunities', 'chart'] },\n ]\n },\n TimeOptions: {\n keys: [],\n states: [\n { name: 'holidays', params: ['time-options', ''], acl: 'time_options.display' },\n { name: 'workshifts', params: ['time-options', 'shifts'], acl: 'time_options.display' },\n { name: 'workday_exception_reasons', params: ['time-options', 'reasons'], acl: 'time_options.display' },\n ]\n },\n Tabel: {\n keys: [],\n states: [\n { name: 'monthly_tabel', params: ['tabel', 'month'] },\n { name: 'weekly', params: ['tabel', 'weekly'], acl: 'employee.view_all' },\n { name: 'daily', params: ['tabel', 'daily'], acl: 'employee.view_all' },\n { name: 'yearly', params: ['tabel', 'yearly'], acl: 'employee.view_all' },\n { name: 'tabel', params: ['tabel', 'tabel'], acl: 'employee.view_all' },\n { name: 'salary', params: ['tabel', 'salary'], acl: 'employee.show_price' },\n { name: 'additives', params: ['tabel', 'additives'], acl: 'employee.view_all' },\n { name: 'remnants', params: ['tabel', 'remnants'], acl: 'employee.view_all' },\n { name: 'salary_taxes', params: ['tabel', 'salary-taxes'], acl: 'employee.view_all' },\n { name: 'vacations_requests', params: ['tabel', 'vacations_requests'], acl: 'employee.view_all' },\n ]\n },\n Company: {\n keys: ['companyId'],\n states: [\n { name: 'options', params: ['companies', 'companyId', ''] },\n { name: 'company_account', params: ['companies', 'companyId', 'account'] },\n { name: 'employees', params: ['companies', 'companyId', 'employees'] },\n ]\n },\n SystemSettingsMenu: {\n keys: [''],\n states: [\n { name: 'employee', params: ['system-settings', 'menu', ''] },\n { name: 'agent', params: ['system-settings', 'menu', 'agent'] },\n { name: 'customer', params: ['system-settings', 'menu', 'customer'] },\n ]\n },\n ActionsList: {\n keys: [''],\n states: [\n { name: 'objects', params: ['notifications', 'objects'] },\n { name: 'periodic_listeners', params: ['notifications', 'periodic'] },\n { name: 'mail_notifications', params: ['notifications', 'mail'] },\n { name: 'button_listeners', params: ['notifications', 'button'] },\n ]\n }\n};\n\n@Component({\n selector: 'pm-tabs',\n template: `\n \n @for (item of items; track $index) {\n \n }\n\n @if (additionalState) {\n @if (isArray(additionalState)) {\n @for (aState of additionalState; track $index) {\n \n }\n } @else {\n \n }\n }\n \n `\n})\n\nexport class TabsComponent implements OnInit, OnChanges {\n @Input() parentState: any;\n @Input() additionalState: any;\n @Input() filter: any;\n items: TabState[] = [];\n activeItemIndex: any = 0;\n activeItem: any;\n isSmarton: boolean = isSmarton();\n _preventNavigation: boolean;\n currUser: CurrUser;\n publicSystemOptions: PublicSystemOptions;\n\n\n constructor(\n platformLocation: PlatformLocation,\n private route: ActivatedRoute,\n private Router: Router,\n private PromanState: PromanStateService,\n private Location: Location,\n private ACL: ACL,\n private Toolbar: ToolbarService,\n private store: Store,\n ) {\n platformLocation.onPopState(() => this.setActiveItem());\n this.store.select(getCurrUser)\n .subscribe((value) => this.currUser = value);\n this.store.select(getPublicSystemOptions).subscribe((value) => this.publicSystemOptions = value);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const currUser = this.currUser;\n\n if (this.parentState) {\n this.items = tabStates[this.parentState] ? cloneDeep(tabStates[this.parentState].states) : [];\n\n if (!(this.items.length)) console.warn(`${this.parentState} has no parent states`);\n\n this.adjustParams();\n\n this.items.forEach((item: any) => {\n item.path = this.getRouterLink(item);\n });\n\n this.items = this.items.filter((item) => item.chef ? this.isSmarton : ( !isDefined(item.acl) || this.ACL.check(item.acl)) );\n\n this.items = this.items.filter((item) => item.types ? item.types.indexOf(currUser.type as UserType) > -1 : true);\n\n if (this.publicSystemOptions.corporateChild) {\n this.items = this.items.filter((item) => !item.corporateRestrict);\n }\n\n if (this.filter) this.items = this.items.filter(this.filter);\n\n if (this.items.length) this.activeItemIndex = 0;\n\n this._preventNavigation = true;\n\n setTimeout(() => this._preventNavigation = false, 300);\n\n this.setActiveItem();\n\n }\n\n }\n\n ngOnInit() {\n this.Toolbar.timeStampSubject.subscribe(() => this.ngOnChanges({}));\n }\n\n adjustParams() {\n if (!tabStates[this.parentState]) return;\n\n for (let key of tabStates[this.parentState].keys) {\n\n let route = this.route.root;\n\n let keyVal: any;\n\n if (key) {\n while (route.firstChild) {\n\n keyVal = +route.snapshot.params[key];\n\n if (keyVal) {\n break;\n } else {\n route = route.firstChild;\n }\n\n }\n\n if (!keyVal) console.warn(`TabsComponent adjustParams(): parentState ${this.parentState} could not get keyValue`);\n\n this.items.forEach((item: any) => {\n let params = item.params;\n\n item.params = params.map((item: any) => {\n if (item === key) item = keyVal;\n\n return item;\n });\n });\n }\n\n }\n\n }\n\n setActiveItem() {\n if (!this.items) return;\n\n let path = this.Location.path();\n\n if (this.additionalState) {\n if (isArray(this.additionalState)) {\n this.additionalState.forEach((aState: any) => {\n if (hasSubstring(path, aState.path)) {\n this.activeItem = aState;\n this.activeItemIndex = this.items.length + (this.additionalState as any[]).indexOf(aState);\n }\n })\n } else {\n if (hasSubstring(path, this.additionalState.path)) {\n this.activeItem = this.additionalState;\n this.activeItemIndex = this.items.length;\n }\n }\n }\n\n if (this.items.length) {\n for (let iter = this.items.length - 1 ; iter !== 0; iter--) {\n let item = this.items[iter];\n\n if (hasSubstring(path, item.path)) {\n this.activeItem = this.items[iter];\n this.activeItemIndex = iter;\n break;\n }\n\n }\n\n }\n\n }\n\n getRouterLink(item: any) {\n return `/${(item.params || []).join('/')}`;\n }\n\n handleTabChange = (event: MatTabChangeEvent) => {\n if (this._preventNavigation || event.index === this.activeItemIndex) return;\n\n if (event.index >= this.items.length && this.additionalState) {\n const additionalState = this.additionalState;\n if (isArray(additionalState)) {\n const index = event.index - this.items.length;\n this.PromanState.to(additionalState[index].name, additionalState[index].params);\n } else {\n this.PromanState.to(additionalState.name, additionalState.params);\n }\n\n } else {\n this.PromanState.to(this.items[event.index].path);\n\n }\n\n };\n isArray = (value: any) => isArray(value);\n\n}\n","import { Injectable } from '@angular/core';\nimport { Entity, EntityInterface } from './entity.service';\n\nexport interface PermissionEntityInterface extends EntityInterface {\n allAvailablePermissions: () => Promise;\n posAvailablePermissions: () => Promise;\n employeesPermissions: () => Promise;\n rolesPermissions: () => Promise;\n specialisationsPermissions: () => Promise;\n personsPermission: (data: { permission: string }) => Promise;\n employeesPermission: (data: { permission: string }) => Promise;\n}\n\ntype PermissionActionType = 'create'|\n 'display'|\n 'edit'|\n 'remove'|\n 'confirm'|\n 'update_status'|\n 'view_all'|\n 'show_price'|\n 'update_price'|\n 'master';\n\n@Injectable()\nexport class PermissionsService {\n permissionEntity: PermissionEntityInterface;\n permissions: PermissionActionType[] = [\n 'create',\n 'display',\n 'edit',\n 'remove',\n 'confirm',\n 'update_status',\n 'view_all',\n 'show_price',\n 'update_price',\n 'master'\n ];\n\n constructor(\n Entity: Entity,\n ) {\n this.permissionEntity = Entity.get({\n name: 'permission',\n get: [\n 'allAvailablePermissions',\n 'posAvailablePermissions',\n 'employeesPermissions',\n 'rolesPermissions',\n 'specialisationsPermissions',\n 'personsPermission',\n ],\n post: [\n 'employeesPermission'\n ]\n }) as PermissionEntityInterface;\n }\n\n getForEntity = (type: string, id: number) => {\n return this.permissionEntity.customizedRequest('get/' + type + '/' + id);\n };\n\n get = () => this.permissions;\n\n getEntity = () => this.permissionEntity;\n\n getPos = () => this.permissionEntity.posAvailablePermissions();\n\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { PermissionsService } from '@proman/services/permissions.service';\nimport { Entity } from '@proman/services/entity.service';\nimport { isDefined } from '@proman/utils';\nimport { keys } from 'lodash';\nimport { ACL } from '@proman/services/acl.service';\nimport { ToastService } from '@proman/services/toast.service';\nimport { PromanStateService } from '@frontend/shared/services/proman-state.service';\nimport { CurrUser } from '@proman/interfaces/object-interfaces';\nimport { ActivatedRoute } from '@angular/router';\nimport { getCurrUser } from '@proman/store/curr-user';\nimport { Store } from '@ngrx/store';\n\n@Component({\n selector: 'pm-permissions',\n template: `\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n\n `\n})\n\nexport class PermissionsComponent implements OnInit {\n @Input() permissions: any;\n @Input() entity: any;\n @Input() type: string;\n\n permissionEntity: any;\n id: number;\n allPermissions: any;\n resources: any;\n currUser: CurrUser;\n\n _loaded: boolean = false;\n\n constructor(\n private promanState: PromanStateService,\n private Toast: ToastService,\n public ACL: ACL,\n private Entity: Entity,\n private store: Store,\n private Permissions: PermissionsService,\n private route: ActivatedRoute,\n ) {\n this.store.select(getCurrUser)\n .subscribe((value) => {\n this.currUser = value;\n\n });\n this.entity = this.route.snapshot.data['entity'];\n this.type = this.route.snapshot.data['type'];\n\n this.permissionEntity = Entity.get('permission');\n }\n\n ngOnInit() {\n if (!this.ACL.check('permission.edit')) {\n this.Toast.pop('error', 'No permission for \\'permission.edit\\'');\n return this.promanState.go();\n }\n\n this.allPermissions = this.Permissions.get();\n\n this.id = this.entity ? this.entity.id : null;\n\n (this.permissions) ? this.setPermissions(this.permissions) : this.getPermissions();\n };\n\n setPermissions = (data: any) => {\n let resources: any = [];\n\n for (let name in data) {\n let actions = data[name];\n\n let resource = {\n name,\n // if resource does not have 'view' action, it is enabled by default\n allowed: !isDefined(actions.view) ? true : actions.view.status,\n override: isDefined(actions.view) ? actions.view.override : false,\n actions\n };\n\n delete actions.view;\n\n resources.push(resource);\n }\n\n\n this.resources = resources;\n\n this._loaded = true;\n };\n\n getPermissions = () => {\n this.Permissions\n .getForEntity(this.type, this.id)\n .then(this.setPermissions);\n };\n\n toggleResource = (resource: any, value: any) => {\n resource.allowed = value;\n let request: any = {\n entityId: this.id,\n entityType: this.type,\n allowed: value,\n };\n\n request.permissions = keys(resource.actions).map(action => resource.name + '.' + action);\n request.permissions.push(resource.name + '.view');\n\n return this.permissionEntity.update(request).then(() => {\n\n for (let action in resource.actions) {\n resource.actions[action].status = value;\n resource.override = (this.type === 'employee' || this.type === 'specialisation');\n resource.actions[action].override = (this.type === 'employee' || this.type === 'specialisation');\n\n }\n\n });\n };\n\n toggle = (resource: any, action: string, value: any) => {\n const type = this.type;\n let request = {\n entityId: this.id,\n entityType: type,\n permission: resource.name + '.' + action,\n allowed: value\n };\n\n return this.permissionEntity.update(request).then(() => {\n resource.override = (type === 'employee' || type === 'specialisation');\n resource.actions[action].status = value;\n resource.actions[action].override = (type === 'employee' || type === 'specialisation');\n });\n };\n\n clearOverride = (resource: any, action: string) => {\n let request = {\n entityId: this.id,\n entityType: this.type,\n permission: resource.name + '.' + action,\n };\n\n this.permissionEntity\n .remove(request)\n .then((response: any) => {\n resource.actions[action].override = false;\n resource.actions[action].status = response.data;\n });\n };\n\n clearResourceOverride = (resource: any) => {\n let request = {\n entityId: this.id,\n entityType: this.type,\n permission: resource.name + '.view',\n };\n\n return this.permissionEntity\n .remove(request)\n .then((response: any) => {\n resource.override = false;\n resource.allowed = response.data;\n\n let requests = [];\n\n for (let action in resource.actions) {\n requests.push(this.clearOverride(resource, action));\n }\n\n Promise.all(requests)\n .then(() => {\n this.ngOnInit();\n });\n\n return Promise.resolve();\n\n });\n\n };\n\n sudoPermissionToggle(value: any) {\n this.resources.forEach((resource: any) => {\n resource.allowed = value;\n let request: any = {\n entityId: this.id,\n entityType: this.type,\n allowed: value,\n };\n\n request.permissions = keys(resource.actions).map(action => resource.name + '.' + action);\n request.permissions.push(resource.name + '.view');\n\n return this.permissionEntity.update(request).then(() => {\n\n for (let action in resource.actions) {\n resource.actions[action].status = value;\n resource.override = (this.type === 'employee' || this.type === 'specialisation');\n resource.actions[action].override = (this.type === 'employee' || this.type === 'specialisation');\n\n }\n\n });\n })\n }\n\n removePermissions() {\n this.Entity.get('employee').removePermissions({ id: this.entity.id }).then(() => this.getPermissions());\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { delay } from '@proman/utils';\nimport $ from 'jquery';\nimport { Html5QrcodeScanner } from 'html5-qrcode';\nimport { Html5QrcodeResult } from 'html5-qrcode/esm/core';\nimport { CommonModule } from '@angular/common';\nimport { LabelComponent } from '@proman/common-components/components/label.component';\nimport { Fa6Module } from '@proman/fa/fa6.module';\nimport { TranslatePipe } from '@proman/shared/pipes/pipes/translate.pipe';\n\n@Component({\n selector: 'pro-qr-reader',\n standalone: true,\n imports: [\n CommonModule,\n LabelComponent,\n Fa6Module,\n TranslatePipe,\n ],\n template: `\n \n
\n
\n \n {{ 'click_to_use_camera' | translate }}\n \n
\n
\n
🎥 Unable to access video stream (please make sure you have a webcam enabled)
\n
\n
\n
\n
\n \n\n
\n
\n
\n \n
\n `,\n\n styles: [`\n ._snapshot {\n outline: 2px solid red;\n }\n #html5qrreader {\n width: 600px;\n }\n `]\n})\n\nexport class PromanQrReaderComponent implements OnInit, AfterViewInit, OnDestroy {\n callback: any;\n url: string;\n stream: MediaStream;\n quagga: any;\n _paused: boolean = false;\n status: boolean = false;\n @Input() multiple: boolean;\n @ViewChild('element', { static: true }) element: ElementRef;\n @Output() onCodeRead: EventEmitter = new EventEmitter();\n\n html5QrcodeScanner: Html5QrcodeScanner;\n\n constructor(\n\n ) {\n\n }\n\n ngOnInit() {\n\n if (!window.jsQR) {\n $.getScript('./assets/js/jsQR.js', () => {});\n }\n\n if (!window.Quagga) {\n $.getScript('./assets/js/quaggaJS.js', () => {\n\n });\n }\n // navigator.mediaDevices.enumerateDevices().then((devices) => {\n // console.log('media devices', devices);\n // });\n //\n // console.log('supported media constraits', navigator.mediaDevices.getSupportedConstraints()\n // )\n\n }\n\n ngAfterViewInit() {\n console.log('document.querySelector(\\'#reader\\').getBoundingClientRect()', document.querySelector('#reader').getBoundingClientRect());\n const width = document.querySelector('#reader').getBoundingClientRect().width;\n const qrbox = Math.floor(width / 10) * 10;\n this.html5QrcodeScanner = new Html5QrcodeScanner(\n 'reader',\n {\n fps: 4,\n qrbox,\n experimentalFeatures: {\n useBarCodeDetectorIfSupported: true\n }\n }, true);\n\n const onScanSuccess = (decodedText: string, decodedResult: Html5QrcodeResult): void => {\n // handle the scanned code as you like, for example:\n console.log(`Code matched = ${decodedText}`, decodedResult);\n this.onCodeRead.emit(decodedText);\n if (!this.multiple) {\n this.html5QrcodeScanner.pause();\n this.html5QrcodeScanner.clear();\n }\n };\n\n const onScanFailure = (error: unknown) => {\n // handle scan failure, usually better to ignore and keep scanning.\n // for example:\n // console.warn(`Code scan error = ${error}`);\n };\n\n this.html5QrcodeScanner.render(onScanSuccess, onScanFailure);\n\n }\n\n ngOnDestroy() {\n try {\n if (this.stream) this.stream.getTracks().forEach((track: any) => track.stop());\n window.Quagga.stop();\n\n } catch (e) {\n\n }\n\n window.Quagga = null;\n\n try {\n this.html5QrcodeScanner.pause();\n this.html5QrcodeScanner.clear();\n } catch (e) {\n\n }\n\n }\n\n async startCamera() {\n this.status = true;\n\n while (!(document.getElementById('video') && document.getElementById('canvas'))) {\n await delay(500);\n }\n\n const video: HTMLVideoElement = document.createElement('video');\n const canvasElement: HTMLCanvasElement = document.getElementById('canvas') as HTMLCanvasElement;\n const canvas = canvasElement.getContext('2d');\n const loadingMessage = document.getElementById('loadingMessage');\n\n canvasElement.width = Math.min(320, this.element.nativeElement.getBoundingClientRect().width);\n canvasElement.height = canvasElement.width * 3 / 4;\n\n const tick = () => {\n loadingMessage.innerText = '⌛ Loading video...';\n loadingMessage.hidden = true;\n\n if (video.readyState === video.HAVE_ENOUGH_DATA && !this._paused) {\n canvas.drawImage(video, 0, 0, canvasElement.width, canvasElement.height);\n const imageData = canvas.getImageData(0, 0, canvasElement.width, canvasElement.height);\n const code = window.jsQR(imageData.data, imageData.width, imageData.height, { inversionAttempts: 'dontInvert' });\n\n if (code) {\n this.url = code.data;\n this.onCodeRead.emit(this.url);\n\n if (!this.multiple) {\n this.status = false;\n this.stopStream();\n return;\n } else {\n this._paused = true;\n\n setTimeout(() => this._paused = false, 500);\n }\n\n }\n }\n\n requestAnimationFrame(tick);\n\n };\n\n window.Quagga.init({\n inputStream : {\n name : 'Live',\n type : 'LiveStream',\n target: document.querySelector('#canvas') // Or '#yourElement' (optional)\n },\n decoder : {\n readers : ['code_128_reader']\n }\n }, (err: any) => {\n if (err) {\n console.warn('QuaggaJS error', err);\n return\n }\n\n window.Quagga.start();\n window.Quagga.onDetected((data: any) => {\n\n this.url = data.codeResult.code;\n this.onCodeRead.emit(this.url);\n\n if (!this.multiple) {\n this.status = false;\n this.stopStream();\n window.Quagga.stop();\n return;\n } else {\n this._paused = true;\n\n setTimeout(() => this._paused = false, 500);\n }\n });\n });\n\n navigator.mediaDevices.getUserMedia({ video: true }).then((stream) => {\n this.stream = stream;\n video.srcObject = stream;\n video.setAttribute('playsinline', 'true');\n video.play();\n requestAnimationFrame(tick);\n });\n\n }\n\n stopStream = () => {\n\n try {\n this.stream.getTracks().forEach((track) => track.stop());\n // this.stream = null;\n\n } catch (e) {\n // this.stream = null;\n\n }\n\n };\n\n}\n","export var Html5QrcodeSupportedFormats = /*#__PURE__*/function (Html5QrcodeSupportedFormats) {\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"QR_CODE\"] = 0] = \"QR_CODE\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"AZTEC\"] = 1] = \"AZTEC\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"CODABAR\"] = 2] = \"CODABAR\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"CODE_39\"] = 3] = \"CODE_39\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"CODE_93\"] = 4] = \"CODE_93\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"CODE_128\"] = 5] = \"CODE_128\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"DATA_MATRIX\"] = 6] = \"DATA_MATRIX\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"MAXICODE\"] = 7] = \"MAXICODE\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"ITF\"] = 8] = \"ITF\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"EAN_13\"] = 9] = \"EAN_13\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"EAN_8\"] = 10] = \"EAN_8\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"PDF_417\"] = 11] = \"PDF_417\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"RSS_14\"] = 12] = \"RSS_14\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"RSS_EXPANDED\"] = 13] = \"RSS_EXPANDED\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"UPC_A\"] = 14] = \"UPC_A\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"UPC_E\"] = 15] = \"UPC_E\";\n Html5QrcodeSupportedFormats[Html5QrcodeSupportedFormats[\"UPC_EAN_EXTENSION\"] = 16] = \"UPC_EAN_EXTENSION\";\n return Html5QrcodeSupportedFormats;\n}(Html5QrcodeSupportedFormats || {});\nvar html5QrcodeSupportedFormatsTextMap = new Map([[Html5QrcodeSupportedFormats.QR_CODE, \"QR_CODE\"], [Html5QrcodeSupportedFormats.AZTEC, \"AZTEC\"], [Html5QrcodeSupportedFormats.CODABAR, \"CODABAR\"], [Html5QrcodeSupportedFormats.CODE_39, \"CODE_39\"], [Html5QrcodeSupportedFormats.CODE_93, \"CODE_93\"], [Html5QrcodeSupportedFormats.CODE_128, \"CODE_128\"], [Html5QrcodeSupportedFormats.DATA_MATRIX, \"DATA_MATRIX\"], [Html5QrcodeSupportedFormats.MAXICODE, \"MAXICODE\"], [Html5QrcodeSupportedFormats.ITF, \"ITF\"], [Html5QrcodeSupportedFormats.EAN_13, \"EAN_13\"], [Html5QrcodeSupportedFormats.EAN_8, \"EAN_8\"], [Html5QrcodeSupportedFormats.PDF_417, \"PDF_417\"], [Html5QrcodeSupportedFormats.RSS_14, \"RSS_14\"], [Html5QrcodeSupportedFormats.RSS_EXPANDED, \"RSS_EXPANDED\"], [Html5QrcodeSupportedFormats.UPC_A, \"UPC_A\"], [Html5QrcodeSupportedFormats.UPC_E, \"UPC_E\"], [Html5QrcodeSupportedFormats.UPC_EAN_EXTENSION, \"UPC_EAN_EXTENSION\"]]);\nexport var DecodedTextType = /*#__PURE__*/function (DecodedTextType) {\n DecodedTextType[DecodedTextType[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n DecodedTextType[DecodedTextType[\"URL\"] = 1] = \"URL\";\n return DecodedTextType;\n}(DecodedTextType || {});\nexport function isValidHtml5QrcodeSupportedFormats(format) {\n return Object.values(Html5QrcodeSupportedFormats).includes(format);\n}\nexport var Html5QrcodeScanType = /*#__PURE__*/function (Html5QrcodeScanType) {\n Html5QrcodeScanType[Html5QrcodeScanType[\"SCAN_TYPE_CAMERA\"] = 0] = \"SCAN_TYPE_CAMERA\";\n Html5QrcodeScanType[Html5QrcodeScanType[\"SCAN_TYPE_FILE\"] = 1] = \"SCAN_TYPE_FILE\";\n return Html5QrcodeScanType;\n}(Html5QrcodeScanType || {});\nvar Html5QrcodeConstants = function () {\n function Html5QrcodeConstants() {}\n Html5QrcodeConstants.GITHUB_PROJECT_URL = \"https://github.com/mebjas/html5-qrcode\";\n Html5QrcodeConstants.SCAN_DEFAULT_FPS = 2;\n Html5QrcodeConstants.DEFAULT_DISABLE_FLIP = false;\n Html5QrcodeConstants.DEFAULT_REMEMBER_LAST_CAMERA_USED = true;\n Html5QrcodeConstants.DEFAULT_SUPPORTED_SCAN_TYPE = [Html5QrcodeScanType.SCAN_TYPE_CAMERA, Html5QrcodeScanType.SCAN_TYPE_FILE];\n return Html5QrcodeConstants;\n}();\nexport { Html5QrcodeConstants };\nvar QrcodeResultFormat = function () {\n function QrcodeResultFormat(format, formatName) {\n this.format = format;\n this.formatName = formatName;\n }\n QrcodeResultFormat.prototype.toString = function () {\n return this.formatName;\n };\n QrcodeResultFormat.create = function (format) {\n if (!html5QrcodeSupportedFormatsTextMap.has(format)) {\n throw format + \" not in html5QrcodeSupportedFormatsTextMap\";\n }\n return new QrcodeResultFormat(format, html5QrcodeSupportedFormatsTextMap.get(format));\n };\n return QrcodeResultFormat;\n}();\nexport { QrcodeResultFormat };\nvar Html5QrcodeResultFactory = function () {\n function Html5QrcodeResultFactory() {}\n Html5QrcodeResultFactory.createFromText = function (decodedText) {\n var qrcodeResult = {\n text: decodedText\n };\n return {\n decodedText: decodedText,\n result: qrcodeResult\n };\n };\n Html5QrcodeResultFactory.createFromQrcodeResult = function (qrcodeResult) {\n return {\n decodedText: qrcodeResult.text,\n result: qrcodeResult\n };\n };\n return Html5QrcodeResultFactory;\n}();\nexport { Html5QrcodeResultFactory };\nexport var Html5QrcodeErrorTypes = /*#__PURE__*/function (Html5QrcodeErrorTypes) {\n Html5QrcodeErrorTypes[Html5QrcodeErrorTypes[\"UNKWOWN_ERROR\"] = 0] = \"UNKWOWN_ERROR\";\n Html5QrcodeErrorTypes[Html5QrcodeErrorTypes[\"IMPLEMENTATION_ERROR\"] = 1] = \"IMPLEMENTATION_ERROR\";\n Html5QrcodeErrorTypes[Html5QrcodeErrorTypes[\"NO_CODE_FOUND_ERROR\"] = 2] = \"NO_CODE_FOUND_ERROR\";\n return Html5QrcodeErrorTypes;\n}(Html5QrcodeErrorTypes || {});\nvar Html5QrcodeErrorFactory = function () {\n function Html5QrcodeErrorFactory() {}\n Html5QrcodeErrorFactory.createFrom = function (error) {\n return {\n errorMessage: error,\n type: Html5QrcodeErrorTypes.UNKWOWN_ERROR\n };\n };\n return Html5QrcodeErrorFactory;\n}();\nexport { Html5QrcodeErrorFactory };\nvar BaseLoggger = function () {\n function BaseLoggger(verbose) {\n this.verbose = verbose;\n }\n BaseLoggger.prototype.log = function (message) {\n if (this.verbose) {\n console.log(message);\n }\n };\n BaseLoggger.prototype.warn = function (message) {\n if (this.verbose) {\n console.warn(message);\n }\n };\n BaseLoggger.prototype.logError = function (message, isExperimental) {\n if (this.verbose || isExperimental === true) {\n console.error(message);\n }\n };\n BaseLoggger.prototype.logErrors = function (errors) {\n if (errors.length === 0) {\n throw \"Logger#logError called without arguments\";\n }\n if (this.verbose) {\n console.error(errors);\n }\n };\n return BaseLoggger;\n}();\nexport { BaseLoggger };\nexport function isNullOrUndefined(obj) {\n return typeof obj === \"undefined\" || obj === null;\n}\nexport function clip(value, minValue, maxValue) {\n if (value > maxValue) {\n return maxValue;\n }\n if (value < minValue) {\n return minValue;\n }\n return value;\n}\n","var Html5QrcodeStrings = function () {\n function Html5QrcodeStrings() {}\n Html5QrcodeStrings.codeParseError = function (exception) {\n return \"QR code parse error, error = \" + exception;\n };\n Html5QrcodeStrings.errorGettingUserMedia = function (error) {\n return \"Error getting userMedia, error = \" + error;\n };\n Html5QrcodeStrings.onlyDeviceSupportedError = function () {\n return \"The device doesn't support navigator.mediaDevices , only \" + \"supported cameraIdOrConfig in this case is deviceId parameter \" + \"(string).\";\n };\n Html5QrcodeStrings.cameraStreamingNotSupported = function () {\n return \"Camera streaming not supported by the browser.\";\n };\n Html5QrcodeStrings.unableToQuerySupportedDevices = function () {\n return \"Unable to query supported devices, unknown error.\";\n };\n Html5QrcodeStrings.insecureContextCameraQueryError = function () {\n return \"Camera access is only supported in secure context like https \" + \"or localhost.\";\n };\n return Html5QrcodeStrings;\n}();\nexport { Html5QrcodeStrings };\nvar Html5QrcodeScannerStrings = function () {\n function Html5QrcodeScannerStrings() {}\n Html5QrcodeScannerStrings.scanningStatus = function () {\n return \"Scanning\";\n };\n Html5QrcodeScannerStrings.idleStatus = function () {\n return \"Idle\";\n };\n Html5QrcodeScannerStrings.errorStatus = function () {\n return \"Error\";\n };\n Html5QrcodeScannerStrings.permissionStatus = function () {\n return \"Permission\";\n };\n Html5QrcodeScannerStrings.noCameraFoundErrorStatus = function () {\n return \"No Cameras\";\n };\n Html5QrcodeScannerStrings.lastMatch = function (decodedText) {\n return \"Last Match: \" + decodedText;\n };\n Html5QrcodeScannerStrings.codeScannerTitle = function () {\n return \"Code Scanner\";\n };\n Html5QrcodeScannerStrings.cameraPermissionTitle = function () {\n return \"Request Camera Permissions\";\n };\n Html5QrcodeScannerStrings.cameraPermissionRequesting = function () {\n return \"Requesting camera permissions...\";\n };\n Html5QrcodeScannerStrings.noCameraFound = function () {\n return \"No camera found\";\n };\n Html5QrcodeScannerStrings.scanButtonStopScanningText = function () {\n return \"Stop Scanning\";\n };\n Html5QrcodeScannerStrings.scanButtonStartScanningText = function () {\n return \"Start Scanning\";\n };\n Html5QrcodeScannerStrings.torchOnButton = function () {\n return \"Switch On Torch\";\n };\n Html5QrcodeScannerStrings.torchOffButton = function () {\n return \"Switch Off Torch\";\n };\n Html5QrcodeScannerStrings.torchOnFailedMessage = function () {\n return \"Failed to turn on torch\";\n };\n Html5QrcodeScannerStrings.torchOffFailedMessage = function () {\n return \"Failed to turn off torch\";\n };\n Html5QrcodeScannerStrings.scanButtonScanningStarting = function () {\n return \"Launching Camera...\";\n };\n Html5QrcodeScannerStrings.textIfCameraScanSelected = function () {\n return \"Scan an Image File\";\n };\n Html5QrcodeScannerStrings.textIfFileScanSelected = function () {\n return \"Scan using camera directly\";\n };\n Html5QrcodeScannerStrings.selectCamera = function () {\n return \"Select Camera\";\n };\n Html5QrcodeScannerStrings.fileSelectionChooseImage = function () {\n return \"Choose Image\";\n };\n Html5QrcodeScannerStrings.fileSelectionChooseAnother = function () {\n return \"Choose Another\";\n };\n Html5QrcodeScannerStrings.fileSelectionNoImageSelected = function () {\n return \"No image choosen\";\n };\n Html5QrcodeScannerStrings.anonymousCameraPrefix = function () {\n return \"Anonymous Camera\";\n };\n Html5QrcodeScannerStrings.dragAndDropMessage = function () {\n return \"Or drop an image to scan\";\n };\n Html5QrcodeScannerStrings.dragAndDropMessageOnlyImages = function () {\n return \"Or drop an image to scan (other files not supported)\";\n };\n Html5QrcodeScannerStrings.zoom = function () {\n return \"zoom\";\n };\n Html5QrcodeScannerStrings.loadingImage = function () {\n return \"Loading image...\";\n };\n return Html5QrcodeScannerStrings;\n}();\nexport { Html5QrcodeScannerStrings };\nvar LibraryInfoStrings = function () {\n function LibraryInfoStrings() {}\n LibraryInfoStrings.poweredBy = function () {\n return \"Powered by \";\n };\n LibraryInfoStrings.reportIssues = function () {\n return \"Report issues\";\n };\n return LibraryInfoStrings;\n}();\nexport { LibraryInfoStrings };\n","var VideoConstraintsUtil = function () {\n function VideoConstraintsUtil() {}\n VideoConstraintsUtil.isMediaStreamConstraintsValid = function (videoConstraints, logger) {\n if (typeof videoConstraints !== \"object\") {\n var typeofVideoConstraints = typeof videoConstraints;\n logger.logError(\"videoConstraints should be of type object, the \" + (\"object passed is of type \" + typeofVideoConstraints + \".\"), true);\n return false;\n }\n var bannedKeys = [\"autoGainControl\", \"channelCount\", \"echoCancellation\", \"latency\", \"noiseSuppression\", \"sampleRate\", \"sampleSize\", \"volume\"];\n var bannedkeysSet = new Set(bannedKeys);\n var keysInVideoConstraints = Object.keys(videoConstraints);\n for (var _i = 0, keysInVideoConstraints_1 = keysInVideoConstraints; _i < keysInVideoConstraints_1.length; _i++) {\n var key = keysInVideoConstraints_1[_i];\n if (bannedkeysSet.has(key)) {\n logger.logError(key + \" is not supported videoConstaints.\", true);\n return false;\n }\n }\n return true;\n };\n return VideoConstraintsUtil;\n}();\nexport { VideoConstraintsUtil };\n","import * as ZXing from \"../third_party/zxing-js.umd\";\nimport { QrcodeResultFormat, Html5QrcodeSupportedFormats } from \"./core\";\nvar ZXingHtml5QrcodeDecoder = function () {\n function ZXingHtml5QrcodeDecoder(requestedFormats, verbose, logger) {\n this.formatMap = new Map([[Html5QrcodeSupportedFormats.QR_CODE, ZXing.BarcodeFormat.QR_CODE], [Html5QrcodeSupportedFormats.AZTEC, ZXing.BarcodeFormat.AZTEC], [Html5QrcodeSupportedFormats.CODABAR, ZXing.BarcodeFormat.CODABAR], [Html5QrcodeSupportedFormats.CODE_39, ZXing.BarcodeFormat.CODE_39], [Html5QrcodeSupportedFormats.CODE_93, ZXing.BarcodeFormat.CODE_93], [Html5QrcodeSupportedFormats.CODE_128, ZXing.BarcodeFormat.CODE_128], [Html5QrcodeSupportedFormats.DATA_MATRIX, ZXing.BarcodeFormat.DATA_MATRIX], [Html5QrcodeSupportedFormats.MAXICODE, ZXing.BarcodeFormat.MAXICODE], [Html5QrcodeSupportedFormats.ITF, ZXing.BarcodeFormat.ITF], [Html5QrcodeSupportedFormats.EAN_13, ZXing.BarcodeFormat.EAN_13], [Html5QrcodeSupportedFormats.EAN_8, ZXing.BarcodeFormat.EAN_8], [Html5QrcodeSupportedFormats.PDF_417, ZXing.BarcodeFormat.PDF_417], [Html5QrcodeSupportedFormats.RSS_14, ZXing.BarcodeFormat.RSS_14], [Html5QrcodeSupportedFormats.RSS_EXPANDED, ZXing.BarcodeFormat.RSS_EXPANDED], [Html5QrcodeSupportedFormats.UPC_A, ZXing.BarcodeFormat.UPC_A], [Html5QrcodeSupportedFormats.UPC_E, ZXing.BarcodeFormat.UPC_E], [Html5QrcodeSupportedFormats.UPC_EAN_EXTENSION, ZXing.BarcodeFormat.UPC_EAN_EXTENSION]]);\n this.reverseFormatMap = this.createReverseFormatMap();\n if (!ZXing) {\n throw \"Use html5qrcode.min.js without edit, ZXing not found.\";\n }\n this.verbose = verbose;\n this.logger = logger;\n var formats = this.createZXingFormats(requestedFormats);\n var hints = new Map();\n hints.set(ZXing.DecodeHintType.POSSIBLE_FORMATS, formats);\n hints.set(ZXing.DecodeHintType.TRY_HARDER, false);\n this.hints = hints;\n }\n ZXingHtml5QrcodeDecoder.prototype.decodeAsync = function (canvas) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n resolve(_this.decode(canvas));\n } catch (error) {\n reject(error);\n }\n });\n };\n ZXingHtml5QrcodeDecoder.prototype.decode = function (canvas) {\n var zxingDecoder = new ZXing.MultiFormatReader(this.verbose, this.hints);\n var luminanceSource = new ZXing.HTMLCanvasElementLuminanceSource(canvas);\n var binaryBitmap = new ZXing.BinaryBitmap(new ZXing.HybridBinarizer(luminanceSource));\n var result = zxingDecoder.decode(binaryBitmap);\n return {\n text: result.text,\n format: QrcodeResultFormat.create(this.toHtml5QrcodeSupportedFormats(result.format)),\n debugData: this.createDebugData()\n };\n };\n ZXingHtml5QrcodeDecoder.prototype.createReverseFormatMap = function () {\n var result = new Map();\n this.formatMap.forEach(function (value, key, _) {\n result.set(value, key);\n });\n return result;\n };\n ZXingHtml5QrcodeDecoder.prototype.toHtml5QrcodeSupportedFormats = function (zxingFormat) {\n if (!this.reverseFormatMap.has(zxingFormat)) {\n throw \"reverseFormatMap doesn't have \" + zxingFormat;\n }\n return this.reverseFormatMap.get(zxingFormat);\n };\n ZXingHtml5QrcodeDecoder.prototype.createZXingFormats = function (requestedFormats) {\n var zxingFormats = [];\n for (var _i = 0, requestedFormats_1 = requestedFormats; _i < requestedFormats_1.length; _i++) {\n var requestedFormat = requestedFormats_1[_i];\n if (this.formatMap.has(requestedFormat)) {\n zxingFormats.push(this.formatMap.get(requestedFormat));\n } else {\n this.logger.logError(requestedFormat + \" is not supported by\" + \"ZXingHtml5QrcodeShim\");\n }\n }\n return zxingFormats;\n };\n ZXingHtml5QrcodeDecoder.prototype.createDebugData = function () {\n return {\n decoderName: \"zxing-js\"\n };\n };\n return ZXingHtml5QrcodeDecoder;\n}();\nexport { ZXingHtml5QrcodeDecoder };\n","var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n};\nimport { QrcodeResultFormat, Html5QrcodeSupportedFormats } from \"./core\";\nvar BarcodeDetectorDelegate = function () {\n function BarcodeDetectorDelegate(requestedFormats, verbose, logger) {\n this.formatMap = new Map([[Html5QrcodeSupportedFormats.QR_CODE, \"qr_code\"], [Html5QrcodeSupportedFormats.AZTEC, \"aztec\"], [Html5QrcodeSupportedFormats.CODABAR, \"codabar\"], [Html5QrcodeSupportedFormats.CODE_39, \"code_39\"], [Html5QrcodeSupportedFormats.CODE_93, \"code_93\"], [Html5QrcodeSupportedFormats.CODE_128, \"code_128\"], [Html5QrcodeSupportedFormats.DATA_MATRIX, \"data_matrix\"], [Html5QrcodeSupportedFormats.ITF, \"itf\"], [Html5QrcodeSupportedFormats.EAN_13, \"ean_13\"], [Html5QrcodeSupportedFormats.EAN_8, \"ean_8\"], [Html5QrcodeSupportedFormats.PDF_417, \"pdf417\"], [Html5QrcodeSupportedFormats.UPC_A, \"upc_a\"], [Html5QrcodeSupportedFormats.UPC_E, \"upc_e\"]]);\n this.reverseFormatMap = this.createReverseFormatMap();\n if (!BarcodeDetectorDelegate.isSupported()) {\n throw \"Use html5qrcode.min.js without edit, Use \" + \"BarcodeDetectorDelegate only if it isSupported();\";\n }\n this.verbose = verbose;\n this.logger = logger;\n var formats = this.createBarcodeDetectorFormats(requestedFormats);\n this.detector = new BarcodeDetector(formats);\n if (!this.detector) {\n throw \"BarcodeDetector detector not supported\";\n }\n }\n BarcodeDetectorDelegate.isSupported = function () {\n if (!(\"BarcodeDetector\" in window)) {\n return false;\n }\n var dummyDetector = new BarcodeDetector({\n formats: [\"qr_code\"]\n });\n return typeof dummyDetector !== \"undefined\";\n };\n BarcodeDetectorDelegate.prototype.decodeAsync = function (canvas) {\n return __awaiter(this, void 0, void 0, function () {\n var barcodes, largestBarcode;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4, this.detector.detect(canvas)];\n case 1:\n barcodes = _a.sent();\n if (!barcodes || barcodes.length === 0) {\n throw \"No barcode or QR code detected.\";\n }\n largestBarcode = this.selectLargestBarcode(barcodes);\n return [2, {\n text: largestBarcode.rawValue,\n format: QrcodeResultFormat.create(this.toHtml5QrcodeSupportedFormats(largestBarcode.format)),\n debugData: this.createDebugData()\n }];\n }\n });\n });\n };\n BarcodeDetectorDelegate.prototype.selectLargestBarcode = function (barcodes) {\n var largestBarcode = null;\n var maxArea = 0;\n for (var _i = 0, barcodes_1 = barcodes; _i < barcodes_1.length; _i++) {\n var barcode = barcodes_1[_i];\n var area = barcode.boundingBox.width * barcode.boundingBox.height;\n if (area > maxArea) {\n maxArea = area;\n largestBarcode = barcode;\n }\n }\n if (!largestBarcode) {\n throw \"No largest barcode found\";\n }\n return largestBarcode;\n };\n BarcodeDetectorDelegate.prototype.createBarcodeDetectorFormats = function (requestedFormats) {\n var formats = [];\n for (var _i = 0, requestedFormats_1 = requestedFormats; _i < requestedFormats_1.length; _i++) {\n var requestedFormat = requestedFormats_1[_i];\n if (this.formatMap.has(requestedFormat)) {\n formats.push(this.formatMap.get(requestedFormat));\n } else {\n this.logger.warn(requestedFormat + \" is not supported by\" + \"BarcodeDetectorDelegate\");\n }\n }\n return {\n formats: formats\n };\n };\n BarcodeDetectorDelegate.prototype.toHtml5QrcodeSupportedFormats = function (barcodeDetectorFormat) {\n if (!this.reverseFormatMap.has(barcodeDetectorFormat)) {\n throw \"reverseFormatMap doesn't have \" + barcodeDetectorFormat;\n }\n return this.reverseFormatMap.get(barcodeDetectorFormat);\n };\n BarcodeDetectorDelegate.prototype.createReverseFormatMap = function () {\n var result = new Map();\n this.formatMap.forEach(function (value, key, _) {\n result.set(value, key);\n });\n return result;\n };\n BarcodeDetectorDelegate.prototype.createDebugData = function () {\n return {\n decoderName: \"BarcodeDetector\"\n };\n };\n return BarcodeDetectorDelegate;\n}();\nexport { BarcodeDetectorDelegate };\n","var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n};\nimport { ZXingHtml5QrcodeDecoder } from \"./zxing-html5-qrcode-decoder\";\nimport { BarcodeDetectorDelegate } from \"./native-bar-code-detector\";\nvar Html5QrcodeShim = function () {\n function Html5QrcodeShim(requestedFormats, useBarCodeDetectorIfSupported, verbose, logger) {\n this.EXECUTIONS_TO_REPORT_PERFORMANCE = 100;\n this.executions = 0;\n this.executionResults = [];\n this.wasPrimaryDecoderUsedInLastDecode = false;\n this.verbose = verbose;\n if (useBarCodeDetectorIfSupported && BarcodeDetectorDelegate.isSupported()) {\n this.primaryDecoder = new BarcodeDetectorDelegate(requestedFormats, verbose, logger);\n this.secondaryDecoder = new ZXingHtml5QrcodeDecoder(requestedFormats, verbose, logger);\n } else {\n this.primaryDecoder = new ZXingHtml5QrcodeDecoder(requestedFormats, verbose, logger);\n }\n }\n Html5QrcodeShim.prototype.decodeAsync = function (canvas) {\n return __awaiter(this, void 0, void 0, function () {\n var startTime;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTime = performance.now();\n _a.label = 1;\n case 1:\n _a.trys.push([1,, 3, 4]);\n return [4, this.getDecoder().decodeAsync(canvas)];\n case 2:\n return [2, _a.sent()];\n case 3:\n this.possiblyLogPerformance(startTime);\n return [7];\n case 4:\n return [2];\n }\n });\n });\n };\n Html5QrcodeShim.prototype.decodeRobustlyAsync = function (canvas) {\n return __awaiter(this, void 0, void 0, function () {\n var startTime, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTime = performance.now();\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, 4, 5]);\n return [4, this.primaryDecoder.decodeAsync(canvas)];\n case 2:\n return [2, _a.sent()];\n case 3:\n error_1 = _a.sent();\n if (this.secondaryDecoder) {\n return [2, this.secondaryDecoder.decodeAsync(canvas)];\n }\n throw error_1;\n case 4:\n this.possiblyLogPerformance(startTime);\n return [7];\n case 5:\n return [2];\n }\n });\n });\n };\n Html5QrcodeShim.prototype.getDecoder = function () {\n if (!this.secondaryDecoder) {\n return this.primaryDecoder;\n }\n if (this.wasPrimaryDecoderUsedInLastDecode === false) {\n this.wasPrimaryDecoderUsedInLastDecode = true;\n return this.primaryDecoder;\n }\n this.wasPrimaryDecoderUsedInLastDecode = false;\n return this.secondaryDecoder;\n };\n Html5QrcodeShim.prototype.possiblyLogPerformance = function (startTime) {\n if (!this.verbose) {\n return;\n }\n var executionTime = performance.now() - startTime;\n this.executionResults.push(executionTime);\n this.executions++;\n this.possiblyFlushPerformanceReport();\n };\n Html5QrcodeShim.prototype.possiblyFlushPerformanceReport = function () {\n if (this.executions < this.EXECUTIONS_TO_REPORT_PERFORMANCE) {\n return;\n }\n var sum = 0;\n for (var _i = 0, _a = this.executionResults; _i < _a.length; _i++) {\n var executionTime = _a[_i];\n sum += executionTime;\n }\n var mean = sum / this.executionResults.length;\n console.log(mean + \" ms for \" + this.executionResults.length + \" last runs.\");\n this.executions = 0;\n this.executionResults = [];\n };\n return Html5QrcodeShim;\n}();\nexport { Html5QrcodeShim };\n","var __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n};\nvar AbstractCameraCapability = function () {\n function AbstractCameraCapability(name, track) {\n this.name = name;\n this.track = track;\n }\n AbstractCameraCapability.prototype.isSupported = function () {\n if (!this.track.getCapabilities) {\n return false;\n }\n return this.name in this.track.getCapabilities();\n };\n AbstractCameraCapability.prototype.apply = function (value) {\n var constraint = {};\n constraint[this.name] = value;\n var constraints = {\n advanced: [constraint]\n };\n return this.track.applyConstraints(constraints);\n };\n AbstractCameraCapability.prototype.value = function () {\n var settings = this.track.getSettings();\n if (this.name in settings) {\n var settingValue = settings[this.name];\n return settingValue;\n }\n return null;\n };\n return AbstractCameraCapability;\n}();\nvar AbstractRangeCameraCapability = function (_super) {\n __extends(AbstractRangeCameraCapability, _super);\n function AbstractRangeCameraCapability(name, track) {\n return _super.call(this, name, track) || this;\n }\n AbstractRangeCameraCapability.prototype.min = function () {\n return this.getCapabilities().min;\n };\n AbstractRangeCameraCapability.prototype.max = function () {\n return this.getCapabilities().max;\n };\n AbstractRangeCameraCapability.prototype.step = function () {\n return this.getCapabilities().step;\n };\n AbstractRangeCameraCapability.prototype.apply = function (value) {\n var constraint = {};\n constraint[this.name] = value;\n var constraints = {\n advanced: [constraint]\n };\n return this.track.applyConstraints(constraints);\n };\n AbstractRangeCameraCapability.prototype.getCapabilities = function () {\n this.failIfNotSupported();\n var capabilities = this.track.getCapabilities();\n var capability = capabilities[this.name];\n return {\n min: capability.min,\n max: capability.max,\n step: capability.step\n };\n };\n AbstractRangeCameraCapability.prototype.failIfNotSupported = function () {\n if (!this.isSupported()) {\n throw new Error(this.name + \" capability not supported\");\n }\n };\n return AbstractRangeCameraCapability;\n}(AbstractCameraCapability);\nvar ZoomFeatureImpl = function (_super) {\n __extends(ZoomFeatureImpl, _super);\n function ZoomFeatureImpl(track) {\n return _super.call(this, \"zoom\", track) || this;\n }\n return ZoomFeatureImpl;\n}(AbstractRangeCameraCapability);\nvar TorchFeatureImpl = function (_super) {\n __extends(TorchFeatureImpl, _super);\n function TorchFeatureImpl(track) {\n return _super.call(this, \"torch\", track) || this;\n }\n return TorchFeatureImpl;\n}(AbstractCameraCapability);\nvar CameraCapabilitiesImpl = function () {\n function CameraCapabilitiesImpl(track) {\n this.track = track;\n }\n CameraCapabilitiesImpl.prototype.zoomFeature = function () {\n return new ZoomFeatureImpl(this.track);\n };\n CameraCapabilitiesImpl.prototype.torchFeature = function () {\n return new TorchFeatureImpl(this.track);\n };\n return CameraCapabilitiesImpl;\n}();\nvar RenderedCameraImpl = function () {\n function RenderedCameraImpl(parentElement, mediaStream, callbacks) {\n this.isClosed = false;\n this.parentElement = parentElement;\n this.mediaStream = mediaStream;\n this.callbacks = callbacks;\n this.surface = this.createVideoElement(this.parentElement.clientWidth);\n parentElement.append(this.surface);\n }\n RenderedCameraImpl.prototype.createVideoElement = function (width) {\n var videoElement = document.createElement(\"video\");\n videoElement.style.width = width + \"px\";\n videoElement.style.display = \"block\";\n videoElement.muted = true;\n videoElement.setAttribute(\"muted\", \"true\");\n videoElement.playsInline = true;\n return videoElement;\n };\n RenderedCameraImpl.prototype.setupSurface = function () {\n var _this = this;\n this.surface.onabort = function () {\n throw \"RenderedCameraImpl video surface onabort() called\";\n };\n this.surface.onerror = function () {\n throw \"RenderedCameraImpl video surface onerror() called\";\n };\n var onVideoStart = function () {\n var videoWidth = _this.surface.clientWidth;\n var videoHeight = _this.surface.clientHeight;\n _this.callbacks.onRenderSurfaceReady(videoWidth, videoHeight);\n _this.surface.removeEventListener(\"playing\", onVideoStart);\n };\n this.surface.addEventListener(\"playing\", onVideoStart);\n this.surface.srcObject = this.mediaStream;\n this.surface.play();\n };\n RenderedCameraImpl.create = function (parentElement, mediaStream, options, callbacks) {\n return __awaiter(this, void 0, void 0, function () {\n var renderedCamera, aspectRatioConstraint;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n renderedCamera = new RenderedCameraImpl(parentElement, mediaStream, callbacks);\n if (!options.aspectRatio) return [3, 2];\n aspectRatioConstraint = {\n aspectRatio: options.aspectRatio\n };\n return [4, renderedCamera.getFirstTrackOrFail().applyConstraints(aspectRatioConstraint)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n renderedCamera.setupSurface();\n return [2, renderedCamera];\n }\n });\n });\n };\n RenderedCameraImpl.prototype.failIfClosed = function () {\n if (this.isClosed) {\n throw \"The RenderedCamera has already been closed.\";\n }\n };\n RenderedCameraImpl.prototype.getFirstTrackOrFail = function () {\n this.failIfClosed();\n if (this.mediaStream.getVideoTracks().length === 0) {\n throw \"No video tracks found\";\n }\n return this.mediaStream.getVideoTracks()[0];\n };\n RenderedCameraImpl.prototype.pause = function () {\n this.failIfClosed();\n this.surface.pause();\n };\n RenderedCameraImpl.prototype.resume = function (onResumeCallback) {\n this.failIfClosed();\n var $this = this;\n var onVideoResume = function () {\n setTimeout(onResumeCallback, 200);\n $this.surface.removeEventListener(\"playing\", onVideoResume);\n };\n this.surface.addEventListener(\"playing\", onVideoResume);\n this.surface.play();\n };\n RenderedCameraImpl.prototype.isPaused = function () {\n this.failIfClosed();\n return this.surface.paused;\n };\n RenderedCameraImpl.prototype.getSurface = function () {\n this.failIfClosed();\n return this.surface;\n };\n RenderedCameraImpl.prototype.getRunningTrackCapabilities = function () {\n return this.getFirstTrackOrFail().getCapabilities();\n };\n RenderedCameraImpl.prototype.getRunningTrackSettings = function () {\n return this.getFirstTrackOrFail().getSettings();\n };\n RenderedCameraImpl.prototype.applyVideoConstraints = function (constraints) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (\"aspectRatio\" in constraints) {\n throw \"Changing 'aspectRatio' in run-time is not yet supported.\";\n }\n return [2, this.getFirstTrackOrFail().applyConstraints(constraints)];\n });\n });\n };\n RenderedCameraImpl.prototype.close = function () {\n if (this.isClosed) {\n return Promise.resolve();\n }\n var $this = this;\n return new Promise(function (resolve, _) {\n var tracks = $this.mediaStream.getVideoTracks();\n var tracksToClose = tracks.length;\n var tracksClosed = 0;\n $this.mediaStream.getVideoTracks().forEach(function (videoTrack) {\n $this.mediaStream.removeTrack(videoTrack);\n videoTrack.stop();\n ++tracksClosed;\n if (tracksClosed >= tracksToClose) {\n $this.isClosed = true;\n $this.parentElement.removeChild($this.surface);\n resolve();\n }\n });\n });\n };\n RenderedCameraImpl.prototype.getCapabilities = function () {\n return new CameraCapabilitiesImpl(this.getFirstTrackOrFail());\n };\n return RenderedCameraImpl;\n}();\nvar CameraImpl = function () {\n function CameraImpl(mediaStream) {\n this.mediaStream = mediaStream;\n }\n CameraImpl.prototype.render = function (parentElement, options, callbacks) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2, RenderedCameraImpl.create(parentElement, this.mediaStream, options, callbacks)];\n });\n });\n };\n CameraImpl.create = function (videoConstraints) {\n return __awaiter(this, void 0, void 0, function () {\n var constraints, mediaStream;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!navigator.mediaDevices) {\n throw \"navigator.mediaDevices not supported\";\n }\n constraints = {\n audio: false,\n video: videoConstraints\n };\n return [4, navigator.mediaDevices.getUserMedia(constraints)];\n case 1:\n mediaStream = _a.sent();\n return [2, new CameraImpl(mediaStream)];\n }\n });\n });\n };\n return CameraImpl;\n}();\nexport { CameraImpl };\n","var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n};\nimport { CameraImpl } from \"./core-impl\";\nvar CameraFactory = function () {\n function CameraFactory() {}\n CameraFactory.failIfNotSupported = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!navigator.mediaDevices) {\n throw \"navigator.mediaDevices not supported\";\n }\n return [2, new CameraFactory()];\n });\n });\n };\n CameraFactory.prototype.create = function (videoConstraints) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2, CameraImpl.create(videoConstraints)];\n });\n });\n };\n return CameraFactory;\n}();\nexport { CameraFactory };\n","var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n};\nimport { Html5QrcodeStrings } from \"../strings\";\nvar CameraRetriever = function () {\n function CameraRetriever() {}\n CameraRetriever.retrieve = function () {\n if (navigator.mediaDevices) {\n return CameraRetriever.getCamerasFromMediaDevices();\n }\n var mst = MediaStreamTrack;\n if (MediaStreamTrack && mst.getSources) {\n return CameraRetriever.getCamerasFromMediaStreamTrack();\n }\n return CameraRetriever.rejectWithError();\n };\n CameraRetriever.rejectWithError = function () {\n var errorMessage = Html5QrcodeStrings.unableToQuerySupportedDevices();\n if (!CameraRetriever.isHttpsOrLocalhost()) {\n errorMessage = Html5QrcodeStrings.insecureContextCameraQueryError();\n }\n return Promise.reject(errorMessage);\n };\n CameraRetriever.isHttpsOrLocalhost = function () {\n if (location.protocol === \"https:\") {\n return true;\n }\n var host = location.host.split(\":\")[0];\n return host === \"127.0.0.1\" || host === \"localhost\";\n };\n CameraRetriever.getCamerasFromMediaDevices = function () {\n return __awaiter(this, void 0, void 0, function () {\n var closeActiveStreams, mediaStream, devices, results, _i, devices_1, device;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n closeActiveStreams = function (stream) {\n var tracks = stream.getVideoTracks();\n for (var _i = 0, tracks_1 = tracks; _i < tracks_1.length; _i++) {\n var track = tracks_1[_i];\n track.enabled = false;\n track.stop();\n stream.removeTrack(track);\n }\n };\n return [4, navigator.mediaDevices.getUserMedia({\n audio: false,\n video: true\n })];\n case 1:\n mediaStream = _a.sent();\n return [4, navigator.mediaDevices.enumerateDevices()];\n case 2:\n devices = _a.sent();\n results = [];\n for (_i = 0, devices_1 = devices; _i < devices_1.length; _i++) {\n device = devices_1[_i];\n if (device.kind === \"videoinput\") {\n results.push({\n id: device.deviceId,\n label: device.label\n });\n }\n }\n closeActiveStreams(mediaStream);\n return [2, results];\n }\n });\n });\n };\n CameraRetriever.getCamerasFromMediaStreamTrack = function () {\n return new Promise(function (resolve, _) {\n var callback = function (sourceInfos) {\n var results = [];\n for (var _i = 0, sourceInfos_1 = sourceInfos; _i < sourceInfos_1.length; _i++) {\n var sourceInfo = sourceInfos_1[_i];\n if (sourceInfo.kind === \"video\") {\n results.push({\n id: sourceInfo.id,\n label: sourceInfo.label\n });\n }\n }\n resolve(results);\n };\n var mst = MediaStreamTrack;\n mst.getSources(callback);\n });\n };\n return CameraRetriever;\n}();\nexport { CameraRetriever };\n","export var Html5QrcodeScannerState = /*#__PURE__*/function (Html5QrcodeScannerState) {\n Html5QrcodeScannerState[Html5QrcodeScannerState[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n Html5QrcodeScannerState[Html5QrcodeScannerState[\"NOT_STARTED\"] = 1] = \"NOT_STARTED\";\n Html5QrcodeScannerState[Html5QrcodeScannerState[\"SCANNING\"] = 2] = \"SCANNING\";\n Html5QrcodeScannerState[Html5QrcodeScannerState[\"PAUSED\"] = 3] = \"PAUSED\";\n return Html5QrcodeScannerState;\n}(Html5QrcodeScannerState || {});\nvar StateManagerImpl = function () {\n function StateManagerImpl() {\n this.state = Html5QrcodeScannerState.NOT_STARTED;\n this.onGoingTransactionNewState = Html5QrcodeScannerState.UNKNOWN;\n }\n StateManagerImpl.prototype.directTransition = function (newState) {\n this.failIfTransitionOngoing();\n this.validateTransition(newState);\n this.state = newState;\n };\n StateManagerImpl.prototype.startTransition = function (newState) {\n this.failIfTransitionOngoing();\n this.validateTransition(newState);\n this.onGoingTransactionNewState = newState;\n return this;\n };\n StateManagerImpl.prototype.execute = function () {\n if (this.onGoingTransactionNewState === Html5QrcodeScannerState.UNKNOWN) {\n throw \"Transaction is already cancelled, cannot execute().\";\n }\n var tempNewState = this.onGoingTransactionNewState;\n this.onGoingTransactionNewState = Html5QrcodeScannerState.UNKNOWN;\n this.directTransition(tempNewState);\n };\n StateManagerImpl.prototype.cancel = function () {\n if (this.onGoingTransactionNewState === Html5QrcodeScannerState.UNKNOWN) {\n throw \"Transaction is already cancelled, cannot cancel().\";\n }\n this.onGoingTransactionNewState = Html5QrcodeScannerState.UNKNOWN;\n };\n StateManagerImpl.prototype.getState = function () {\n return this.state;\n };\n StateManagerImpl.prototype.failIfTransitionOngoing = function () {\n if (this.onGoingTransactionNewState !== Html5QrcodeScannerState.UNKNOWN) {\n throw \"Cannot transition to a new state, already under transition\";\n }\n };\n StateManagerImpl.prototype.validateTransition = function (newState) {\n switch (this.state) {\n case Html5QrcodeScannerState.UNKNOWN:\n throw \"Transition from unknown is not allowed\";\n case Html5QrcodeScannerState.NOT_STARTED:\n this.failIfNewStateIs(newState, [Html5QrcodeScannerState.PAUSED]);\n break;\n case Html5QrcodeScannerState.SCANNING:\n break;\n case Html5QrcodeScannerState.PAUSED:\n break;\n }\n };\n StateManagerImpl.prototype.failIfNewStateIs = function (newState, disallowedStatesToTransition) {\n for (var _i = 0, disallowedStatesToTransition_1 = disallowedStatesToTransition; _i < disallowedStatesToTransition_1.length; _i++) {\n var disallowedState = disallowedStatesToTransition_1[_i];\n if (newState === disallowedState) {\n throw \"Cannot transition from \" + this.state + \" to \" + newState;\n }\n }\n };\n return StateManagerImpl;\n}();\nvar StateManagerProxy = function () {\n function StateManagerProxy(stateManager) {\n this.stateManager = stateManager;\n }\n StateManagerProxy.prototype.startTransition = function (newState) {\n return this.stateManager.startTransition(newState);\n };\n StateManagerProxy.prototype.directTransition = function (newState) {\n this.stateManager.directTransition(newState);\n };\n StateManagerProxy.prototype.getState = function () {\n return this.stateManager.getState();\n };\n StateManagerProxy.prototype.canScanFile = function () {\n return this.stateManager.getState() === Html5QrcodeScannerState.NOT_STARTED;\n };\n StateManagerProxy.prototype.isScanning = function () {\n return this.stateManager.getState() !== Html5QrcodeScannerState.NOT_STARTED;\n };\n StateManagerProxy.prototype.isStrictlyScanning = function () {\n return this.stateManager.getState() === Html5QrcodeScannerState.SCANNING;\n };\n StateManagerProxy.prototype.isPaused = function () {\n return this.stateManager.getState() === Html5QrcodeScannerState.PAUSED;\n };\n return StateManagerProxy;\n}();\nexport { StateManagerProxy };\nvar StateManagerFactory = function () {\n function StateManagerFactory() {}\n StateManagerFactory.create = function () {\n return new StateManagerProxy(new StateManagerImpl());\n };\n return StateManagerFactory;\n}();\nexport { StateManagerFactory };\n","var __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { BaseLoggger, Html5QrcodeResultFactory, Html5QrcodeErrorFactory, Html5QrcodeSupportedFormats, isValidHtml5QrcodeSupportedFormats, Html5QrcodeConstants, isNullOrUndefined } from \"./core\";\nimport { Html5QrcodeStrings } from \"./strings\";\nimport { VideoConstraintsUtil } from \"./utils\";\nimport { Html5QrcodeShim } from \"./code-decoder\";\nimport { CameraFactory } from \"./camera/factories\";\nimport { CameraRetriever } from \"./camera/retriever\";\nimport { StateManagerFactory, Html5QrcodeScannerState } from \"./state-manager\";\nvar Constants = function (_super) {\n __extends(Constants, _super);\n function Constants() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Constants.DEFAULT_WIDTH = 300;\n Constants.DEFAULT_WIDTH_OFFSET = 2;\n Constants.FILE_SCAN_MIN_HEIGHT = 300;\n Constants.FILE_SCAN_HIDDEN_CANVAS_PADDING = 100;\n Constants.MIN_QR_BOX_SIZE = 50;\n Constants.SHADED_LEFT = 1;\n Constants.SHADED_RIGHT = 2;\n Constants.SHADED_TOP = 3;\n Constants.SHADED_BOTTOM = 4;\n Constants.SHADED_REGION_ELEMENT_ID = \"qr-shaded-region\";\n Constants.VERBOSE = false;\n Constants.BORDER_SHADER_DEFAULT_COLOR = \"#ffffff\";\n Constants.BORDER_SHADER_MATCH_COLOR = \"rgb(90, 193, 56)\";\n return Constants;\n}(Html5QrcodeConstants);\nvar InternalHtml5QrcodeConfig = function () {\n function InternalHtml5QrcodeConfig(config, logger) {\n this.logger = logger;\n this.fps = Constants.SCAN_DEFAULT_FPS;\n if (!config) {\n this.disableFlip = Constants.DEFAULT_DISABLE_FLIP;\n } else {\n if (config.fps) {\n this.fps = config.fps;\n }\n this.disableFlip = config.disableFlip === true;\n this.qrbox = config.qrbox;\n this.aspectRatio = config.aspectRatio;\n this.videoConstraints = config.videoConstraints;\n }\n }\n InternalHtml5QrcodeConfig.prototype.isMediaStreamConstraintsValid = function () {\n if (!this.videoConstraints) {\n this.logger.logError(\"Empty videoConstraints\", true);\n return false;\n }\n return VideoConstraintsUtil.isMediaStreamConstraintsValid(this.videoConstraints, this.logger);\n };\n InternalHtml5QrcodeConfig.prototype.isShadedBoxEnabled = function () {\n return !isNullOrUndefined(this.qrbox);\n };\n InternalHtml5QrcodeConfig.create = function (config, logger) {\n return new InternalHtml5QrcodeConfig(config, logger);\n };\n return InternalHtml5QrcodeConfig;\n}();\nvar Html5Qrcode = function () {\n function Html5Qrcode(elementId, configOrVerbosityFlag) {\n this.element = null;\n this.canvasElement = null;\n this.scannerPausedUiElement = null;\n this.hasBorderShaders = null;\n this.borderShaders = null;\n this.qrMatch = null;\n this.renderedCamera = null;\n this.qrRegion = null;\n this.context = null;\n this.lastScanImageFile = null;\n this.isScanning = false;\n if (!document.getElementById(elementId)) {\n throw \"HTML Element with id=\" + elementId + \" not found\";\n }\n this.elementId = elementId;\n this.verbose = false;\n var experimentalFeatureConfig;\n var configObject;\n if (typeof configOrVerbosityFlag == \"boolean\") {\n this.verbose = configOrVerbosityFlag === true;\n } else if (configOrVerbosityFlag) {\n configObject = configOrVerbosityFlag;\n this.verbose = configObject.verbose === true;\n experimentalFeatureConfig = configObject.experimentalFeatures;\n }\n this.logger = new BaseLoggger(this.verbose);\n this.qrcode = new Html5QrcodeShim(this.getSupportedFormats(configOrVerbosityFlag), this.getUseBarCodeDetectorIfSupported(configObject), this.verbose, this.logger);\n this.foreverScanTimeout;\n this.shouldScan = true;\n this.stateManagerProxy = StateManagerFactory.create();\n }\n Html5Qrcode.prototype.start = function (cameraIdOrConfig, configuration, qrCodeSuccessCallback, qrCodeErrorCallback) {\n var _this = this;\n if (!cameraIdOrConfig) {\n throw \"cameraIdOrConfig is required\";\n }\n if (!qrCodeSuccessCallback || typeof qrCodeSuccessCallback != \"function\") {\n throw \"qrCodeSuccessCallback is required and should be a function.\";\n }\n var qrCodeErrorCallbackInternal;\n if (qrCodeErrorCallback) {\n qrCodeErrorCallbackInternal = qrCodeErrorCallback;\n } else {\n qrCodeErrorCallbackInternal = this.verbose ? this.logger.log : function () {};\n }\n var internalConfig = InternalHtml5QrcodeConfig.create(configuration, this.logger);\n this.clearElement();\n var videoConstraintsAvailableAndValid = false;\n if (internalConfig.videoConstraints) {\n if (!internalConfig.isMediaStreamConstraintsValid()) {\n this.logger.logError(\"'videoConstraints' is not valid 'MediaStreamConstraints, \" + \"it will be ignored.'\", true);\n } else {\n videoConstraintsAvailableAndValid = true;\n }\n }\n var areVideoConstraintsEnabled = videoConstraintsAvailableAndValid;\n var element = document.getElementById(this.elementId);\n var rootElementWidth = element.clientWidth ? element.clientWidth : Constants.DEFAULT_WIDTH;\n element.style.position = \"relative\";\n this.shouldScan = true;\n this.element = element;\n var $this = this;\n var toScanningStateChangeTransaction = this.stateManagerProxy.startTransition(Html5QrcodeScannerState.SCANNING);\n return new Promise(function (resolve, reject) {\n var videoConstraints = areVideoConstraintsEnabled ? internalConfig.videoConstraints : $this.createVideoConstraints(cameraIdOrConfig);\n if (!videoConstraints) {\n toScanningStateChangeTransaction.cancel();\n reject(\"videoConstraints should be defined\");\n return;\n }\n var cameraRenderingOptions = {};\n if (!areVideoConstraintsEnabled || internalConfig.aspectRatio) {\n cameraRenderingOptions.aspectRatio = internalConfig.aspectRatio;\n }\n var renderingCallbacks = {\n onRenderSurfaceReady: function (viewfinderWidth, viewfinderHeight) {\n $this.setupUi(viewfinderWidth, viewfinderHeight, internalConfig);\n $this.isScanning = true;\n $this.foreverScan(internalConfig, qrCodeSuccessCallback, qrCodeErrorCallbackInternal);\n }\n };\n CameraFactory.failIfNotSupported().then(function (factory) {\n factory.create(videoConstraints).then(function (camera) {\n return camera.render(_this.element, cameraRenderingOptions, renderingCallbacks).then(function (renderedCamera) {\n $this.renderedCamera = renderedCamera;\n toScanningStateChangeTransaction.execute();\n resolve(null);\n }).catch(function (error) {\n toScanningStateChangeTransaction.cancel();\n reject(error);\n });\n }).catch(function (error) {\n toScanningStateChangeTransaction.cancel();\n reject(Html5QrcodeStrings.errorGettingUserMedia(error));\n });\n }).catch(function (_) {\n toScanningStateChangeTransaction.cancel();\n reject(Html5QrcodeStrings.cameraStreamingNotSupported());\n });\n });\n };\n Html5Qrcode.prototype.pause = function (shouldPauseVideo) {\n if (!this.stateManagerProxy.isStrictlyScanning()) {\n throw \"Cannot pause, scanner is not scanning.\";\n }\n this.stateManagerProxy.directTransition(Html5QrcodeScannerState.PAUSED);\n this.showPausedState();\n if (isNullOrUndefined(shouldPauseVideo) || shouldPauseVideo !== true) {\n shouldPauseVideo = false;\n }\n if (shouldPauseVideo && this.renderedCamera) {\n this.renderedCamera.pause();\n }\n };\n Html5Qrcode.prototype.resume = function () {\n if (!this.stateManagerProxy.isPaused()) {\n throw \"Cannot result, scanner is not paused.\";\n }\n if (!this.renderedCamera) {\n throw \"renderedCamera doesn't exist while trying resume()\";\n }\n var $this = this;\n var transitionToScanning = function () {\n $this.stateManagerProxy.directTransition(Html5QrcodeScannerState.SCANNING);\n $this.hidePausedState();\n };\n if (!this.renderedCamera.isPaused()) {\n transitionToScanning();\n return;\n }\n this.renderedCamera.resume(function () {\n transitionToScanning();\n });\n };\n Html5Qrcode.prototype.getState = function () {\n return this.stateManagerProxy.getState();\n };\n Html5Qrcode.prototype.stop = function () {\n var _this = this;\n if (!this.stateManagerProxy.isScanning()) {\n throw \"Cannot stop, scanner is not running or paused.\";\n }\n var toStoppedStateTransaction = this.stateManagerProxy.startTransition(Html5QrcodeScannerState.NOT_STARTED);\n this.shouldScan = false;\n if (this.foreverScanTimeout) {\n clearTimeout(this.foreverScanTimeout);\n }\n var removeQrRegion = function () {\n if (!_this.element) {\n return;\n }\n var childElement = document.getElementById(Constants.SHADED_REGION_ELEMENT_ID);\n if (childElement) {\n _this.element.removeChild(childElement);\n }\n };\n var $this = this;\n return this.renderedCamera.close().then(function () {\n $this.renderedCamera = null;\n if ($this.element) {\n $this.element.removeChild($this.canvasElement);\n $this.canvasElement = null;\n }\n removeQrRegion();\n if ($this.qrRegion) {\n $this.qrRegion = null;\n }\n if ($this.context) {\n $this.context = null;\n }\n toStoppedStateTransaction.execute();\n $this.hidePausedState();\n $this.isScanning = false;\n return Promise.resolve();\n });\n };\n Html5Qrcode.prototype.scanFile = function (imageFile, showImage) {\n return this.scanFileV2(imageFile, showImage).then(function (html5qrcodeResult) {\n return html5qrcodeResult.decodedText;\n });\n };\n Html5Qrcode.prototype.scanFileV2 = function (imageFile, showImage) {\n var _this = this;\n if (!imageFile || !(imageFile instanceof File)) {\n throw \"imageFile argument is mandatory and should be instance \" + \"of File. Use 'event.target.files[0]'.\";\n }\n if (isNullOrUndefined(showImage)) {\n showImage = true;\n }\n if (!this.stateManagerProxy.canScanFile()) {\n throw \"Cannot start file scan - ongoing camera scan\";\n }\n return new Promise(function (resolve, reject) {\n _this.possiblyCloseLastScanImageFile();\n _this.clearElement();\n _this.lastScanImageFile = URL.createObjectURL(imageFile);\n var inputImage = new Image();\n inputImage.onload = function () {\n var imageWidth = inputImage.width;\n var imageHeight = inputImage.height;\n var element = document.getElementById(_this.elementId);\n var containerWidth = element.clientWidth ? element.clientWidth : Constants.DEFAULT_WIDTH;\n var containerHeight = Math.max(element.clientHeight ? element.clientHeight : imageHeight, Constants.FILE_SCAN_MIN_HEIGHT);\n var config = _this.computeCanvasDrawConfig(imageWidth, imageHeight, containerWidth, containerHeight);\n if (showImage) {\n var visibleCanvas = _this.createCanvasElement(containerWidth, containerHeight, \"qr-canvas-visible\");\n visibleCanvas.style.display = \"inline-block\";\n element.appendChild(visibleCanvas);\n var context_1 = visibleCanvas.getContext(\"2d\");\n if (!context_1) {\n throw \"Unable to get 2d context from canvas\";\n }\n context_1.canvas.width = containerWidth;\n context_1.canvas.height = containerHeight;\n context_1.drawImage(inputImage, 0, 0, imageWidth, imageHeight, config.x, config.y, config.width, config.height);\n }\n var padding = Constants.FILE_SCAN_HIDDEN_CANVAS_PADDING;\n var hiddenImageWidth = Math.max(inputImage.width, config.width);\n var hiddenImageHeight = Math.max(inputImage.height, config.height);\n var hiddenCanvasWidth = hiddenImageWidth + 2 * padding;\n var hiddenCanvasHeight = hiddenImageHeight + 2 * padding;\n var hiddenCanvas = _this.createCanvasElement(hiddenCanvasWidth, hiddenCanvasHeight);\n element.appendChild(hiddenCanvas);\n var context = hiddenCanvas.getContext(\"2d\");\n if (!context) {\n throw \"Unable to get 2d context from canvas\";\n }\n context.canvas.width = hiddenCanvasWidth;\n context.canvas.height = hiddenCanvasHeight;\n context.drawImage(inputImage, 0, 0, imageWidth, imageHeight, padding, padding, hiddenImageWidth, hiddenImageHeight);\n try {\n _this.qrcode.decodeRobustlyAsync(hiddenCanvas).then(function (result) {\n resolve(Html5QrcodeResultFactory.createFromQrcodeResult(result));\n }).catch(reject);\n } catch (exception) {\n reject(\"QR code parse error, error = \" + exception);\n }\n };\n inputImage.onerror = reject;\n inputImage.onabort = reject;\n inputImage.onstalled = reject;\n inputImage.onsuspend = reject;\n inputImage.src = URL.createObjectURL(imageFile);\n });\n };\n Html5Qrcode.prototype.clear = function () {\n this.clearElement();\n };\n Html5Qrcode.getCameras = function () {\n return CameraRetriever.retrieve();\n };\n Html5Qrcode.prototype.getRunningTrackCapabilities = function () {\n return this.getRenderedCameraOrFail().getRunningTrackCapabilities();\n };\n Html5Qrcode.prototype.getRunningTrackSettings = function () {\n return this.getRenderedCameraOrFail().getRunningTrackSettings();\n };\n Html5Qrcode.prototype.getRunningTrackCameraCapabilities = function () {\n return this.getRenderedCameraOrFail().getCapabilities();\n };\n Html5Qrcode.prototype.applyVideoConstraints = function (videoConstaints) {\n if (!videoConstaints) {\n throw \"videoConstaints is required argument.\";\n } else if (!VideoConstraintsUtil.isMediaStreamConstraintsValid(videoConstaints, this.logger)) {\n throw \"invalid videoConstaints passed, check logs for more details\";\n }\n return this.getRenderedCameraOrFail().applyVideoConstraints(videoConstaints);\n };\n Html5Qrcode.prototype.getRenderedCameraOrFail = function () {\n if (this.renderedCamera == null) {\n throw \"Scanning is not in running state, call this API only when\" + \" QR code scanning using camera is in running state.\";\n }\n return this.renderedCamera;\n };\n Html5Qrcode.prototype.getSupportedFormats = function (configOrVerbosityFlag) {\n var allFormats = [Html5QrcodeSupportedFormats.QR_CODE, Html5QrcodeSupportedFormats.AZTEC, Html5QrcodeSupportedFormats.CODABAR, Html5QrcodeSupportedFormats.CODE_39, Html5QrcodeSupportedFormats.CODE_93, Html5QrcodeSupportedFormats.CODE_128, Html5QrcodeSupportedFormats.DATA_MATRIX, Html5QrcodeSupportedFormats.MAXICODE, Html5QrcodeSupportedFormats.ITF, Html5QrcodeSupportedFormats.EAN_13, Html5QrcodeSupportedFormats.EAN_8, Html5QrcodeSupportedFormats.PDF_417, Html5QrcodeSupportedFormats.RSS_14, Html5QrcodeSupportedFormats.RSS_EXPANDED, Html5QrcodeSupportedFormats.UPC_A, Html5QrcodeSupportedFormats.UPC_E, Html5QrcodeSupportedFormats.UPC_EAN_EXTENSION];\n if (!configOrVerbosityFlag || typeof configOrVerbosityFlag == \"boolean\") {\n return allFormats;\n }\n if (!configOrVerbosityFlag.formatsToSupport) {\n return allFormats;\n }\n if (!Array.isArray(configOrVerbosityFlag.formatsToSupport)) {\n throw \"configOrVerbosityFlag.formatsToSupport should be undefined \" + \"or an array.\";\n }\n if (configOrVerbosityFlag.formatsToSupport.length === 0) {\n throw \"Atleast 1 formatsToSupport is needed.\";\n }\n var supportedFormats = [];\n for (var _i = 0, _a = configOrVerbosityFlag.formatsToSupport; _i < _a.length; _i++) {\n var format = _a[_i];\n if (isValidHtml5QrcodeSupportedFormats(format)) {\n supportedFormats.push(format);\n } else {\n this.logger.warn(\"Invalid format: \" + format + \" passed in config, ignoring.\");\n }\n }\n if (supportedFormats.length === 0) {\n throw \"None of formatsToSupport match supported values.\";\n }\n return supportedFormats;\n };\n Html5Qrcode.prototype.getUseBarCodeDetectorIfSupported = function (config) {\n if (isNullOrUndefined(config)) {\n return true;\n }\n if (!isNullOrUndefined(config.useBarCodeDetectorIfSupported)) {\n return config.useBarCodeDetectorIfSupported !== false;\n }\n if (isNullOrUndefined(config.experimentalFeatures)) {\n return true;\n }\n var experimentalFeatures = config.experimentalFeatures;\n if (isNullOrUndefined(experimentalFeatures.useBarCodeDetectorIfSupported)) {\n return true;\n }\n return experimentalFeatures.useBarCodeDetectorIfSupported !== false;\n };\n Html5Qrcode.prototype.validateQrboxSize = function (viewfinderWidth, viewfinderHeight, internalConfig) {\n var _this = this;\n var qrboxSize = internalConfig.qrbox;\n this.validateQrboxConfig(qrboxSize);\n var qrDimensions = this.toQrdimensions(viewfinderWidth, viewfinderHeight, qrboxSize);\n var validateMinSize = function (size) {\n if (size < Constants.MIN_QR_BOX_SIZE) {\n throw \"minimum size of 'config.qrbox' dimension value is\" + (\" \" + Constants.MIN_QR_BOX_SIZE + \"px.\");\n }\n };\n var correctWidthBasedOnRootElementSize = function (configWidth) {\n if (configWidth > viewfinderWidth) {\n _this.logger.warn(\"`qrbox.width` or `qrbox` is larger than the\" + \" width of the root element. The width will be truncated\" + \" to the width of root element.\");\n configWidth = viewfinderWidth;\n }\n return configWidth;\n };\n validateMinSize(qrDimensions.width);\n validateMinSize(qrDimensions.height);\n qrDimensions.width = correctWidthBasedOnRootElementSize(qrDimensions.width);\n };\n Html5Qrcode.prototype.validateQrboxConfig = function (qrboxSize) {\n if (typeof qrboxSize === \"number\") {\n return;\n }\n if (typeof qrboxSize === \"function\") {\n return;\n }\n if (qrboxSize.width === undefined || qrboxSize.height === undefined) {\n throw \"Invalid instance of QrDimensions passed for \" + \"'config.qrbox'. Both 'width' and 'height' should be set.\";\n }\n };\n Html5Qrcode.prototype.toQrdimensions = function (viewfinderWidth, viewfinderHeight, qrboxSize) {\n if (typeof qrboxSize === \"number\") {\n return {\n width: qrboxSize,\n height: qrboxSize\n };\n } else if (typeof qrboxSize === \"function\") {\n try {\n return qrboxSize(viewfinderWidth, viewfinderHeight);\n } catch (error) {\n throw new Error(\"qrbox config was passed as a function but it failed with \" + \"unknown error\" + error);\n }\n }\n return qrboxSize;\n };\n Html5Qrcode.prototype.setupUi = function (viewfinderWidth, viewfinderHeight, internalConfig) {\n if (internalConfig.isShadedBoxEnabled()) {\n this.validateQrboxSize(viewfinderWidth, viewfinderHeight, internalConfig);\n }\n var qrboxSize = isNullOrUndefined(internalConfig.qrbox) ? {\n width: viewfinderWidth,\n height: viewfinderHeight\n } : internalConfig.qrbox;\n this.validateQrboxConfig(qrboxSize);\n var qrDimensions = this.toQrdimensions(viewfinderWidth, viewfinderHeight, qrboxSize);\n if (qrDimensions.height > viewfinderHeight) {\n this.logger.warn(\"[Html5Qrcode] config.qrbox has height that is\" + \"greater than the height of the video stream. Shading will be\" + \" ignored\");\n }\n var shouldShadingBeApplied = internalConfig.isShadedBoxEnabled() && qrDimensions.height <= viewfinderHeight;\n var defaultQrRegion = {\n x: 0,\n y: 0,\n width: viewfinderWidth,\n height: viewfinderHeight\n };\n var qrRegion = shouldShadingBeApplied ? this.getShadedRegionBounds(viewfinderWidth, viewfinderHeight, qrDimensions) : defaultQrRegion;\n var canvasElement = this.createCanvasElement(qrRegion.width, qrRegion.height);\n var contextAttributes = {\n willReadFrequently: true\n };\n var context = canvasElement.getContext(\"2d\", contextAttributes);\n context.canvas.width = qrRegion.width;\n context.canvas.height = qrRegion.height;\n this.element.append(canvasElement);\n if (shouldShadingBeApplied) {\n this.possiblyInsertShadingElement(this.element, viewfinderWidth, viewfinderHeight, qrDimensions);\n }\n this.createScannerPausedUiElement(this.element);\n this.qrRegion = qrRegion;\n this.context = context;\n this.canvasElement = canvasElement;\n };\n Html5Qrcode.prototype.createScannerPausedUiElement = function (rootElement) {\n var scannerPausedUiElement = document.createElement(\"div\");\n scannerPausedUiElement.innerText = \"Scanner paused\";\n scannerPausedUiElement.style.display = \"none\";\n scannerPausedUiElement.style.position = \"absolute\";\n scannerPausedUiElement.style.top = \"0px\";\n scannerPausedUiElement.style.zIndex = \"1\";\n scannerPausedUiElement.style.background = \"yellow\";\n scannerPausedUiElement.style.textAlign = \"center\";\n scannerPausedUiElement.style.width = \"100%\";\n rootElement.appendChild(scannerPausedUiElement);\n this.scannerPausedUiElement = scannerPausedUiElement;\n };\n Html5Qrcode.prototype.scanContext = function (qrCodeSuccessCallback, qrCodeErrorCallback) {\n var _this = this;\n if (this.stateManagerProxy.isPaused()) {\n return Promise.resolve(false);\n }\n return this.qrcode.decodeAsync(this.canvasElement).then(function (result) {\n qrCodeSuccessCallback(result.text, Html5QrcodeResultFactory.createFromQrcodeResult(result));\n _this.possiblyUpdateShaders(true);\n return true;\n }).catch(function (error) {\n _this.possiblyUpdateShaders(false);\n var errorMessage = Html5QrcodeStrings.codeParseError(error);\n qrCodeErrorCallback(errorMessage, Html5QrcodeErrorFactory.createFrom(errorMessage));\n return false;\n });\n };\n Html5Qrcode.prototype.foreverScan = function (internalConfig, qrCodeSuccessCallback, qrCodeErrorCallback) {\n var _this = this;\n if (!this.shouldScan) {\n return;\n }\n if (!this.renderedCamera) {\n return;\n }\n var videoElement = this.renderedCamera.getSurface();\n var widthRatio = videoElement.videoWidth / videoElement.clientWidth;\n var heightRatio = videoElement.videoHeight / videoElement.clientHeight;\n if (!this.qrRegion) {\n throw \"qrRegion undefined when localMediaStream is ready.\";\n }\n var sWidthOffset = this.qrRegion.width * widthRatio;\n var sHeightOffset = this.qrRegion.height * heightRatio;\n var sxOffset = this.qrRegion.x * widthRatio;\n var syOffset = this.qrRegion.y * heightRatio;\n this.context.drawImage(videoElement, sxOffset, syOffset, sWidthOffset, sHeightOffset, 0, 0, this.qrRegion.width, this.qrRegion.height);\n var triggerNextScan = function () {\n _this.foreverScanTimeout = setTimeout(function () {\n _this.foreverScan(internalConfig, qrCodeSuccessCallback, qrCodeErrorCallback);\n }, _this.getTimeoutFps(internalConfig.fps));\n };\n this.scanContext(qrCodeSuccessCallback, qrCodeErrorCallback).then(function (isSuccessfull) {\n if (!isSuccessfull && internalConfig.disableFlip !== true) {\n _this.context.translate(_this.context.canvas.width, 0);\n _this.context.scale(-1, 1);\n _this.scanContext(qrCodeSuccessCallback, qrCodeErrorCallback).finally(function () {\n triggerNextScan();\n });\n } else {\n triggerNextScan();\n }\n }).catch(function (error) {\n _this.logger.logError(\"Error happend while scanning context\", error);\n triggerNextScan();\n });\n };\n Html5Qrcode.prototype.createVideoConstraints = function (cameraIdOrConfig) {\n if (typeof cameraIdOrConfig == \"string\") {\n return {\n deviceId: {\n exact: cameraIdOrConfig\n }\n };\n } else if (typeof cameraIdOrConfig == \"object\") {\n var facingModeKey = \"facingMode\";\n var deviceIdKey = \"deviceId\";\n var allowedFacingModeValues_1 = {\n \"user\": true,\n \"environment\": true\n };\n var exactKey = \"exact\";\n var isValidFacingModeValue = function (value) {\n if (value in allowedFacingModeValues_1) {\n return true;\n } else {\n throw \"config has invalid 'facingMode' value = \" + (\"'\" + value + \"'\");\n }\n };\n var keys = Object.keys(cameraIdOrConfig);\n if (keys.length !== 1) {\n throw \"'cameraIdOrConfig' object should have exactly 1 key,\" + (\" if passed as an object, found \" + keys.length + \" keys\");\n }\n var key = Object.keys(cameraIdOrConfig)[0];\n if (key !== facingModeKey && key !== deviceIdKey) {\n throw \"Only '\" + facingModeKey + \"' and '\" + deviceIdKey + \"' \" + \" are supported for 'cameraIdOrConfig'\";\n }\n if (key === facingModeKey) {\n var facingMode = cameraIdOrConfig.facingMode;\n if (typeof facingMode == \"string\") {\n if (isValidFacingModeValue(facingMode)) {\n return {\n facingMode: facingMode\n };\n }\n } else if (typeof facingMode == \"object\") {\n if (exactKey in facingMode) {\n if (isValidFacingModeValue(facingMode[\"\" + exactKey])) {\n return {\n facingMode: {\n exact: facingMode[\"\" + exactKey]\n }\n };\n }\n } else {\n throw \"'facingMode' should be string or object with\" + (\" \" + exactKey + \" as key.\");\n }\n } else {\n var type_1 = typeof facingMode;\n throw \"Invalid type of 'facingMode' = \" + type_1;\n }\n } else {\n var deviceId = cameraIdOrConfig.deviceId;\n if (typeof deviceId == \"string\") {\n return {\n deviceId: deviceId\n };\n } else if (typeof deviceId == \"object\") {\n if (exactKey in deviceId) {\n return {\n deviceId: {\n exact: deviceId[\"\" + exactKey]\n }\n };\n } else {\n throw \"'deviceId' should be string or object with\" + (\" \" + exactKey + \" as key.\");\n }\n } else {\n var type_2 = typeof deviceId;\n throw \"Invalid type of 'deviceId' = \" + type_2;\n }\n }\n }\n var type = typeof cameraIdOrConfig;\n throw \"Invalid type of 'cameraIdOrConfig' = \" + type;\n };\n Html5Qrcode.prototype.computeCanvasDrawConfig = function (imageWidth, imageHeight, containerWidth, containerHeight) {\n if (imageWidth <= containerWidth && imageHeight <= containerHeight) {\n var xoffset = (containerWidth - imageWidth) / 2;\n var yoffset = (containerHeight - imageHeight) / 2;\n return {\n x: xoffset,\n y: yoffset,\n width: imageWidth,\n height: imageHeight\n };\n } else {\n var formerImageWidth = imageWidth;\n var formerImageHeight = imageHeight;\n if (imageWidth > containerWidth) {\n imageHeight = containerWidth / imageWidth * imageHeight;\n imageWidth = containerWidth;\n }\n if (imageHeight > containerHeight) {\n imageWidth = containerHeight / imageHeight * imageWidth;\n imageHeight = containerHeight;\n }\n this.logger.log(\"Image downsampled from \" + (formerImageWidth + \"X\" + formerImageHeight) + (\" to \" + imageWidth + \"X\" + imageHeight + \".\"));\n return this.computeCanvasDrawConfig(imageWidth, imageHeight, containerWidth, containerHeight);\n }\n };\n Html5Qrcode.prototype.clearElement = function () {\n if (this.stateManagerProxy.isScanning()) {\n throw \"Cannot clear while scan is ongoing, close it first.\";\n }\n var element = document.getElementById(this.elementId);\n if (element) {\n element.innerHTML = \"\";\n }\n };\n Html5Qrcode.prototype.possiblyUpdateShaders = function (qrMatch) {\n if (this.qrMatch === qrMatch) {\n return;\n }\n if (this.hasBorderShaders && this.borderShaders && this.borderShaders.length) {\n this.borderShaders.forEach(function (shader) {\n shader.style.backgroundColor = qrMatch ? Constants.BORDER_SHADER_MATCH_COLOR : Constants.BORDER_SHADER_DEFAULT_COLOR;\n });\n }\n this.qrMatch = qrMatch;\n };\n Html5Qrcode.prototype.possiblyCloseLastScanImageFile = function () {\n if (this.lastScanImageFile) {\n URL.revokeObjectURL(this.lastScanImageFile);\n this.lastScanImageFile = null;\n }\n };\n Html5Qrcode.prototype.createCanvasElement = function (width, height, customId) {\n var canvasWidth = width;\n var canvasHeight = height;\n var canvasElement = document.createElement(\"canvas\");\n canvasElement.style.width = canvasWidth + \"px\";\n canvasElement.style.height = canvasHeight + \"px\";\n canvasElement.style.display = \"none\";\n canvasElement.id = isNullOrUndefined(customId) ? \"qr-canvas\" : customId;\n return canvasElement;\n };\n Html5Qrcode.prototype.getShadedRegionBounds = function (width, height, qrboxSize) {\n if (qrboxSize.width > width || qrboxSize.height > height) {\n throw \"'config.qrbox' dimensions should not be greater than the \" + \"dimensions of the root HTML element.\";\n }\n return {\n x: (width - qrboxSize.width) / 2,\n y: (height - qrboxSize.height) / 2,\n width: qrboxSize.width,\n height: qrboxSize.height\n };\n };\n Html5Qrcode.prototype.possiblyInsertShadingElement = function (element, width, height, qrboxSize) {\n if (width - qrboxSize.width < 1 || height - qrboxSize.height < 1) {\n return;\n }\n var shadingElement = document.createElement(\"div\");\n shadingElement.style.position = \"absolute\";\n var rightLeftBorderSize = (width - qrboxSize.width) / 2;\n var topBottomBorderSize = (height - qrboxSize.height) / 2;\n shadingElement.style.borderLeft = rightLeftBorderSize + \"px solid rgba(0, 0, 0, 0.48)\";\n shadingElement.style.borderRight = rightLeftBorderSize + \"px solid rgba(0, 0, 0, 0.48)\";\n shadingElement.style.borderTop = topBottomBorderSize + \"px solid rgba(0, 0, 0, 0.48)\";\n shadingElement.style.borderBottom = topBottomBorderSize + \"px solid rgba(0, 0, 0, 0.48)\";\n shadingElement.style.boxSizing = \"border-box\";\n shadingElement.style.top = \"0px\";\n shadingElement.style.bottom = \"0px\";\n shadingElement.style.left = \"0px\";\n shadingElement.style.right = \"0px\";\n shadingElement.id = \"\" + Constants.SHADED_REGION_ELEMENT_ID;\n if (width - qrboxSize.width < 11 || height - qrboxSize.height < 11) {\n this.hasBorderShaders = false;\n } else {\n var smallSize = 5;\n var largeSize = 40;\n this.insertShaderBorders(shadingElement, largeSize, smallSize, -smallSize, null, 0, true);\n this.insertShaderBorders(shadingElement, largeSize, smallSize, -smallSize, null, 0, false);\n this.insertShaderBorders(shadingElement, largeSize, smallSize, null, -smallSize, 0, true);\n this.insertShaderBorders(shadingElement, largeSize, smallSize, null, -smallSize, 0, false);\n this.insertShaderBorders(shadingElement, smallSize, largeSize + smallSize, -smallSize, null, -smallSize, true);\n this.insertShaderBorders(shadingElement, smallSize, largeSize + smallSize, null, -smallSize, -smallSize, true);\n this.insertShaderBorders(shadingElement, smallSize, largeSize + smallSize, -smallSize, null, -smallSize, false);\n this.insertShaderBorders(shadingElement, smallSize, largeSize + smallSize, null, -smallSize, -smallSize, false);\n this.hasBorderShaders = true;\n }\n element.append(shadingElement);\n };\n Html5Qrcode.prototype.insertShaderBorders = function (shaderElem, width, height, top, bottom, side, isLeft) {\n var elem = document.createElement(\"div\");\n elem.style.position = \"absolute\";\n elem.style.backgroundColor = Constants.BORDER_SHADER_DEFAULT_COLOR;\n elem.style.width = width + \"px\";\n elem.style.height = height + \"px\";\n if (top !== null) {\n elem.style.top = top + \"px\";\n }\n if (bottom !== null) {\n elem.style.bottom = bottom + \"px\";\n }\n if (isLeft) {\n elem.style.left = side + \"px\";\n } else {\n elem.style.right = side + \"px\";\n }\n if (!this.borderShaders) {\n this.borderShaders = [];\n }\n this.borderShaders.push(elem);\n shaderElem.appendChild(elem);\n };\n Html5Qrcode.prototype.showPausedState = function () {\n if (!this.scannerPausedUiElement) {\n throw \"[internal error] scanner paused UI element not found\";\n }\n this.scannerPausedUiElement.style.display = \"block\";\n };\n Html5Qrcode.prototype.hidePausedState = function () {\n if (!this.scannerPausedUiElement) {\n throw \"[internal error] scanner paused UI element not found\";\n }\n this.scannerPausedUiElement.style.display = \"none\";\n };\n Html5Qrcode.prototype.getTimeoutFps = function (fps) {\n return 1000 / fps;\n };\n return Html5Qrcode;\n}();\nexport { Html5Qrcode };\n","var SVG_XML_PREFIX = \"data:image/svg+xml;base64,\";\nexport var ASSET_CAMERA_SCAN = SVG_XML_PREFIX + \"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNzEuNjQzIDM3MS42NDMiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDM3MS42NDMgMzcxLjY0MyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBhdGggZD0iTTEwNS4wODQgMzguMjcxaDE2My43Njh2MjBIMTA1LjA4NHoiLz48cGF0aCBkPSJNMzExLjU5NiAxOTAuMTg5Yy03LjQ0MS05LjM0Ny0xOC40MDMtMTYuMjA2LTMyLjc0My0yMC41MjJWMzBjMC0xNi41NDItMTMuNDU4LTMwLTMwLTMwSDEyNS4wODRjLTE2LjU0MiAwLTMwIDEzLjQ1OC0zMCAzMHYxMjAuMTQzaC04LjI5NmMtMTYuNTQyIDAtMzAgMTMuNDU4LTMwIDMwdjEuMzMzYTI5LjgwNCAyOS44MDQgMCAwIDAgNC42MDMgMTUuOTM5Yy03LjM0IDUuNDc0LTEyLjEwMyAxNC4yMjEtMTIuMTAzIDI0LjA2MXYxLjMzM2MwIDkuODQgNC43NjMgMTguNTg3IDEyLjEwMyAyNC4wNjJhMjkuODEgMjkuODEgMCAwIDAtNC42MDMgMTUuOTM4djEuMzMzYzAgMTYuNTQyIDEzLjQ1OCAzMCAzMCAzMGg4LjMyNGMuNDI3IDExLjYzMSA3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q+ImFkJY2DCh3cAH2klyB+9J1xUMMAG7eCh1a+Mr+k48b5diXrFVwwLuS+BJ9MfR7+G0FHOHhTHhnXNWS87VDF4pcnfQK4Ep7XScNLmPTZgURNKKYENYWDpzW1BhscS1WHS8CDgURFJQrWcoF3c13KKbgg1BYQfy8xZWEzTTw1QZbAoKu8FqJnktdu5hcVSHmchiILzzuaDQvjBzV2m8yohCE1jHfPx/xhU+y4G/D75ELlRJsSYAAAAASUVORK5CYII=\";\n","var PersistedDataFactory = function () {\n function PersistedDataFactory() {}\n PersistedDataFactory.createDefault = function () {\n return {\n hasPermission: false,\n lastUsedCameraId: null\n };\n };\n return PersistedDataFactory;\n}();\nvar PersistedDataManager = function () {\n function PersistedDataManager() {\n this.data = PersistedDataFactory.createDefault();\n var data = localStorage.getItem(PersistedDataManager.LOCAL_STORAGE_KEY);\n if (!data) {\n this.reset();\n } else {\n this.data = JSON.parse(data);\n }\n }\n PersistedDataManager.prototype.hasCameraPermissions = function () {\n return this.data.hasPermission;\n };\n PersistedDataManager.prototype.getLastUsedCameraId = function () {\n return this.data.lastUsedCameraId;\n };\n PersistedDataManager.prototype.setHasPermission = function (hasPermission) {\n this.data.hasPermission = hasPermission;\n this.flush();\n };\n PersistedDataManager.prototype.setLastUsedCameraId = function (lastUsedCameraId) {\n this.data.lastUsedCameraId = lastUsedCameraId;\n this.flush();\n };\n PersistedDataManager.prototype.resetLastUsedCameraId = function () {\n this.data.lastUsedCameraId = null;\n this.flush();\n };\n PersistedDataManager.prototype.reset = function () {\n this.data = PersistedDataFactory.createDefault();\n this.flush();\n };\n PersistedDataManager.prototype.flush = function () {\n localStorage.setItem(PersistedDataManager.LOCAL_STORAGE_KEY, JSON.stringify(this.data));\n };\n PersistedDataManager.LOCAL_STORAGE_KEY = \"HTML5_QRCODE_DATA\";\n return PersistedDataManager;\n}();\nexport { PersistedDataManager };\n","import { ASSET_CLOSE_ICON_16PX, ASSET_INFO_ICON_16PX } from \"./image-assets\";\nimport { LibraryInfoStrings } from \"./strings\";\nvar LibraryInfoDiv = function () {\n function LibraryInfoDiv() {\n this.infoDiv = document.createElement(\"div\");\n }\n LibraryInfoDiv.prototype.renderInto = function (parent) {\n this.infoDiv.style.position = \"absolute\";\n this.infoDiv.style.top = \"10px\";\n this.infoDiv.style.right = \"10px\";\n this.infoDiv.style.zIndex = \"2\";\n this.infoDiv.style.display = \"none\";\n this.infoDiv.style.padding = \"5pt\";\n this.infoDiv.style.border = \"1px solid #171717\";\n this.infoDiv.style.fontSize = \"10pt\";\n this.infoDiv.style.background = \"rgb(0 0 0 / 69%)\";\n this.infoDiv.style.borderRadius = \"5px\";\n this.infoDiv.style.textAlign = \"center\";\n this.infoDiv.style.fontWeight = \"400\";\n this.infoDiv.style.color = \"white\";\n this.infoDiv.innerText = LibraryInfoStrings.poweredBy();\n var projectLink = document.createElement(\"a\");\n projectLink.innerText = \"ScanApp\";\n projectLink.href = \"https://scanapp.org\";\n projectLink.target = \"new\";\n projectLink.style.color = \"white\";\n this.infoDiv.appendChild(projectLink);\n var breakElemFirst = document.createElement(\"br\");\n var breakElemSecond = document.createElement(\"br\");\n this.infoDiv.appendChild(breakElemFirst);\n this.infoDiv.appendChild(breakElemSecond);\n var reportIssueLink = document.createElement(\"a\");\n reportIssueLink.innerText = LibraryInfoStrings.reportIssues();\n reportIssueLink.href = \"https://github.com/mebjas/html5-qrcode/issues\";\n reportIssueLink.target = \"new\";\n reportIssueLink.style.color = \"white\";\n this.infoDiv.appendChild(reportIssueLink);\n parent.appendChild(this.infoDiv);\n };\n LibraryInfoDiv.prototype.show = function () {\n this.infoDiv.style.display = \"block\";\n };\n LibraryInfoDiv.prototype.hide = function () {\n this.infoDiv.style.display = \"none\";\n };\n return LibraryInfoDiv;\n}();\nvar LibraryInfoIcon = function () {\n function LibraryInfoIcon(onTapIn, onTapOut) {\n this.isShowingInfoIcon = true;\n this.onTapIn = onTapIn;\n this.onTapOut = onTapOut;\n this.infoIcon = document.createElement(\"img\");\n }\n LibraryInfoIcon.prototype.renderInto = function (parent) {\n var _this = this;\n this.infoIcon.alt = \"Info icon\";\n this.infoIcon.src = ASSET_INFO_ICON_16PX;\n this.infoIcon.style.position = \"absolute\";\n this.infoIcon.style.top = \"4px\";\n this.infoIcon.style.right = \"4px\";\n this.infoIcon.style.opacity = \"0.6\";\n this.infoIcon.style.cursor = \"pointer\";\n this.infoIcon.style.zIndex = \"2\";\n this.infoIcon.style.width = \"16px\";\n this.infoIcon.style.height = \"16px\";\n this.infoIcon.onmouseover = function (_) {\n return _this.onHoverIn();\n };\n this.infoIcon.onmouseout = function (_) {\n return _this.onHoverOut();\n };\n this.infoIcon.onclick = function (_) {\n return _this.onClick();\n };\n parent.appendChild(this.infoIcon);\n };\n LibraryInfoIcon.prototype.onHoverIn = function () {\n if (this.isShowingInfoIcon) {\n this.infoIcon.style.opacity = \"1\";\n }\n };\n LibraryInfoIcon.prototype.onHoverOut = function () {\n if (this.isShowingInfoIcon) {\n this.infoIcon.style.opacity = \"0.6\";\n }\n };\n LibraryInfoIcon.prototype.onClick = function () {\n if (this.isShowingInfoIcon) {\n this.isShowingInfoIcon = false;\n this.onTapIn();\n this.infoIcon.src = ASSET_CLOSE_ICON_16PX;\n this.infoIcon.style.opacity = \"1\";\n } else {\n this.isShowingInfoIcon = true;\n this.onTapOut();\n this.infoIcon.src = ASSET_INFO_ICON_16PX;\n this.infoIcon.style.opacity = \"0.6\";\n }\n };\n return LibraryInfoIcon;\n}();\nvar LibraryInfoContainer = function () {\n function LibraryInfoContainer() {\n var _this = this;\n this.infoDiv = new LibraryInfoDiv();\n this.infoIcon = new LibraryInfoIcon(function () {\n _this.infoDiv.show();\n }, function () {\n _this.infoDiv.hide();\n });\n }\n LibraryInfoContainer.prototype.renderInto = function (parent) {\n this.infoDiv.renderInto(parent);\n this.infoIcon.renderInto(parent);\n };\n return LibraryInfoContainer;\n}();\nexport { LibraryInfoContainer };\n","var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n};\nvar CameraPermissions = function () {\n function CameraPermissions() {}\n CameraPermissions.hasPermissions = function () {\n return __awaiter(this, void 0, void 0, function () {\n var devices, _i, devices_1, device;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4, navigator.mediaDevices.enumerateDevices()];\n case 1:\n devices = _a.sent();\n for (_i = 0, devices_1 = devices; _i < devices_1.length; _i++) {\n device = devices_1[_i];\n if (device.kind === \"videoinput\" && device.label) {\n return [2, true];\n }\n }\n return [2, false];\n }\n });\n });\n };\n return CameraPermissions;\n}();\nexport { CameraPermissions };\n","import { Html5QrcodeScanType, Html5QrcodeConstants } from \"../../core\";\nvar ScanTypeSelector = function () {\n function ScanTypeSelector(supportedScanTypes) {\n this.supportedScanTypes = this.validateAndReturnScanTypes(supportedScanTypes);\n }\n ScanTypeSelector.prototype.getDefaultScanType = function () {\n return this.supportedScanTypes[0];\n };\n ScanTypeSelector.prototype.hasMoreThanOneScanType = function () {\n return this.supportedScanTypes.length > 1;\n };\n ScanTypeSelector.prototype.isCameraScanRequired = function () {\n for (var _i = 0, _a = this.supportedScanTypes; _i < _a.length; _i++) {\n var scanType = _a[_i];\n if (ScanTypeSelector.isCameraScanType(scanType)) {\n return true;\n }\n }\n return false;\n };\n ScanTypeSelector.isCameraScanType = function (scanType) {\n return scanType === Html5QrcodeScanType.SCAN_TYPE_CAMERA;\n };\n ScanTypeSelector.isFileScanType = function (scanType) {\n return scanType === Html5QrcodeScanType.SCAN_TYPE_FILE;\n };\n ScanTypeSelector.prototype.validateAndReturnScanTypes = function (supportedScanTypes) {\n if (!supportedScanTypes || supportedScanTypes.length === 0) {\n return Html5QrcodeConstants.DEFAULT_SUPPORTED_SCAN_TYPE;\n }\n var maxExpectedValues = Html5QrcodeConstants.DEFAULT_SUPPORTED_SCAN_TYPE.length;\n if (supportedScanTypes.length > maxExpectedValues) {\n throw \"Max \" + maxExpectedValues + \" values expected for \" + \"supportedScanTypes\";\n }\n for (var _i = 0, supportedScanTypes_1 = supportedScanTypes; _i < supportedScanTypes_1.length; _i++) {\n var scanType = supportedScanTypes_1[_i];\n if (!Html5QrcodeConstants.DEFAULT_SUPPORTED_SCAN_TYPE.includes(scanType)) {\n throw \"Unsupported scan type \" + scanType;\n }\n }\n return supportedScanTypes;\n };\n return ScanTypeSelector;\n}();\nexport { ScanTypeSelector };\n","var PublicUiElementIdAndClasses = function () {\n function PublicUiElementIdAndClasses() {}\n PublicUiElementIdAndClasses.ALL_ELEMENT_CLASS = \"html5-qrcode-element\";\n PublicUiElementIdAndClasses.CAMERA_PERMISSION_BUTTON_ID = \"html5-qrcode-button-camera-permission\";\n PublicUiElementIdAndClasses.CAMERA_START_BUTTON_ID = \"html5-qrcode-button-camera-start\";\n PublicUiElementIdAndClasses.CAMERA_STOP_BUTTON_ID = \"html5-qrcode-button-camera-stop\";\n PublicUiElementIdAndClasses.TORCH_BUTTON_ID = \"html5-qrcode-button-torch\";\n PublicUiElementIdAndClasses.CAMERA_SELECTION_SELECT_ID = \"html5-qrcode-select-camera\";\n PublicUiElementIdAndClasses.FILE_SELECTION_BUTTON_ID = \"html5-qrcode-button-file-selection\";\n PublicUiElementIdAndClasses.ZOOM_SLIDER_ID = \"html5-qrcode-input-range-zoom\";\n PublicUiElementIdAndClasses.SCAN_TYPE_CHANGE_ANCHOR_ID = \"html5-qrcode-anchor-scan-type-change\";\n PublicUiElementIdAndClasses.TORCH_BUTTON_CLASS_TORCH_ON = \"html5-qrcode-button-torch-on\";\n PublicUiElementIdAndClasses.TORCH_BUTTON_CLASS_TORCH_OFF = \"html5-qrcode-button-torch-off\";\n return PublicUiElementIdAndClasses;\n}();\nexport { PublicUiElementIdAndClasses };\nvar BaseUiElementFactory = function () {\n function BaseUiElementFactory() {}\n BaseUiElementFactory.createElement = function (elementType, elementId) {\n var element = document.createElement(elementType);\n element.id = elementId;\n element.classList.add(PublicUiElementIdAndClasses.ALL_ELEMENT_CLASS);\n if (elementType === \"button\") {\n element.setAttribute(\"type\", \"button\");\n }\n return element;\n };\n return BaseUiElementFactory;\n}();\nexport { BaseUiElementFactory };\n","var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n};\nimport { Html5QrcodeScannerStrings } from \"../../strings\";\nimport { BaseUiElementFactory, PublicUiElementIdAndClasses } from \"./base\";\nvar TorchController = function () {\n function TorchController(torchCapability, buttonController, onTorchActionFailureCallback) {\n this.isTorchOn = false;\n this.torchCapability = torchCapability;\n this.buttonController = buttonController;\n this.onTorchActionFailureCallback = onTorchActionFailureCallback;\n }\n TorchController.prototype.isTorchEnabled = function () {\n return this.isTorchOn;\n };\n TorchController.prototype.flipState = function () {\n return __awaiter(this, void 0, void 0, function () {\n var isTorchOnExpected, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n this.buttonController.disable();\n isTorchOnExpected = !this.isTorchOn;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3,, 4]);\n return [4, this.torchCapability.apply(isTorchOnExpected)];\n case 2:\n _a.sent();\n this.updateUiBasedOnLatestSettings(this.torchCapability.value(), isTorchOnExpected);\n return [3, 4];\n case 3:\n error_1 = _a.sent();\n this.propagateFailure(isTorchOnExpected, error_1);\n this.buttonController.enable();\n return [3, 4];\n case 4:\n return [2];\n }\n });\n });\n };\n TorchController.prototype.updateUiBasedOnLatestSettings = function (isTorchOn, isTorchOnExpected) {\n if (isTorchOn === isTorchOnExpected) {\n this.buttonController.setText(isTorchOnExpected ? Html5QrcodeScannerStrings.torchOffButton() : Html5QrcodeScannerStrings.torchOnButton());\n this.isTorchOn = isTorchOnExpected;\n } else {\n this.propagateFailure(isTorchOnExpected);\n }\n this.buttonController.enable();\n };\n TorchController.prototype.propagateFailure = function (isTorchOnExpected, error) {\n var errorMessage = isTorchOnExpected ? Html5QrcodeScannerStrings.torchOnFailedMessage() : Html5QrcodeScannerStrings.torchOffFailedMessage();\n if (error) {\n errorMessage += \"; Error = \" + error;\n }\n this.onTorchActionFailureCallback(errorMessage);\n };\n TorchController.prototype.reset = function () {\n this.isTorchOn = false;\n };\n return TorchController;\n}();\nvar TorchButton = function () {\n function TorchButton(torchCapability, onTorchActionFailureCallback) {\n this.onTorchActionFailureCallback = onTorchActionFailureCallback;\n this.torchButton = BaseUiElementFactory.createElement(\"button\", PublicUiElementIdAndClasses.TORCH_BUTTON_ID);\n this.torchController = new TorchController(torchCapability, this, onTorchActionFailureCallback);\n }\n TorchButton.prototype.render = function (parentElement, torchButtonOptions) {\n var _this = this;\n this.torchButton.innerText = Html5QrcodeScannerStrings.torchOnButton();\n this.torchButton.style.display = torchButtonOptions.display;\n this.torchButton.style.marginLeft = torchButtonOptions.marginLeft;\n var $this = this;\n this.torchButton.addEventListener(\"click\", function (_) {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4, $this.torchController.flipState()];\n case 1:\n _a.sent();\n if ($this.torchController.isTorchEnabled()) {\n $this.torchButton.classList.remove(PublicUiElementIdAndClasses.TORCH_BUTTON_CLASS_TORCH_OFF);\n $this.torchButton.classList.add(PublicUiElementIdAndClasses.TORCH_BUTTON_CLASS_TORCH_ON);\n } else {\n $this.torchButton.classList.remove(PublicUiElementIdAndClasses.TORCH_BUTTON_CLASS_TORCH_ON);\n $this.torchButton.classList.add(PublicUiElementIdAndClasses.TORCH_BUTTON_CLASS_TORCH_OFF);\n }\n return [2];\n }\n });\n });\n });\n parentElement.appendChild(this.torchButton);\n };\n TorchButton.prototype.updateTorchCapability = function (torchCapability) {\n this.torchController = new TorchController(torchCapability, this, this.onTorchActionFailureCallback);\n };\n TorchButton.prototype.getTorchButton = function () {\n return this.torchButton;\n };\n TorchButton.prototype.hide = function () {\n this.torchButton.style.display = \"none\";\n };\n TorchButton.prototype.show = function () {\n this.torchButton.style.display = \"inline-block\";\n };\n TorchButton.prototype.disable = function () {\n this.torchButton.disabled = true;\n };\n TorchButton.prototype.enable = function () {\n this.torchButton.disabled = false;\n };\n TorchButton.prototype.setText = function (text) {\n this.torchButton.innerText = text;\n };\n TorchButton.prototype.reset = function () {\n this.torchButton.innerText = Html5QrcodeScannerStrings.torchOnButton();\n this.torchController.reset();\n };\n TorchButton.create = function (parentElement, torchCapability, torchButtonOptions, onTorchActionFailureCallback) {\n var button = new TorchButton(torchCapability, onTorchActionFailureCallback);\n button.render(parentElement, torchButtonOptions);\n return button;\n };\n return TorchButton;\n}();\nexport { TorchButton };\n","import { Html5QrcodeScannerStrings } from \"../../strings\";\nimport { BaseUiElementFactory, PublicUiElementIdAndClasses } from \"./base\";\nvar FileSelectionUi = function () {\n function FileSelectionUi(parentElement, showOnRender, onFileSelected) {\n this.fileBasedScanRegion = this.createFileBasedScanRegion();\n this.fileBasedScanRegion.style.display = showOnRender ? \"block\" : \"none\";\n parentElement.appendChild(this.fileBasedScanRegion);\n var fileScanLabel = document.createElement(\"label\");\n fileScanLabel.setAttribute(\"for\", this.getFileScanInputId());\n fileScanLabel.style.display = \"inline-block\";\n this.fileBasedScanRegion.appendChild(fileScanLabel);\n this.fileSelectionButton = BaseUiElementFactory.createElement(\"button\", PublicUiElementIdAndClasses.FILE_SELECTION_BUTTON_ID);\n this.setInitialValueToButton();\n this.fileSelectionButton.addEventListener(\"click\", function (_) {\n fileScanLabel.click();\n });\n fileScanLabel.append(this.fileSelectionButton);\n this.fileScanInput = BaseUiElementFactory.createElement(\"input\", this.getFileScanInputId());\n this.fileScanInput.type = \"file\";\n this.fileScanInput.accept = \"image/*\";\n this.fileScanInput.style.display = \"none\";\n fileScanLabel.appendChild(this.fileScanInput);\n var $this = this;\n this.fileScanInput.addEventListener(\"change\", function (e) {\n if (e == null || e.target == null) {\n return;\n }\n var target = e.target;\n if (target.files && target.files.length === 0) {\n return;\n }\n var fileList = target.files;\n var file = fileList[0];\n var fileName = file.name;\n $this.setImageNameToButton(fileName);\n onFileSelected(file);\n });\n var dragAndDropMessage = this.createDragAndDropMessage();\n this.fileBasedScanRegion.appendChild(dragAndDropMessage);\n this.fileBasedScanRegion.addEventListener(\"dragenter\", function (event) {\n $this.fileBasedScanRegion.style.border = $this.fileBasedScanRegionActiveBorder();\n event.stopPropagation();\n event.preventDefault();\n });\n this.fileBasedScanRegion.addEventListener(\"dragleave\", function (event) {\n $this.fileBasedScanRegion.style.border = $this.fileBasedScanRegionDefaultBorder();\n event.stopPropagation();\n event.preventDefault();\n });\n this.fileBasedScanRegion.addEventListener(\"dragover\", function (event) {\n $this.fileBasedScanRegion.style.border = $this.fileBasedScanRegionActiveBorder();\n event.stopPropagation();\n event.preventDefault();\n });\n this.fileBasedScanRegion.addEventListener(\"drop\", function (event) {\n event.stopPropagation();\n event.preventDefault();\n $this.fileBasedScanRegion.style.border = $this.fileBasedScanRegionDefaultBorder();\n var dataTransfer = event.dataTransfer;\n if (dataTransfer) {\n var files = dataTransfer.files;\n if (!files || files.length === 0) {\n return;\n }\n var isAnyFileImage = false;\n for (var i = 0; i < files.length; ++i) {\n var file = files.item(i);\n if (!file) {\n continue;\n }\n var imageType = /image.*/;\n if (!file.type.match(imageType)) {\n continue;\n }\n isAnyFileImage = true;\n var fileName = file.name;\n $this.setImageNameToButton(fileName);\n onFileSelected(file);\n dragAndDropMessage.innerText = Html5QrcodeScannerStrings.dragAndDropMessage();\n break;\n }\n if (!isAnyFileImage) {\n dragAndDropMessage.innerText = Html5QrcodeScannerStrings.dragAndDropMessageOnlyImages();\n }\n }\n });\n }\n FileSelectionUi.prototype.hide = function () {\n this.fileBasedScanRegion.style.display = \"none\";\n this.fileScanInput.disabled = true;\n };\n FileSelectionUi.prototype.show = function () {\n this.fileBasedScanRegion.style.display = \"block\";\n this.fileScanInput.disabled = false;\n };\n FileSelectionUi.prototype.isShowing = function () {\n return this.fileBasedScanRegion.style.display === \"block\";\n };\n FileSelectionUi.prototype.resetValue = function () {\n this.fileScanInput.value = \"\";\n this.setInitialValueToButton();\n };\n FileSelectionUi.prototype.createFileBasedScanRegion = function () {\n var fileBasedScanRegion = document.createElement(\"div\");\n fileBasedScanRegion.style.textAlign = \"center\";\n fileBasedScanRegion.style.margin = \"auto\";\n fileBasedScanRegion.style.width = \"80%\";\n fileBasedScanRegion.style.maxWidth = \"600px\";\n fileBasedScanRegion.style.border = this.fileBasedScanRegionDefaultBorder();\n fileBasedScanRegion.style.padding = \"10px\";\n fileBasedScanRegion.style.marginBottom = \"10px\";\n return fileBasedScanRegion;\n };\n FileSelectionUi.prototype.fileBasedScanRegionDefaultBorder = function () {\n return \"6px dashed #ebebeb\";\n };\n FileSelectionUi.prototype.fileBasedScanRegionActiveBorder = function () {\n return \"6px dashed rgb(153 151 151)\";\n };\n FileSelectionUi.prototype.createDragAndDropMessage = function () {\n var dragAndDropMessage = document.createElement(\"div\");\n dragAndDropMessage.innerText = Html5QrcodeScannerStrings.dragAndDropMessage();\n dragAndDropMessage.style.fontWeight = \"400\";\n return dragAndDropMessage;\n };\n FileSelectionUi.prototype.setImageNameToButton = function (imageFileName) {\n var MAX_CHARS = 20;\n if (imageFileName.length > MAX_CHARS) {\n var start8Chars = imageFileName.substring(0, 8);\n var length_1 = imageFileName.length;\n var last8Chars = imageFileName.substring(length_1 - 8, length_1);\n imageFileName = start8Chars + \"....\" + last8Chars;\n }\n var newText = Html5QrcodeScannerStrings.fileSelectionChooseAnother() + \" - \" + imageFileName;\n this.fileSelectionButton.innerText = newText;\n };\n FileSelectionUi.prototype.setInitialValueToButton = function () {\n var initialText = Html5QrcodeScannerStrings.fileSelectionChooseImage() + \" - \" + Html5QrcodeScannerStrings.fileSelectionNoImageSelected();\n this.fileSelectionButton.innerText = initialText;\n };\n FileSelectionUi.prototype.getFileScanInputId = function () {\n return \"html5-qrcode-private-filescan-input\";\n };\n FileSelectionUi.create = function (parentElement, showOnRender, onFileSelected) {\n var button = new FileSelectionUi(parentElement, showOnRender, onFileSelected);\n return button;\n };\n return FileSelectionUi;\n}();\nexport { FileSelectionUi };\n","import { BaseUiElementFactory, PublicUiElementIdAndClasses } from \"./base\";\nimport { Html5QrcodeScannerStrings } from \"../../strings\";\nvar CameraSelectionUi = function () {\n function CameraSelectionUi(cameras) {\n this.selectElement = BaseUiElementFactory.createElement(\"select\", PublicUiElementIdAndClasses.CAMERA_SELECTION_SELECT_ID);\n this.cameras = cameras;\n this.options = [];\n }\n CameraSelectionUi.prototype.render = function (parentElement) {\n var cameraSelectionContainer = document.createElement(\"span\");\n cameraSelectionContainer.style.marginRight = \"10px\";\n var numCameras = this.cameras.length;\n if (numCameras === 0) {\n throw new Error(\"No cameras found\");\n }\n if (numCameras === 1) {\n cameraSelectionContainer.style.display = \"none\";\n } else {\n var selectCameraString = Html5QrcodeScannerStrings.selectCamera();\n cameraSelectionContainer.innerText = selectCameraString + \" (\" + this.cameras.length + \") \";\n }\n var anonymousCameraId = 1;\n for (var _i = 0, _a = this.cameras; _i < _a.length; _i++) {\n var camera = _a[_i];\n var value = camera.id;\n var name_1 = camera.label == null ? value : camera.label;\n if (!name_1 || name_1 === \"\") {\n name_1 = [Html5QrcodeScannerStrings.anonymousCameraPrefix(), anonymousCameraId++].join(\" \");\n }\n var option = document.createElement(\"option\");\n option.value = value;\n option.innerText = name_1;\n this.options.push(option);\n this.selectElement.appendChild(option);\n }\n cameraSelectionContainer.appendChild(this.selectElement);\n parentElement.appendChild(cameraSelectionContainer);\n };\n CameraSelectionUi.prototype.disable = function () {\n this.selectElement.disabled = true;\n };\n CameraSelectionUi.prototype.isDisabled = function () {\n return this.selectElement.disabled === true;\n };\n CameraSelectionUi.prototype.enable = function () {\n this.selectElement.disabled = false;\n };\n CameraSelectionUi.prototype.getValue = function () {\n return this.selectElement.value;\n };\n CameraSelectionUi.prototype.hasValue = function (value) {\n for (var _i = 0, _a = this.options; _i < _a.length; _i++) {\n var option = _a[_i];\n if (option.value === value) {\n return true;\n }\n }\n return false;\n };\n CameraSelectionUi.prototype.setValue = function (value) {\n if (!this.hasValue(value)) {\n throw new Error(value + \" is not present in the camera list.\");\n }\n this.selectElement.value = value;\n };\n CameraSelectionUi.prototype.hasSingleItem = function () {\n return this.cameras.length === 1;\n };\n CameraSelectionUi.prototype.numCameras = function () {\n return this.cameras.length;\n };\n CameraSelectionUi.create = function (parentElement, cameras) {\n var cameraSelectUi = new CameraSelectionUi(cameras);\n cameraSelectUi.render(parentElement);\n return cameraSelectUi;\n };\n return CameraSelectionUi;\n}();\nexport { CameraSelectionUi };\n","import { BaseUiElementFactory, PublicUiElementIdAndClasses } from \"./base\";\nimport { Html5QrcodeScannerStrings } from \"../../strings\";\nvar CameraZoomUi = function () {\n function CameraZoomUi() {\n this.onChangeCallback = null;\n this.zoomElementContainer = document.createElement(\"div\");\n this.rangeInput = BaseUiElementFactory.createElement(\"input\", PublicUiElementIdAndClasses.ZOOM_SLIDER_ID);\n this.rangeInput.type = \"range\";\n this.rangeText = document.createElement(\"span\");\n this.rangeInput.min = \"1\";\n this.rangeInput.max = \"5\";\n this.rangeInput.value = \"1\";\n this.rangeInput.step = \"0.1\";\n }\n CameraZoomUi.prototype.render = function (parentElement, renderOnCreate) {\n this.zoomElementContainer.style.display = renderOnCreate ? \"block\" : \"none\";\n this.zoomElementContainer.style.padding = \"5px 10px\";\n this.zoomElementContainer.style.textAlign = \"center\";\n parentElement.appendChild(this.zoomElementContainer);\n this.rangeInput.style.display = \"inline-block\";\n this.rangeInput.style.width = \"50%\";\n this.rangeInput.style.height = \"5px\";\n this.rangeInput.style.background = \"#d3d3d3\";\n this.rangeInput.style.outline = \"none\";\n this.rangeInput.style.opacity = \"0.7\";\n var zoomString = Html5QrcodeScannerStrings.zoom();\n this.rangeText.innerText = this.rangeInput.value + \"x \" + zoomString;\n this.rangeText.style.marginRight = \"10px\";\n var $this = this;\n this.rangeInput.addEventListener(\"input\", function () {\n return $this.onValueChange();\n });\n this.rangeInput.addEventListener(\"change\", function () {\n return $this.onValueChange();\n });\n this.zoomElementContainer.appendChild(this.rangeInput);\n this.zoomElementContainer.appendChild(this.rangeText);\n };\n CameraZoomUi.prototype.onValueChange = function () {\n var zoomString = Html5QrcodeScannerStrings.zoom();\n this.rangeText.innerText = this.rangeInput.value + \"x \" + zoomString;\n if (this.onChangeCallback) {\n this.onChangeCallback(parseFloat(this.rangeInput.value));\n }\n };\n CameraZoomUi.prototype.setValues = function (minValue, maxValue, defaultValue, step) {\n this.rangeInput.min = minValue.toString();\n this.rangeInput.max = maxValue.toString();\n this.rangeInput.step = step.toString();\n this.rangeInput.value = defaultValue.toString();\n this.onValueChange();\n };\n CameraZoomUi.prototype.show = function () {\n this.zoomElementContainer.style.display = \"block\";\n };\n CameraZoomUi.prototype.hide = function () {\n this.zoomElementContainer.style.display = \"none\";\n };\n CameraZoomUi.prototype.setOnCameraZoomValueChangeCallback = function (onChangeCallback) {\n this.onChangeCallback = onChangeCallback;\n };\n CameraZoomUi.prototype.removeOnCameraZoomValueChangeCallback = function () {\n this.onChangeCallback = null;\n };\n CameraZoomUi.create = function (parentElement, renderOnCreate) {\n var cameraZoomUi = new CameraZoomUi();\n cameraZoomUi.render(parentElement, renderOnCreate);\n return cameraZoomUi;\n };\n return CameraZoomUi;\n}();\nexport { CameraZoomUi };\n","import { Html5QrcodeConstants, Html5QrcodeScanType, Html5QrcodeErrorFactory, BaseLoggger, isNullOrUndefined, clip } from \"./core\";\nimport { Html5Qrcode } from \"./html5-qrcode\";\nimport { Html5QrcodeScannerStrings } from \"./strings\";\nimport { ASSET_FILE_SCAN, ASSET_CAMERA_SCAN } from \"./image-assets\";\nimport { PersistedDataManager } from \"./storage\";\nimport { LibraryInfoContainer } from \"./ui\";\nimport { CameraPermissions } from \"./camera/permissions\";\nimport { ScanTypeSelector } from \"./ui/scanner/scan-type-selector\";\nimport { TorchButton } from \"./ui/scanner/torch-button\";\nimport { FileSelectionUi } from \"./ui/scanner/file-selection-ui\";\nimport { BaseUiElementFactory, PublicUiElementIdAndClasses } from \"./ui/scanner/base\";\nimport { CameraSelectionUi } from \"./ui/scanner/camera-selection-ui\";\nimport { CameraZoomUi } from \"./ui/scanner/camera-zoom-ui\";\nvar Html5QrcodeScannerStatus = /*#__PURE__*/function (Html5QrcodeScannerStatus) {\n Html5QrcodeScannerStatus[Html5QrcodeScannerStatus[\"STATUS_DEFAULT\"] = 0] = \"STATUS_DEFAULT\";\n Html5QrcodeScannerStatus[Html5QrcodeScannerStatus[\"STATUS_SUCCESS\"] = 1] = \"STATUS_SUCCESS\";\n Html5QrcodeScannerStatus[Html5QrcodeScannerStatus[\"STATUS_WARNING\"] = 2] = \"STATUS_WARNING\";\n Html5QrcodeScannerStatus[Html5QrcodeScannerStatus[\"STATUS_REQUESTING_PERMISSION\"] = 3] = \"STATUS_REQUESTING_PERMISSION\";\n return Html5QrcodeScannerStatus;\n}(Html5QrcodeScannerStatus || {});\nfunction toHtml5QrcodeCameraScanConfig(config) {\n return {\n fps: config.fps,\n qrbox: config.qrbox,\n aspectRatio: config.aspectRatio,\n disableFlip: config.disableFlip,\n videoConstraints: config.videoConstraints\n };\n}\nfunction toHtml5QrcodeFullConfig(config, verbose) {\n return {\n formatsToSupport: config.formatsToSupport,\n useBarCodeDetectorIfSupported: config.useBarCodeDetectorIfSupported,\n experimentalFeatures: config.experimentalFeatures,\n verbose: verbose\n };\n}\nvar Html5QrcodeScanner = function () {\n function Html5QrcodeScanner(elementId, config, verbose) {\n this.lastMatchFound = null;\n this.cameraScanImage = null;\n this.fileScanImage = null;\n this.fileSelectionUi = null;\n this.elementId = elementId;\n this.config = this.createConfig(config);\n this.verbose = verbose === true;\n if (!document.getElementById(elementId)) {\n throw \"HTML Element with id=\" + elementId + \" not found\";\n }\n this.scanTypeSelector = new ScanTypeSelector(this.config.supportedScanTypes);\n this.currentScanType = this.scanTypeSelector.getDefaultScanType();\n this.sectionSwapAllowed = true;\n this.logger = new BaseLoggger(this.verbose);\n this.persistedDataManager = new PersistedDataManager();\n if (config.rememberLastUsedCamera !== true) {\n this.persistedDataManager.reset();\n }\n }\n Html5QrcodeScanner.prototype.render = function (qrCodeSuccessCallback, qrCodeErrorCallback) {\n var _this = this;\n this.lastMatchFound = null;\n this.qrCodeSuccessCallback = function (decodedText, result) {\n if (qrCodeSuccessCallback) {\n qrCodeSuccessCallback(decodedText, result);\n } else {\n if (_this.lastMatchFound === decodedText) {\n return;\n }\n _this.lastMatchFound = decodedText;\n _this.setHeaderMessage(Html5QrcodeScannerStrings.lastMatch(decodedText), Html5QrcodeScannerStatus.STATUS_SUCCESS);\n }\n };\n this.qrCodeErrorCallback = function (errorMessage, error) {\n if (qrCodeErrorCallback) {\n qrCodeErrorCallback(errorMessage, error);\n }\n };\n var container = document.getElementById(this.elementId);\n if (!container) {\n throw \"HTML Element with id=\" + this.elementId + \" not found\";\n }\n container.innerHTML = \"\";\n this.createBasicLayout(container);\n this.html5Qrcode = new Html5Qrcode(this.getScanRegionId(), toHtml5QrcodeFullConfig(this.config, this.verbose));\n };\n Html5QrcodeScanner.prototype.pause = function (shouldPauseVideo) {\n if (isNullOrUndefined(shouldPauseVideo) || shouldPauseVideo !== true) {\n shouldPauseVideo = false;\n }\n this.getHtml5QrcodeOrFail().pause(shouldPauseVideo);\n };\n Html5QrcodeScanner.prototype.resume = function () {\n this.getHtml5QrcodeOrFail().resume();\n };\n Html5QrcodeScanner.prototype.getState = function () {\n return this.getHtml5QrcodeOrFail().getState();\n };\n Html5QrcodeScanner.prototype.clear = function () {\n var _this = this;\n var emptyHtmlContainer = function () {\n var mainContainer = document.getElementById(_this.elementId);\n if (mainContainer) {\n mainContainer.innerHTML = \"\";\n _this.resetBasicLayout(mainContainer);\n }\n };\n if (this.html5Qrcode) {\n return new Promise(function (resolve, reject) {\n if (!_this.html5Qrcode) {\n resolve();\n return;\n }\n if (_this.html5Qrcode.isScanning) {\n _this.html5Qrcode.stop().then(function (_) {\n if (!_this.html5Qrcode) {\n resolve();\n return;\n }\n _this.html5Qrcode.clear();\n emptyHtmlContainer();\n resolve();\n }).catch(function (error) {\n if (_this.verbose) {\n _this.logger.logError(\"Unable to stop qrcode scanner\", error);\n }\n reject(error);\n });\n } else {\n _this.html5Qrcode.clear();\n emptyHtmlContainer();\n }\n });\n }\n return Promise.resolve();\n };\n Html5QrcodeScanner.prototype.getRunningTrackCapabilities = function () {\n return this.getHtml5QrcodeOrFail().getRunningTrackCapabilities();\n };\n Html5QrcodeScanner.prototype.getRunningTrackSettings = function () {\n return this.getHtml5QrcodeOrFail().getRunningTrackSettings();\n };\n Html5QrcodeScanner.prototype.applyVideoConstraints = function (videoConstaints) {\n return this.getHtml5QrcodeOrFail().applyVideoConstraints(videoConstaints);\n };\n Html5QrcodeScanner.prototype.getHtml5QrcodeOrFail = function () {\n if (!this.html5Qrcode) {\n throw \"Code scanner not initialized.\";\n }\n return this.html5Qrcode;\n };\n Html5QrcodeScanner.prototype.createConfig = function (config) {\n if (config) {\n if (!config.fps) {\n config.fps = Html5QrcodeConstants.SCAN_DEFAULT_FPS;\n }\n if (config.rememberLastUsedCamera !== !Html5QrcodeConstants.DEFAULT_REMEMBER_LAST_CAMERA_USED) {\n config.rememberLastUsedCamera = Html5QrcodeConstants.DEFAULT_REMEMBER_LAST_CAMERA_USED;\n }\n if (!config.supportedScanTypes) {\n config.supportedScanTypes = Html5QrcodeConstants.DEFAULT_SUPPORTED_SCAN_TYPE;\n }\n return config;\n }\n return {\n fps: Html5QrcodeConstants.SCAN_DEFAULT_FPS,\n rememberLastUsedCamera: Html5QrcodeConstants.DEFAULT_REMEMBER_LAST_CAMERA_USED,\n supportedScanTypes: Html5QrcodeConstants.DEFAULT_SUPPORTED_SCAN_TYPE\n };\n };\n Html5QrcodeScanner.prototype.createBasicLayout = function (parent) {\n parent.style.position = \"relative\";\n parent.style.padding = \"0px\";\n parent.style.border = \"1px solid silver\";\n this.createHeader(parent);\n var qrCodeScanRegion = document.createElement(\"div\");\n var scanRegionId = this.getScanRegionId();\n qrCodeScanRegion.id = scanRegionId;\n qrCodeScanRegion.style.width = \"100%\";\n qrCodeScanRegion.style.minHeight = \"100px\";\n qrCodeScanRegion.style.textAlign = \"center\";\n parent.appendChild(qrCodeScanRegion);\n if (ScanTypeSelector.isCameraScanType(this.currentScanType)) {\n this.insertCameraScanImageToScanRegion();\n } else {\n this.insertFileScanImageToScanRegion();\n }\n var qrCodeDashboard = document.createElement(\"div\");\n var dashboardId = this.getDashboardId();\n qrCodeDashboard.id = dashboardId;\n qrCodeDashboard.style.width = \"100%\";\n parent.appendChild(qrCodeDashboard);\n this.setupInitialDashboard(qrCodeDashboard);\n };\n Html5QrcodeScanner.prototype.resetBasicLayout = function (mainContainer) {\n mainContainer.style.border = \"none\";\n };\n Html5QrcodeScanner.prototype.setupInitialDashboard = function (dashboard) {\n var $this = this;\n this.createSection(dashboard);\n this.createSectionControlPanel();\n if (this.scanTypeSelector.hasMoreThanOneScanType()) {\n this.createSectionSwap();\n }\n };\n Html5QrcodeScanner.prototype.createHeader = function (dashboard) {\n var header = document.createElement(\"div\");\n header.style.textAlign = \"left\";\n header.style.margin = \"0px\";\n dashboard.appendChild(header);\n var libraryInfo = new LibraryInfoContainer();\n libraryInfo.renderInto(header);\n var headerMessageContainer = document.createElement(\"div\");\n headerMessageContainer.id = this.getHeaderMessageContainerId();\n headerMessageContainer.style.display = \"none\";\n headerMessageContainer.style.textAlign = \"center\";\n headerMessageContainer.style.fontSize = \"14px\";\n headerMessageContainer.style.padding = \"2px 10px\";\n headerMessageContainer.style.margin = \"4px\";\n headerMessageContainer.style.borderTop = \"1px solid #f6f6f6\";\n header.appendChild(headerMessageContainer);\n };\n Html5QrcodeScanner.prototype.createSection = function (dashboard) {\n var section = document.createElement(\"div\");\n section.id = this.getDashboardSectionId();\n section.style.width = \"100%\";\n section.style.padding = \"10px 0px 10px 0px\";\n section.style.textAlign = \"left\";\n dashboard.appendChild(section);\n };\n Html5QrcodeScanner.prototype.createCameraListUi = function (scpCameraScanRegion, requestPermissionContainer, requestPermissionButton) {\n var $this = this;\n $this.showHideScanTypeSwapLink(false);\n $this.setHeaderMessage(Html5QrcodeScannerStrings.cameraPermissionRequesting());\n var createPermissionButtonIfNotExists = function () {\n if (!requestPermissionButton) {\n $this.createPermissionButton(scpCameraScanRegion, requestPermissionContainer);\n }\n };\n Html5Qrcode.getCameras().then(function (cameras) {\n $this.persistedDataManager.setHasPermission(true);\n $this.showHideScanTypeSwapLink(true);\n $this.resetHeaderMessage();\n if (cameras && cameras.length > 0) {\n scpCameraScanRegion.removeChild(requestPermissionContainer);\n $this.renderCameraSelection(cameras);\n } else {\n $this.setHeaderMessage(Html5QrcodeScannerStrings.noCameraFound(), Html5QrcodeScannerStatus.STATUS_WARNING);\n createPermissionButtonIfNotExists();\n }\n }).catch(function (error) {\n $this.persistedDataManager.setHasPermission(false);\n if (requestPermissionButton) {\n requestPermissionButton.disabled = false;\n } else {\n createPermissionButtonIfNotExists();\n }\n $this.setHeaderMessage(error, Html5QrcodeScannerStatus.STATUS_WARNING);\n $this.showHideScanTypeSwapLink(true);\n });\n };\n Html5QrcodeScanner.prototype.createPermissionButton = function (scpCameraScanRegion, requestPermissionContainer) {\n var $this = this;\n var requestPermissionButton = BaseUiElementFactory.createElement(\"button\", this.getCameraPermissionButtonId());\n requestPermissionButton.innerText = Html5QrcodeScannerStrings.cameraPermissionTitle();\n requestPermissionButton.addEventListener(\"click\", function () {\n requestPermissionButton.disabled = true;\n $this.createCameraListUi(scpCameraScanRegion, requestPermissionContainer, requestPermissionButton);\n });\n requestPermissionContainer.appendChild(requestPermissionButton);\n };\n Html5QrcodeScanner.prototype.createPermissionsUi = function (scpCameraScanRegion, requestPermissionContainer) {\n var $this = this;\n if (ScanTypeSelector.isCameraScanType(this.currentScanType) && this.persistedDataManager.hasCameraPermissions()) {\n CameraPermissions.hasPermissions().then(function (hasPermissions) {\n if (hasPermissions) {\n $this.createCameraListUi(scpCameraScanRegion, requestPermissionContainer);\n } else {\n $this.persistedDataManager.setHasPermission(false);\n $this.createPermissionButton(scpCameraScanRegion, requestPermissionContainer);\n }\n }).catch(function (_) {\n $this.persistedDataManager.setHasPermission(false);\n $this.createPermissionButton(scpCameraScanRegion, requestPermissionContainer);\n });\n return;\n }\n this.createPermissionButton(scpCameraScanRegion, requestPermissionContainer);\n };\n Html5QrcodeScanner.prototype.createSectionControlPanel = function () {\n var $this = this;\n var section = document.getElementById(this.getDashboardSectionId());\n var sectionControlPanel = document.createElement(\"div\");\n section.appendChild(sectionControlPanel);\n var scpCameraScanRegion = document.createElement(\"div\");\n scpCameraScanRegion.id = this.getDashboardSectionCameraScanRegionId();\n scpCameraScanRegion.style.display = ScanTypeSelector.isCameraScanType(this.currentScanType) ? \"block\" : \"none\";\n sectionControlPanel.appendChild(scpCameraScanRegion);\n var requestPermissionContainer = document.createElement(\"div\");\n requestPermissionContainer.style.textAlign = \"center\";\n scpCameraScanRegion.appendChild(requestPermissionContainer);\n if (this.scanTypeSelector.isCameraScanRequired()) {\n this.createPermissionsUi(scpCameraScanRegion, requestPermissionContainer);\n }\n this.renderFileScanUi(sectionControlPanel);\n };\n Html5QrcodeScanner.prototype.renderFileScanUi = function (parent) {\n var showOnRender = ScanTypeSelector.isFileScanType(this.currentScanType);\n var $this = this;\n var onFileSelected = function (file) {\n if (!$this.html5Qrcode) {\n throw \"html5Qrcode not defined\";\n }\n if (!ScanTypeSelector.isFileScanType($this.currentScanType)) {\n return;\n }\n $this.setHeaderMessage(Html5QrcodeScannerStrings.loadingImage());\n $this.html5Qrcode.scanFileV2(file, true).then(function (html5qrcodeResult) {\n $this.resetHeaderMessage();\n $this.qrCodeSuccessCallback(html5qrcodeResult.decodedText, html5qrcodeResult);\n }).catch(function (error) {\n $this.setHeaderMessage(error, Html5QrcodeScannerStatus.STATUS_WARNING);\n $this.qrCodeErrorCallback(error, Html5QrcodeErrorFactory.createFrom(error));\n });\n };\n this.fileSelectionUi = FileSelectionUi.create(parent, showOnRender, onFileSelected);\n };\n Html5QrcodeScanner.prototype.renderCameraSelection = function (cameras) {\n var _this = this;\n var $this = this;\n var scpCameraScanRegion = document.getElementById(this.getDashboardSectionCameraScanRegionId());\n scpCameraScanRegion.style.textAlign = \"center\";\n var cameraZoomUi = CameraZoomUi.create(scpCameraScanRegion, false);\n var renderCameraZoomUiIfSupported = function (cameraCapabilities) {\n var zoomCapability = cameraCapabilities.zoomFeature();\n if (!zoomCapability.isSupported()) {\n return;\n }\n cameraZoomUi.setOnCameraZoomValueChangeCallback(function (zoomValue) {\n zoomCapability.apply(zoomValue);\n });\n var defaultZoom = 1;\n if (_this.config.defaultZoomValueIfSupported) {\n defaultZoom = _this.config.defaultZoomValueIfSupported;\n }\n defaultZoom = clip(defaultZoom, zoomCapability.min(), zoomCapability.max());\n cameraZoomUi.setValues(zoomCapability.min(), zoomCapability.max(), defaultZoom, zoomCapability.step());\n cameraZoomUi.show();\n };\n var cameraSelectUi = CameraSelectionUi.create(scpCameraScanRegion, cameras);\n var cameraActionContainer = document.createElement(\"span\");\n var cameraActionStartButton = BaseUiElementFactory.createElement(\"button\", PublicUiElementIdAndClasses.CAMERA_START_BUTTON_ID);\n cameraActionStartButton.innerText = Html5QrcodeScannerStrings.scanButtonStartScanningText();\n cameraActionContainer.appendChild(cameraActionStartButton);\n var cameraActionStopButton = BaseUiElementFactory.createElement(\"button\", PublicUiElementIdAndClasses.CAMERA_STOP_BUTTON_ID);\n cameraActionStopButton.innerText = Html5QrcodeScannerStrings.scanButtonStopScanningText();\n cameraActionStopButton.style.display = \"none\";\n cameraActionStopButton.disabled = true;\n cameraActionContainer.appendChild(cameraActionStopButton);\n var torchButton;\n var createAndShowTorchButtonIfSupported = function (cameraCapabilities) {\n if (!cameraCapabilities.torchFeature().isSupported()) {\n if (torchButton) {\n torchButton.hide();\n }\n return;\n }\n if (!torchButton) {\n torchButton = TorchButton.create(cameraActionContainer, cameraCapabilities.torchFeature(), {\n display: \"none\",\n marginLeft: \"5px\"\n }, function (errorMessage) {\n $this.setHeaderMessage(errorMessage, Html5QrcodeScannerStatus.STATUS_WARNING);\n });\n } else {\n torchButton.updateTorchCapability(cameraCapabilities.torchFeature());\n }\n torchButton.show();\n };\n scpCameraScanRegion.appendChild(cameraActionContainer);\n var resetCameraActionStartButton = function (shouldShow) {\n if (!shouldShow) {\n cameraActionStartButton.style.display = \"none\";\n }\n cameraActionStartButton.innerText = Html5QrcodeScannerStrings.scanButtonStartScanningText();\n cameraActionStartButton.style.opacity = \"1\";\n cameraActionStartButton.disabled = false;\n if (shouldShow) {\n cameraActionStartButton.style.display = \"inline-block\";\n }\n };\n cameraActionStartButton.addEventListener(\"click\", function (_) {\n cameraActionStartButton.innerText = Html5QrcodeScannerStrings.scanButtonScanningStarting();\n cameraSelectUi.disable();\n cameraActionStartButton.disabled = true;\n cameraActionStartButton.style.opacity = \"0.5\";\n if (_this.scanTypeSelector.hasMoreThanOneScanType()) {\n $this.showHideScanTypeSwapLink(false);\n }\n $this.resetHeaderMessage();\n var cameraId = cameraSelectUi.getValue();\n $this.persistedDataManager.setLastUsedCameraId(cameraId);\n $this.html5Qrcode.start(cameraId, toHtml5QrcodeCameraScanConfig($this.config), $this.qrCodeSuccessCallback, $this.qrCodeErrorCallback).then(function (_) {\n cameraActionStopButton.disabled = false;\n cameraActionStopButton.style.display = \"inline-block\";\n resetCameraActionStartButton(false);\n var cameraCapabilities = $this.html5Qrcode.getRunningTrackCameraCapabilities();\n if (_this.config.showTorchButtonIfSupported === true) {\n createAndShowTorchButtonIfSupported(cameraCapabilities);\n }\n if (_this.config.showZoomSliderIfSupported === true) {\n renderCameraZoomUiIfSupported(cameraCapabilities);\n }\n }).catch(function (error) {\n $this.showHideScanTypeSwapLink(true);\n cameraSelectUi.enable();\n resetCameraActionStartButton(true);\n $this.setHeaderMessage(error, Html5QrcodeScannerStatus.STATUS_WARNING);\n });\n });\n if (cameraSelectUi.hasSingleItem()) {\n cameraActionStartButton.click();\n }\n cameraActionStopButton.addEventListener(\"click\", function (_) {\n if (!$this.html5Qrcode) {\n throw \"html5Qrcode not defined\";\n }\n cameraActionStopButton.disabled = true;\n $this.html5Qrcode.stop().then(function (_) {\n if (_this.scanTypeSelector.hasMoreThanOneScanType()) {\n $this.showHideScanTypeSwapLink(true);\n }\n cameraSelectUi.enable();\n cameraActionStartButton.disabled = false;\n cameraActionStopButton.style.display = \"none\";\n cameraActionStartButton.style.display = \"inline-block\";\n if (torchButton) {\n torchButton.reset();\n torchButton.hide();\n }\n cameraZoomUi.removeOnCameraZoomValueChangeCallback();\n cameraZoomUi.hide();\n $this.insertCameraScanImageToScanRegion();\n }).catch(function (error) {\n cameraActionStopButton.disabled = false;\n $this.setHeaderMessage(error, Html5QrcodeScannerStatus.STATUS_WARNING);\n });\n });\n if ($this.persistedDataManager.getLastUsedCameraId()) {\n var cameraId = $this.persistedDataManager.getLastUsedCameraId();\n if (cameraSelectUi.hasValue(cameraId)) {\n cameraSelectUi.setValue(cameraId);\n cameraActionStartButton.click();\n } else {\n $this.persistedDataManager.resetLastUsedCameraId();\n }\n }\n };\n Html5QrcodeScanner.prototype.createSectionSwap = function () {\n var $this = this;\n var TEXT_IF_CAMERA_SCAN_SELECTED = Html5QrcodeScannerStrings.textIfCameraScanSelected();\n var TEXT_IF_FILE_SCAN_SELECTED = Html5QrcodeScannerStrings.textIfFileScanSelected();\n var section = document.getElementById(this.getDashboardSectionId());\n var switchContainer = document.createElement(\"div\");\n switchContainer.style.textAlign = \"center\";\n var switchScanTypeLink = BaseUiElementFactory.createElement(\"a\", this.getDashboardSectionSwapLinkId());\n switchScanTypeLink.style.textDecoration = \"underline\";\n switchScanTypeLink.innerText = ScanTypeSelector.isCameraScanType(this.currentScanType) ? TEXT_IF_CAMERA_SCAN_SELECTED : TEXT_IF_FILE_SCAN_SELECTED;\n switchScanTypeLink.addEventListener(\"click\", function () {\n if (!$this.sectionSwapAllowed) {\n if ($this.verbose) {\n $this.logger.logError(\"Section swap called when not allowed\");\n }\n return;\n }\n $this.resetHeaderMessage();\n $this.fileSelectionUi.resetValue();\n $this.sectionSwapAllowed = false;\n if (ScanTypeSelector.isCameraScanType($this.currentScanType)) {\n $this.clearScanRegion();\n $this.getCameraScanRegion().style.display = \"none\";\n $this.fileSelectionUi.show();\n switchScanTypeLink.innerText = TEXT_IF_FILE_SCAN_SELECTED;\n $this.currentScanType = Html5QrcodeScanType.SCAN_TYPE_FILE;\n $this.insertFileScanImageToScanRegion();\n } else {\n $this.clearScanRegion();\n $this.getCameraScanRegion().style.display = \"block\";\n $this.fileSelectionUi.hide();\n switchScanTypeLink.innerText = TEXT_IF_CAMERA_SCAN_SELECTED;\n $this.currentScanType = Html5QrcodeScanType.SCAN_TYPE_CAMERA;\n $this.insertCameraScanImageToScanRegion();\n $this.startCameraScanIfPermissionExistsOnSwap();\n }\n $this.sectionSwapAllowed = true;\n });\n switchContainer.appendChild(switchScanTypeLink);\n section.appendChild(switchContainer);\n };\n Html5QrcodeScanner.prototype.startCameraScanIfPermissionExistsOnSwap = function () {\n var _this = this;\n var $this = this;\n if (this.persistedDataManager.hasCameraPermissions()) {\n CameraPermissions.hasPermissions().then(function (hasPermissions) {\n if (hasPermissions) {\n var permissionButton = document.getElementById($this.getCameraPermissionButtonId());\n if (!permissionButton) {\n _this.logger.logError(\"Permission button not found, fail;\");\n throw \"Permission button not found\";\n }\n permissionButton.click();\n } else {\n $this.persistedDataManager.setHasPermission(false);\n }\n }).catch(function (_) {\n $this.persistedDataManager.setHasPermission(false);\n });\n return;\n }\n };\n Html5QrcodeScanner.prototype.resetHeaderMessage = function () {\n var messageDiv = document.getElementById(this.getHeaderMessageContainerId());\n messageDiv.style.display = \"none\";\n };\n Html5QrcodeScanner.prototype.setHeaderMessage = function (messageText, scannerStatus) {\n if (!scannerStatus) {\n scannerStatus = Html5QrcodeScannerStatus.STATUS_DEFAULT;\n }\n var messageDiv = this.getHeaderMessageDiv();\n messageDiv.innerText = messageText;\n messageDiv.style.display = \"block\";\n switch (scannerStatus) {\n case Html5QrcodeScannerStatus.STATUS_SUCCESS:\n messageDiv.style.background = \"rgba(106, 175, 80, 0.26)\";\n messageDiv.style.color = \"#477735\";\n break;\n case Html5QrcodeScannerStatus.STATUS_WARNING:\n messageDiv.style.background = \"rgba(203, 36, 49, 0.14)\";\n messageDiv.style.color = \"#cb2431\";\n break;\n case Html5QrcodeScannerStatus.STATUS_DEFAULT:\n default:\n messageDiv.style.background = \"rgba(0, 0, 0, 0)\";\n messageDiv.style.color = \"rgb(17, 17, 17)\";\n break;\n }\n };\n Html5QrcodeScanner.prototype.showHideScanTypeSwapLink = function (shouldDisplay) {\n if (shouldDisplay !== true) {\n shouldDisplay = false;\n }\n this.sectionSwapAllowed = shouldDisplay;\n this.getDashboardSectionSwapLink().style.display = shouldDisplay ? \"inline-block\" : \"none\";\n };\n Html5QrcodeScanner.prototype.insertCameraScanImageToScanRegion = function () {\n var $this = this;\n var qrCodeScanRegion = document.getElementById(this.getScanRegionId());\n if (this.cameraScanImage) {\n qrCodeScanRegion.innerHTML = \" \";\n qrCodeScanRegion.appendChild(this.cameraScanImage);\n return;\n }\n this.cameraScanImage = new Image();\n this.cameraScanImage.onload = function (_) {\n qrCodeScanRegion.innerHTML = \" \";\n qrCodeScanRegion.appendChild($this.cameraScanImage);\n };\n this.cameraScanImage.width = 64;\n this.cameraScanImage.style.opacity = \"0.8\";\n this.cameraScanImage.src = ASSET_CAMERA_SCAN;\n };\n Html5QrcodeScanner.prototype.insertFileScanImageToScanRegion = function () {\n var $this = this;\n var qrCodeScanRegion = document.getElementById(this.getScanRegionId());\n if (this.fileScanImage) {\n qrCodeScanRegion.innerHTML = \" \";\n qrCodeScanRegion.appendChild(this.fileScanImage);\n return;\n }\n this.fileScanImage = new Image();\n this.fileScanImage.onload = function (_) {\n qrCodeScanRegion.innerHTML = \" \";\n qrCodeScanRegion.appendChild($this.fileScanImage);\n };\n this.fileScanImage.width = 64;\n this.fileScanImage.style.opacity = \"0.8\";\n this.fileScanImage.src = ASSET_FILE_SCAN;\n };\n Html5QrcodeScanner.prototype.clearScanRegion = function () {\n var qrCodeScanRegion = document.getElementById(this.getScanRegionId());\n qrCodeScanRegion.innerHTML = \"\";\n };\n Html5QrcodeScanner.prototype.getDashboardSectionId = function () {\n return this.elementId + \"__dashboard_section\";\n };\n Html5QrcodeScanner.prototype.getDashboardSectionCameraScanRegionId = function () {\n return this.elementId + \"__dashboard_section_csr\";\n };\n Html5QrcodeScanner.prototype.getDashboardSectionSwapLinkId = function () {\n return PublicUiElementIdAndClasses.SCAN_TYPE_CHANGE_ANCHOR_ID;\n };\n Html5QrcodeScanner.prototype.getScanRegionId = function () {\n return this.elementId + \"__scan_region\";\n };\n Html5QrcodeScanner.prototype.getDashboardId = function () {\n return this.elementId + \"__dashboard\";\n };\n Html5QrcodeScanner.prototype.getHeaderMessageContainerId = function () {\n return this.elementId + \"__header_message\";\n };\n Html5QrcodeScanner.prototype.getCameraPermissionButtonId = function () {\n return PublicUiElementIdAndClasses.CAMERA_PERMISSION_BUTTON_ID;\n };\n Html5QrcodeScanner.prototype.getCameraScanRegion = function () {\n return document.getElementById(this.getDashboardSectionCameraScanRegionId());\n };\n Html5QrcodeScanner.prototype.getDashboardSectionSwapLink = function () {\n return document.getElementById(this.getDashboardSectionSwapLinkId());\n };\n Html5QrcodeScanner.prototype.getHeaderMessageDiv = function () {\n return document.getElementById(this.getHeaderMessageContainerId());\n };\n return Html5QrcodeScanner;\n}();\nexport { Html5QrcodeScanner };\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { Entity } from '@proman/services/entity.service';\nimport moment from 'moment';\nimport { FilePreviewService } from '@proman/services/file-preview.service';\nimport { Employee, EmployeeDocument, PromanFile } from '@proman/interfaces/entity-interfaces';\nimport { EmployeeDocumentEntityInterface } from '@proman/resources/employee-document';\nimport { EmployeeEntityInterface } from '@proman/resources/employee';\nimport { EmployeesService } from '@frontend/employees/services/employees.service';\nimport { Dialog } from '@frontend/shared/services/dialog.service';\nimport { CanvasSignDialogComponent } from '../../shared-dialogs/components/canvas-sign-dialog.component';\nimport { getScreenWidthPercent } from '@proman/utils';\nimport { ImagePathService } from '@proman/services/image-path.service';\nimport { Store } from '@ngrx/store';\nimport { getCurrUser } from '@proman/store/curr-user';\nimport { filter } from '@proman/rxjs-common';\n\n@Component({\n selector: 'pm-employee-documents-read',\n template: `\n \n \n \n {{ 'documents' | translate }} \n \n \n \n @if (!document.isRead && isMe) {\n
\n \n }\n @if (document.signature) {\n
\n }\n\n
\n
\n
{{ document.name }}\n @if (document.isRead) {\n
{{ 'signed' | translate }}: {{ document.isRead }}
\n }\n
\n\n
\n
\n
\n\n \n \n \n \n `,\n styles: [`\n .EmployeeDocumentRow {\n font-size: 13px;\n }\n `]\n})\n\nexport class EmployeeDocumentsReadComponent implements OnInit {\n @Input() employee: Employee;\n employeeEntity: EmployeeEntityInterface;\n employeeDocumentEntity: EmployeeDocumentEntityInterface;\n employeeDocuments: EmployeeDocument[];\n @Output() onReadAll: EventEmitter = new EventEmitter();\n isMe: boolean;\n canRemoveSignature: boolean;\n signature: string;\n\n constructor(\n private Entity: Entity,\n private FilePreview: FilePreviewService,\n private ImagePath: ImagePathService,\n private Dialog: Dialog,\n private Employees: EmployeesService,\n private store: Store,\n ) {\n this.employeeDocumentEntity = this.Entity.get('employee_document');\n this.employeeEntity = this.Entity.get('employee');\n this.store.select(getCurrUser).pipe(filter((value) => !!value)).subscribe((value) => {\n value.person.specialisations.forEach((spec) => {\n if (spec.type === 'administrator') this.canRemoveSignature = true;\n })\n })\n }\n\n ngOnInit() {\n\n this.isMe = this.Employees.isMe(this.employee);\n\n this.refresh();\n }\n\n read = (item: any) => {\n const signRequest = () => {\n this.employeeEntity.documentRead({ employeeId: this.employee.id, employeeDocumentId: item.id, data: this.signature }).then(() => {\n this.signature = null;\n this.refresh();\n });\n };\n if (this.signature) {\n signRequest();\n } else {\n this.Dialog.open(CanvasSignDialogComponent, {}, { width: `${getScreenWidthPercent(80)}px`, disableClose: true })\n .then((res: { position: string; data: string }) => {\n console.log('Dialog data');\n console.log(res);\n this.signature = res.data;\n this.read(item);\n });\n }\n };\n\n preview = (item: { link: string, file: PromanFile }) => {\n if (item.file) {\n this.FilePreview.show(item.file);\n } else if (item.link) {\n window.open(item.link, '_blank');\n }\n };\n\n refresh = () => {\n this.employeeDocumentEntity\n .getByEmployee(this.employee.id)\n .then((response) => {\n if (response) {\n this.employeeDocuments = response.documents;\n\n response.reads.forEach((read) => {\n\n this.employeeDocuments.forEach((item) => {\n\n if (item.id === read.documentId && !item.signature) {\n item.isRead = moment(read.date).format('YYYY-MM-DD HH:mm');\n item.signature = read.signature;\n item.readId = read.id;\n }\n\n });\n });\n\n if (response.reads.length >= response.documents.length) {\n this.onReadAll.emit(true);\n }\n\n }\n });\n };\n\n removeSignature = (document: EmployeeDocument) => {\n this.Entity.get('employee_document_read').remove({ id: document.readId }).then(() => {\n document.read = null;\n document.readId = null;\n document.signature = null;\n this.refresh();\n });\n };\n\n}\n","import { Inject, Injectable, Injector } from '@angular/core';\nimport { Entity, EntityConfigInterface, EntityInterface } from '@proman/services/entity.service';\nimport { QueryExpressionService } from '@proman/services/query-expression.service';\nimport { statuses } from '@proman/resources/event';\nimport { resourcesConfig } from '@proman/resources';\nimport { Employee, Person } from '@proman/interfaces/entity-interfaces';\nimport { Store } from '@ngrx/store';\nimport { EmployeeEntityInterface } from '@proman/resources/employee';\nimport { getCurrUser } from '@proman/store/curr-user';\nimport { CurrUser } from '@proman/interfaces/object-interfaces';\nimport { isArray, safeMap } from '@proman/utils';\n\nexport interface TabelSortOption {\n id: string;\n name: string;\n field: string;\n}\n\n@Injectable()\nexport class EmployeesService {\n employeeEntity: EmployeeEntityInterface;\n employeeBookingEntity: EntityInterface;\n currUser: CurrUser;\n\n constructor(\n @Inject(Entity) private Entity: Entity,\n\n private Injector: Injector,\n private QueryExpression: QueryExpressionService,\n private store: Store,\n ) {\n this.store.select(getCurrUser)\n .subscribe((value) => this.currUser = value);\n const entityConfig = resourcesConfig.employee.params.entityConfig;\n const QueryBuilder = {\n managers: () => ({\n 'specialisations.type': 'manager',\n 'join': ['specialisations']\n }),\n specialisations: (specialisations: any) => ({\n 'specialisations.type': this.QueryExpression.orStrict(isArray(specialisations) ? specialisations : [specialisations]),\n 'join': ['specialisations']\n }),\n roles: (roles: any) => ({\n 'specialisations.role.type': this.QueryExpression.orStrict(isArray(roles) ? roles : [roles]),\n 'join': ['specialisations', 'specialisations.role']\n }),\n aggregate: () => ({\n join: ['specialisations', 'specialisations.role', 'photo', 'cards', 'files', 'orderConsumers', 'role', 'mainSpecialization']\n })\n };\n\n this.employeeEntity = Entity.get(Object.assign(entityConfig, { QueryBuilder }) as EntityConfigInterface) as EmployeeEntityInterface;\n this.employeeBookingEntity = this.Entity.get('employee_booking');\n }\n\n getParameters = (item: any) => {\n let ids: number[];\n\n if (Array.isArray(item)) {\n ids = item.map((employee) => employee.id);\n\n } else {\n ids = [item.id];\n\n }\n\n return this.employeeBookingEntity\n .search({\n 'employee.id': this.QueryExpression.in(ids),\n 'status': this.QueryExpression.notIn([statuses.FINISHED]),\n 'count': true\n })\n .then((response: any) => {\n return response.count ? [\n {\n key: 'replanEmployeeTasks',\n name: 'replan_employee_tasks',\n type: 'checkbox',\n config: { }\n }\n ] : [];\n\n });\n };\n\n getManagers = (customParams?: unknown) => {\n const currUser = this.currUser;\n\n let params: { [key: string]: unknown } = { join: [] };\n\n if (customParams) {\n params = Object.assign(params, customParams);\n\n } else {\n if (currUser.type === 'agent') params['agents.id'] = currUser.person.id;\n\n }\n\n return this.employeeEntity.QB.managers().search(params);\n };\n\n is = (employee: Employee|Person, type: string): Promise => {\n let promise;\n\n if (!employee) return Promise.resolve(false);\n\n if (!employee.specialisations) {\n promise = this.employeeEntity.get({\n id: employee.id,\n join: ['specialisations', 'specialisations.role']\n }).then(\n (response: any) => employee.specialisations = response.specialisations,\n (): any => employee.specialisations = []\n );\n } else {\n\n promise = new Promise((resolve) => resolve(null));\n }\n\n return promise.then(() => {\n for (const spec of employee.specialisations) {\n if (spec.type === type || spec.role?.type === type) {\n return true;\n }\n }\n\n return false;\n });\n };\n\n isEmployeesDirector = (employee: Employee, director: Employee|Person): boolean => {\n if (!employee) return false;\n if (!director.specialisations) return false;\n if (!employee.specialisations) return false;\n\n const employeeDeps: string[] = safeMap(employee.specialisations.map((spec) => spec.role), 'name');\n const directorDeps: string[] = director.specialisations\n .filter((spec) => spec.type === 'director')\n .map((spec) => spec.role.name);\n\n const result = directorDeps.some((dir) => employeeDeps.some((dep) => dir === dep));\n\n return result;\n };\n\n isMe = (employee: Employee) => {\n return employee?.id === this.currUser.person.id;\n };\n\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogRef } from '@angular/material/legacy-dialog';\nimport { Store } from '@ngrx/store';\nimport { SelectOption } from '@proman/interfaces/object-interfaces';\nimport { FilterService } from '@proman/services/filter.service';\n\n@Component({\n selector: 'pm-canvas-sign-dialog',\n template: `\n \n \n `\n})\n\nexport class CanvasSignDialogComponent {\n position: string = 'bottom-right';\n positionOptions: SelectOption[];\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: any,\n private store: Store,\n public dialogRef: MatLegacyDialogRef,\n private Filter: FilterService,\n ) {\n this.positionOptions = [\n { id: 'top-left', name: this.Filter.translate('top_left') },\n { id: 'top-right', name: this.Filter.translate('top_right') },\n { id: 'bottom-left', name: this.Filter.translate('bottom_left') },\n { id: 'bottom-right', name: this.Filter.translate('bottom_right') },\n ];\n }\n\n handleCanvasSave(data: string) {\n this.dialogRef.close({\n position: this.position,\n data: data\n })\n }\n\n setPosition(position: string) {\n this.position = position;\n }\n\n}\n","import {\n Component,\n Input,\n OnInit,\n ChangeDetectorRef,\n ChangeDetectionStrategy,\n Output,\n EventEmitter\n} from '@angular/core';\nimport { FilterService } from '@proman/services/filter.service';\nimport { Entity, EntityNameType } from '@proman/services/entity.service';\nimport { isDefined, roundNumber } from '@proman/utils';\nimport { ActivatedRoute } from '@angular/router';\nimport { EntityLogObject, TableConfig } from '@proman/interfaces/object-interfaces';\n\n@Component({\n selector: 'pm-entity-activity-log',\n template: `\n \n \n \n {{ 'user' | translate }} \n {{ 'date' | translate }} \n {{ 'changes' | translate }} \n\n \n \n \n @for (row of data?.history; track $index) {\n \n {{ row.person.firstName }} {{ row.person.lastName }} \n {{ row.datetime | proDateTime }} \n \n \n
\n \n @if (entityName === 'template') {\n \n }\n \n }\n \n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [`\n /*.DiffContainer {*/\n /*text-overflow: ellipsis;*/\n /*overflow: hidden;*/\n /*word-break: break-all;*/\n /*max-height: 38px;*/\n /*}*/\n `]\n})\n\nexport class EntityActivityLogComponent implements OnInit {\n @Input() entityName: EntityNameType;\n @Input() entityId: number;\n @Output() onLoad: EventEmitter = new EventEmitter();\n\n tableConfig: TableConfig;\n\n data: EntityLogObject;\n\n constructor(\n private cd: ChangeDetectorRef,\n private Entity: Entity,\n private Filter: FilterService,\n private route: ActivatedRoute,\n ) {\n this.entityName = this.route.snapshot.data['entityName'];\n this.entityId = this.route.snapshot.data['entityId'];\n }\n\n ngOnInit() {\n\n this.Entity\n .get(this.entityName)\n .log({ entityId: this.entityId })\n .then((response) => {\n this.prepareData(response);\n this.cd.detectChanges();\n });\n\n }\n\n prepareData(response: EntityLogObject) {\n response.history.forEach((item: any) => {\n\n const setDiffData = (item: any) => {\n item.diffData = '';\n\n if (item.diff && Object.keys(item.diff).length) {\n for (const key in item.diff) {\n const value = item.diff[key];\n let customValue = null;\n\n if (value && value.name) customValue = value.name;\n if (value && isDefined(value.amount) && value.currency) customValue = this.Filter.price(value);\n if (value && typeof value === 'string' && value.endsWith('Z')) customValue = this.Filter.dateTime(value);\n if (value && typeof value === 'number') customValue = roundNumber(value);\n if (value && typeof value === 'object') customValue = JSON.stringify(value).slice(1, -1);\n\n item.diffData += `${this.Filter.translate(key)}: ${customValue ?? value} `;\n }\n }\n };\n\n setDiffData(item);\n });\n\n response.history = response.history.filter((item: any) => !item.diff.metadata);\n\n this.data = response;\n }\n\n loadFromHistory = (value: any) => {\n this.onLoad.emit(value.diff);\n }\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogRef } from '@angular/material/legacy-dialog';\nimport { Entity } from '@proman/services/entity.service';\nimport { MaterialQuant } from '@proman/interfaces/entity-interfaces';\nimport { FilterService } from '@proman/services/filter.service';\n\n@Component({\n selector: 'pm-material-quant-search-dialog',\n template: `\n \n \n
\n\n
\n\n
\n \n {{ item.name }} \n \n \n \n\n
\n \n `\n})\n\nexport class MaterialQuantSearchDialogComponent {\n query: string = '';\n quants: MaterialQuant[] = [];\n materialId: number;\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: {\n materialId?: number;\n params: { [key: string]: unknown };\n },\n private Entity: Entity,\n private Filter: FilterService,\n private dialogRef: MatLegacyDialogRef,\n ) {\n this.materialId = data.materialId;\n }\n\n handleSearch(query: string) {\n if (query) {\n this.Entity.get('material_quant')\n .search(Object.assign({\n 'barcode.value': query,\n 'material.id': this.materialId || [],\n 'join': ['material', 'material.materialFormats', 'quantFormats', 'barcode']\n }, this.data.params || {}))\n .then((response: MaterialQuant[]) => {\n response.forEach((quant) => quant.name = `${quant.material.name} - ${this.Filter.quantName(quant)} - ${quant.barcode.value}`);\n\n this.quants = response;\n });\n\n } else {\n this.quants = [];\n\n }\n\n }\n\n select(quant: MaterialQuant) {\n this.dialogRef.close(quant);\n }\n\n}\n","\nimport { Component, Input, OnInit } from '@angular/core';\nimport { Entity } from '@proman/services/entity.service';\nimport { FilterService } from '@proman/services/filter.service';\nimport { MaterialQuant, Order, Production } from '@proman/interfaces/entity-interfaces';\nimport { MaterialQuantEntityInterface } from '@proman/resources/material_quant';\nimport { MaterialEntityInterface } from '@proman/resources/material';\nimport { MaterialQuantSearchDialogComponent } from '../../materials/components/material-quant-search-dialog.component';\nimport { Dialog } from '@frontend/shared/services/dialog.service';\nimport { QueryExpressionService } from '@proman/services/query-expression.service';\nimport { ACL } from '@proman/services/acl.service';\n\n@Component({\n selector: 'pm-credit-materials',\n template: `\n \n
\n
\n
\n
{{ material.name }} \n
\n
\n
\n {{ material.error | translate }}\n
\n
\n
\n
\n
\n {{ 'accounted_materials' | translate }} \n \n \n {{ quant.quantity }} {{ quant.material.materialType.unit }} {{ Filter.quantFormat(quant) }}
\n \n \n
\n `\n})\n\nexport class CreditMaterialsComponent implements OnInit {\n @Input() order: Order;\n @Input() production: Production;\n\n accountedMaterials: any;\n isAddMaterial: any;\n isAddMaterialButton: boolean;\n materials: any = [];\n materialQuantOptions: Promise;\n searchEntity: any;\n\n materialEntity: MaterialEntityInterface;\n materialQuantEntity: MaterialQuantEntityInterface;\n isCreditPending: boolean = false;\n\n constructor(\n Entity: Entity,\n private QueryExpression: QueryExpressionService,\n public Filter: FilterService,\n private Dialog: Dialog,\n public ACL: ACL,\n ) {\n this.materialEntity = Entity.get('material') as MaterialEntityInterface;\n this.materialQuantEntity = Entity.get('material_quant') as MaterialQuantEntityInterface;\n this.isAddMaterialButton = this.ACL.checkOne(['material.edit', 'material.update_status']);\n }\n\n ngOnInit() {\n this.getCreditedMaterials();\n }\n\n addMaterial(value: any) {\n this.searchEntity = value;\n\n if (value) {\n this.setUpMaterial(value);\n this.materials.unshift(value);\n this.searchEntity = null;\n\n setTimeout(() => this.isAddMaterial = false);\n }\n };\n\n setUpMaterial(material: any) {\n\n if (material.materialFormats.length) {\n material.isFormated = true;\n\n }\n\n return material;\n };\n\n searchMaterial = (value: string) => {\n return this.materialEntity\n .search({\n search: { name: value, alias: value },\n join: ['materialFormats', 'materialType'],\n limit: 20\n });\n };\n\n searchSource(value: string, index: number) {\n let request = {\n 'material.id': this.materials[index].id,\n 'join': ['quantFormats'],\n 'type': this.materialQuantEntity.TYPE_STOCK,\n 'search': {\n 'quantity': value,\n 'name': value,\n 'quantFormats.value': value\n }\n };\n\n this.materialQuantOptions = this.materialQuantEntity\n .search(request)\n .then((quants: MaterialQuant[]) => {\n return quants.map((quant) => {\n quant.name = this.Filter.quantName(quant, this.materials[0]);\n\n return quant;\n });\n\n });\n }\n\n credit() {\n this.isCreditPending = true;\n\n let requests = this.materials\n .filter((material: any) => {\n return material.quantity && !material.credited;\n }).map((material: any) => {\n return this.materialQuantEntity.moveToProduction({\n order: this.order?.id,\n production: this.production?.id,\n material: material.id,\n quantity: material.quantity,\n source: material.quant?.id\n }).then(() => {\n material.credited = true;\n material.error = null;\n })\n .catch((response: any) => {\n material.quantity = null;\n material.error = response.data && response.data.errors && response.data.errors[0].message || 'error';\n return Promise.reject(null)\n });\n });\n\n Promise.all(requests)\n .then(() => {\n this.materials = [];\n this.getCreditedMaterials();\n this.isAddMaterialButton = true;\n this.materialQuantOptions = undefined;\n this.isCreditPending = false;\n });\n\n };\n\n set(item: any, property: string, value: any) {\n item[property] = value;\n };\n\n getCreditedMaterials() {\n\n if (this.order || this.production) {\n const request: any = {\n type: this.materialQuantEntity.TYPE_PRODUCTION,\n join: ['material', 'material.materialType', 'quantFormats']\n };\n if (this.order) request['order.id'] = this.order.id;\n if (this.production) request['production.id'] = this.production.id;\n\n this.materialQuantEntity\n .search(request)\n .then((data: MaterialQuant[]) => this.accountedMaterials = data);\n\n } else {\n this.accountedMaterials = [];\n }\n\n }\n\n searchQuant() {\n this.Dialog\n .open(MaterialQuantSearchDialogComponent, {\n params: { stock: [this.materialQuantEntity.TYPE_STOCK, this.materialQuantEntity.TYPE_PRODUCTION].join('|') }\n }, { width: '600px' })\n .then((result: MaterialQuant) => {\n this.set(result.material, 'quant', result);\n this.set(result.material, 'quantity', result.quantity);\n\n this.addMaterial(result.material);\n this.isAddMaterial = false;\n });\n }\n\n cancel() {\n this.isAddMaterial = false;\n this.isAddMaterialButton = true;\n this.materials = [];\n }\n\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { Entity, EntityNameType } from '@proman/services/entity.service';\nimport { deepCopy, prepareRequest, pushArrays, utcFormat } from '@proman/utils';\nimport { resourcesConfig } from '@proman/resources';\nimport { FilterService } from '@proman/services/filter.service';\nimport moment from 'moment';\nimport { CurrUser } from '@proman/interfaces/object-interfaces';\nimport { Store } from '@ngrx/store';\nimport { getCurrUser } from '@proman/store/curr-user';\nimport { Tag } from '@proman/interfaces/entity-interfaces';\n\n@Component({\n selector: 'pm-inline-comments-component',\n template: `\n \n \n @if (isAddCommentMode) {\n
\n }\n \n @if (!comments?.length) {\n
\n }\n @for (comment of comments; track $index) {\n
\n
\n \n \n @if (comment.isEdit) {\n
\n
\n } @else {\n
\n
\n
\n
\n @if (comment.author?.id == currUser.person?.id && !isReadOnly) {\n
\n }\n
\n
\n }\n
\n
\n }\n
\n `\n})\n\nexport class InlineCommentsComponent implements OnInit {\n @Input() entityName: EntityNameType;\n @Input() entity: any;\n @Input() label: string;\n @Input() comments: any[];\n @Input() isReadOnly: boolean;\n currUser: CurrUser;\n\n Entity: any;\n newComment: any = {};\n isAddCommentMode: boolean = false;\n types: any;\n additionalTypes: any[];\n\n constructor(\n private EntityService: Entity,\n private Filter: FilterService,\n private store: Store,\n ) {\n this.store.select(getCurrUser)\n .subscribe((value) => this.currUser = value);\n\n this.EntityService.get('article_operation_production_comment_type').search().then((res) => {\n this.additionalTypes = res;\n this.types = pushArrays(this.additionalTypes, resourcesConfig.article_operation_production_comment.params.types\n .map((item: string) => {\n return {\n id: item,\n name: this.Filter.translate(item)\n }\n }));\n\n this.newComment.type = this.types[0];\n });\n }\n\n ngOnInit() {\n if (this.entityName) {\n this.Entity = this.EntityService.get({ name: this.entityName });\n\n }\n\n }\n\n addComment() {\n const tags = deepCopy(this.newComment.tags).map((tag: Tag) => tag.id);\n delete this.newComment.tags;\n const data: any = prepareRequest(this.newComment);\n\n data.date = utcFormat(moment());\n data.event = this.entity.id;\n data.tags = tags;\n\n this.Entity\n .create(data)\n .then((response: any) => {\n this.Entity.get({\n id: response,\n join: ['author', 'tags']\n }).then((response: any) => {\n this.isAddCommentMode = false;\n\n this.comments.unshift(response);\n });\n });\n };\n\n set(property: string, value: any) {\n this.newComment[property] = value;\n };\n\n enableAddMode = () => {\n this.newComment = { text: '', type: this.types[0], tags: [] };\n\n this.isAddCommentMode = true;\n }\n\n toggleImportant(value: boolean) {\n this.newComment.isImportant = value;\n }\n\n editComment(comment: any) {\n comment.isEdit = true;\n }\n\n editCommentValue(comment: any, value: string) {\n comment.text = value;\n\n this.Entity.update(prepareRequest(comment));\n\n comment.isEdit = false;\n }\n\n}\n","import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { ProductStorageInfoDialogComponent } from './product-storage-info-dialog.component';\nimport { Dialog } from '@frontend/shared/services/dialog.service';\nimport { Entity } from '@proman/services/entity.service';\nimport { CurrUser, TableConfig } from '@proman/interfaces/object-interfaces';\nimport { OrderProduct, ProductionOperation } from '@proman/interfaces/entity-interfaces';\nimport { FilterService } from '@proman/services/filter.service';\nimport { Store } from '@ngrx/store';\nimport { getCurrUser } from '@proman/store/curr-user';\nimport { getDecimalPlaces } from '@proman/store/system-options';\n\n@Component({\n selector: 'pm-event-order-products-table',\n template: `\n \n `\n})\n\nexport class EventOrderProductsTableComponent implements OnInit {\n @Input() event: ProductionOperation;\n @Input() timeStamp: number;\n orderProductEntity: any;\n tableConfig: TableConfig;\n currUser: CurrUser;\n decimalProductQuantity: number;\n\n constructor(\n private Dialog: Dialog,\n private Entity: Entity,\n private store: Store,\n private Filter: FilterService,\n ) {\n this.store.select(getCurrUser)\n .subscribe((value) => this.currUser = value);\n\n this.store.select(getDecimalPlaces, 'product_quantity')\n .subscribe((value) => this.decimalProductQuantity = value);\n\n }\n\n showInfo = (orderProduct: any) => this.Dialog.open2(ProductStorageInfoDialogComponent, { product: orderProduct.product });\n\n updateReadyToShipQuantity = (orderProduct: any, quantity: number) => {\n this.orderProductEntity.update({ id: orderProduct.id, readyForShipmentQuantity: quantity });\n };\n\n ngOnInit() {\n this.orderProductEntity = this.Entity.get('order_product');\n if (this.event.order) this.setTableConfig();\n };\n\n setTableConfig = () => {\n this.tableConfig = {\n entity: 'order_product',\n preventFixedHeader: true,\n aclRoot: null,\n hideSettings: true,\n rowButtons: [\n {\n icon: 'question-circle',\n tooltip: 'show_all_orders',\n acl: null,\n callback: this.showInfo\n }\n ],\n fields: [\n {\n name: 'name',\n key: 'product.name',\n filter: null,\n state: {\n name: 'Product',\n key: 'productId',\n id: 'product.id',\n acl: 'product.edit'\n }\n },\n {\n name: 'parameters',\n key: 'product.parameters',\n formatter: 'parameters',\n filter: {\n type: 'search',\n keys: ['product.parameters.parameter.name', 'product.parameters.parameter.alias', 'product.parameters.value'],\n },\n },\n {\n name: 'ordered_quantity',\n key: 'quantity',\n filter: null,\n formatter: 'numeric',\n stats: ['sum']\n },\n {\n name: 'stored_quantity',\n key: 'product.storedQuantity',\n filter: null,\n formatter: 'numeric',\n stats: ['sum']\n },\n {\n name: 'ready_for_shipment_quantity',\n key: 'readyForShipmentQuantity',\n formatter: 'input',\n callback: this.updateReadyToShipQuantity,\n filter: null,\n stats: ['sum']\n }\n ],\n extraParameters: {\n 'join': ['product', 'product.parameters', 'product.parameters.parameter'],\n 'order.id': this.event.order.id\n },\n header: 'order_products',\n headerState: {\n name: 'OrderProducts',\n key: 'orderId',\n id: this.event.order.id.toString(),\n acl: 'order.display'\n },\n transform: (data: OrderProduct[]) => {\n\n if (this.currUser.isCustomer) {\n data = data.filter((item) => !item.parentOrderProduct);\n }\n\n data.forEach((product) => {\n product.quantity = this.Filter.decimal(product.quantity, this.decimalProductQuantity);\n product.readyForShipmentQuantity = this.Filter.decimal(product.readyForShipmentQuantity, this.decimalProductQuantity);\n });\n\n return data;\n }\n };\n };\n\n}\n","import { Component, Input } from '@angular/core';\nimport { Entity } from '@proman/services/entity.service';\nimport { Dialog } from '@frontend/shared/services/dialog.service';\nimport { ArticleSummaryDialogComponent } from './article-summary-dialog.component';\nimport { ACL } from '@proman/services/acl.service';\n\n@Component({\n selector: 'pm-article-summary-btn',\n template: `\n \n`\n})\n\nexport class ArticleSummaryBtnComponent {\n @Input() article: any;\n articleEntity: any;\n\n constructor(private Entity: Entity,\n private Dialog: Dialog,\n public ACL: ACL) {\n this.articleEntity = Entity.get('article');\n }\n\n showDialog() {\n this.Dialog.open2(ArticleSummaryDialogComponent, { item: this.article });\n }\n\n showArticleSummary = () => {\n let article = this.article;\n\n article && article.type && article.photo ? this.showDialog() : this.loadArticleData();\n };\n\n loadArticleData() {\n if(this.article) {\n this.articleEntity\n .get({id: this.article.id, join: ['technology', 'photo']})\n .then((response: any) => {\n this.article = response;\n this.showDialog()\n });\n }\n }\n}\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';\n\nimport { menuEmployee } from '../../settings/menu/employee';\nimport { menuAgent } from '../../settings/menu/agent';\nimport { menuCustomer } from '../../settings/menu/customer';\nimport { menuBookkeepingUser } from '../../settings/menu/bookkeepingUser';\n\nimport { cloneDeep, debounce, EMPTY_VALUE, isArray, isDefined } from '@proman/utils';\nimport { ActivatedRoute } from '@angular/router';\nimport { Employee, Specialisation, SystemOptions } from '@proman/interfaces/entity-interfaces';\nimport { Entity } from '@proman/services/entity.service';\nimport { getSystemOptions, loadSystemOptions } from '@proman/store/system-options';\nimport { Store } from '@ngrx/store';\n\nconst SYSTEM_OPTION_KEYS = {\n employee: 'defaultEmployeeMenuSettings',\n agent: 'defaultAgentMenuSettings',\n customer: 'defaultCustomerMenuSettings',\n};\n\n@Component({\n selector: 'pm-user-menu-tree',\n template: `\n \n @if (!!employee) {\n
\n }\n\n @for (menuItem of menu; track menuItem) {\n
\n \n\n @for (tab of menuItem.tabs; track tab) {\n
\n
\n\n @if (tab.isOverride) {\n
\n }\n
\n }\n\n
\n }\n\n
\n\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n\nexport class UserMenuTreeComponent implements OnInit {\n type: 'employee'|'agent'|'customer'|'bookkeepingUser';\n specialisation: Specialisation;\n agent: Specialisation;\n employee: Employee;\n menu: any;\n data: any;\n startData: any;\n defaultData: any = {};\n\n currentData: any;\n isEntity: boolean;\n\n keys: string[];\n systemOptions: SystemOptions;\n debounceLoadSystemOptions: any;\n\n classEnabled: string = 'ColorGreen';\n classDisabled: string = 'ColorRed';\n inited: boolean;\n\n constructor(\n private cd: ChangeDetectorRef,\n private route: ActivatedRoute,\n private store: Store,\n private Entity: Entity,\n ) {\n this.type = route.snapshot.data['type'];\n this.specialisation = route.parent.snapshot.data['specialisation'];\n this.agent = route.parent.snapshot.data['agent'];\n this.employee = route.parent.snapshot.data['employee'] || (route.parent.snapshot.data['isAccountSettings'] ? route.parent.snapshot.data['user'] : null);\n this.store.select(getSystemOptions)\n .subscribe((value) => this.systemOptions = value);\n }\n\n ngOnInit() {\n this.initData();\n\n this.setData();\n this.setMenuClasses();\n }\n\n initData() {\n if (this.inited) return;\n this.isEntity = !!(this.specialisation || this.agent || this.employee);\n this.type = this.route.snapshot.data['type'];\n this.specialisation = this.route.parent.snapshot.data['specialisation'];\n this.agent = this.route.parent.snapshot.data['agent'];\n this.employee = this.route.parent.snapshot.data['employee'] || (this.route.parent.snapshot.data['isAccountSettings'] ? this.route.parent.snapshot.data['user'] : null);\n\n if (this.specialisation) {\n this.type = 'employee';\n this.currentData = Object.assign(this.specialisation.menuSettings || {});\n\n } else if (this.agent) {\n this.type = 'agent';\n this.currentData = Object.assign(this.agent.menuSettings || {});\n\n } else if (this.employee) {\n this.type = 'employee';\n this.currentData = Object.assign(this.employee.menuSettings || {});\n\n } else {\n this.currentData = {};\n }\n\n if (this.employee.users && this.employee.users[0] && this.employee.users[0].bookkeeping) {\n this.type = 'bookkeepingUser';\n this.currentData = Object.assign(this.employee.menuSettings || {});\n }\n\n\n if (isArray(this.currentData) && isDefined(this.currentData.length) && this.currentData.length === 0) {\n this.currentData = {};\n }\n\n for (const key in this.currentData) {\n if (this.currentData[key] === EMPTY_VALUE) {\n delete this.currentData[key];\n }\n }\n\n this.defaultData = Object.assign({}, this.systemOptions[SYSTEM_OPTION_KEYS[this.type]]);\n\n if (this.employee?.specialisations) {\n this.employee.specialisations.forEach((spec) => {\n Object.assign(this.defaultData, spec.menuSettings);\n });\n }\n\n for (const key in this.defaultData) {\n this.defaultData[key] = this.defaultData[key] === 'true';\n if (this.isEntity) {\n if (isDefined(this.currentData[key]) && (this.currentData[key] !== EMPTY_VALUE && this.currentData[key] !== undefined)) {\n this.currentData[key] = this.currentData[key] === 'true';\n }\n\n }\n\n }\n\n this.loadMenu();\n\n this.debounceLoadSystemOptions = debounce(() => this.store.dispatch(loadSystemOptions()), 3000);\n }\n\n setData() {\n this.startData = Object.assign({}, cloneDeep(this.defaultData));\n this.data = Object.assign({}, cloneDeep(this.startData), this.currentData);\n\n this.cd.markForCheck();\n }\n\n loadMenu() {\n\n switch (this.type) {\n case 'employee':\n this.menu = menuEmployee;\n break;\n\n case 'agent':\n this.menu = menuAgent;\n break;\n\n case 'customer':\n this.menu = menuCustomer;\n break;\n\n case 'bookkeepingUser':\n this.menu = menuBookkeepingUser;\n break;\n }\n\n }\n\n updateView = () => this.cd.markForCheck();\n\n handleTabClick(menuItem: any, tab: any, value: boolean) {\n const menuName = menuItem.name;\n const tabName = tab.name;\n this.currentData[`${menuName}.${tabName}`] = !this.data[`${menuName}.${tabName}`];\n tab.class = value ? this.classEnabled : this.classDisabled;\n\n this.save();\n }\n\n handleMenuClick(menuItem: any) {\n const menuName = menuItem.name;\n this.currentData[menuName] = !this.data[menuName];\n\n this.save();\n }\n\n save() {\n this.setData();\n this.setMenuClasses();\n\n this.saveChanges();\n this.updateView();\n }\n\n setMenuClasses() {\n const isOverride = (key: string) => this.isEntity && isDefined(this.currentData[key]) && (this.currentData[key] !== EMPTY_VALUE );\n const isTruthy = (key: string) => this.data[key] && (this.data[key] !== EMPTY_VALUE || this.data[key] === true);\n this.keys = [];\n\n this.menu.forEach((menuItem: any) => {\n const menuName = menuItem.name;\n\n if (menuItem.tabs) {\n menuItem.tabs.forEach((tab: any) => {\n const tabName = tab.name;\n const key = `${menuName}.${tabName}`;\n const tabClass = isTruthy(key) ? this.classEnabled : this.classDisabled;\n this.keys.push(key);\n tab.class = tabClass;\n tab.isOverride = isOverride(key);\n\n });\n } else {\n menuItem.class = isTruthy(menuName) ? this.classEnabled : this.classDisabled;\n menuItem.isOverride = isOverride(menuName);\n this.keys.push(menuName);\n }\n\n });\n\n this.cd.markForCheck();\n }\n\n revert(menuItem: any, tab?: any) {\n const menuName = menuItem.name;\n const tabName = tab && tab.name;\n const key = tab ? `${menuName}.${tabName}` : menuName;\n\n this.currentData[key] = EMPTY_VALUE;\n\n this.saveChanges();\n\n delete this.currentData[key];\n\n this.setData();\n this.setMenuClasses();\n this.ngOnInit();\n\n }\n\n saveChanges = () => {\n if (!this.isEntity) {\n const data = {};\n\n for (const key of this.keys) {\n data[key] = false;\n }\n\n Object.assign(data, this.data);\n\n this.Entity.get('system_options')\n .update({ id: 1, [SYSTEM_OPTION_KEYS[this.type]]: data });\n\n } else {\n if (this.specialisation) {\n this.Entity.get('specialisation')\n .update({ id: this.specialisation.id, menuSettings: this.currentData })\n .then(() => { this.specialisation.menuSettings = this.currentData });\n\n }\n\n if (this.agent) {\n this.Entity.get('agent')\n .update({ id: this.agent.id, menuSettings: this.currentData })\n .then(() => { this.agent.menuSettings = this.currentData });\n\n }\n\n if (this.employee) {\n this.Entity.get('employee')\n .update({ id: this.employee.id, menuSettings: this.currentData })\n .then(() => { this.employee.menuSettings = this.currentData });\n\n }\n\n }\n\n this.debounceLoadSystemOptions();\n\n }\n\n updateMenuLimitations(menuLimitations: boolean) {\n this.Entity.get('employee')\n .update({ id: this.employee.id, menuLimitations })\n .then(() => this.employee.menuLimitations = menuLimitations).then(() => window.location.reload());\n }\n\n}\n","import { Injectable } from '@angular/core'\nimport { resourcesConfig } from '@proman/resources';\nimport { ACL } from '@proman/services/acl.service';\nimport { Entity } from '@proman/services/entity.service';\nimport { QueryExpressionService } from '@proman/services/query-expression.service';\nimport { FilterService } from '@proman/services/filter.service';\nimport moment from 'moment';\nimport { CurrUser, TableField } from '@proman/interfaces/object-interfaces';\nimport {\n Operation,\n Order,\n Production,\n ProductionOperation,\n ResourceBooking\n} from '@proman/interfaces/entity-interfaces';\nimport { ProductionOperationEntityInterface } from '@proman/resources/production_operation';\nimport { safeMap } from '@proman/utils';\nimport { PromanStateService } from '@frontend/shared/services/proman-state.service';\nimport { ProductionEntityInterface } from '@proman/resources/production';\nimport { Store } from '@ngrx/store';\nimport { getCurrUser } from '@proman/store/curr-user';\nimport { ParametersService } from '@proman/parameters/services/parameters.service';\n\n@Injectable()\nexport class ProductionOperationService {\n operationEntity: ProductionOperationEntityInterface;\n currUser: CurrUser;\n productionEntity: ProductionEntityInterface;\n\n constructor(\n private Filter: FilterService,\n private Entity: Entity,\n private Parameters: ParametersService,\n private PromanState: PromanStateService,\n private ACL: ACL,\n private QueryExpression: QueryExpressionService,\n private store: Store,\n ) {\n this.productionEntity = this.Entity.get('production');\n this.store.select(getCurrUser)\n .subscribe((value) => this.currUser = value);\n this.setEntity();\n }\n\n setEntity() {\n this.operationEntity = this.Entity.get('production_operation') as ProductionOperationEntityInterface;\n }\n\n getEntity = (): ProductionOperationEntityInterface => this.operationEntity;\n\n private static getNameValue(op: ProductionOperation) {\n let groupName;\n let name;\n let articleOperation = op.articleOperation;\n let segmentParameter = op.segmentParameter;\n\n if (articleOperation && articleOperation.operation.name) {\n name = articleOperation.operation.name;\n\n }\n\n if (segmentParameter) {\n groupName = JSON.parse(segmentParameter.value).name;\n\n if (groupName) {\n name += ' (' + groupName + ')';\n }\n }\n\n return name;\n }\n\n private concatOrdersProperty(prop: keyof Order) {\n\n return (event: ProductionOperation) => {\n\n if (event.production) {\n return event.production.order && event.production.order[prop] || '';\n\n } else if (event.order) {\n return event.order[prop];\n\n }\n\n };\n }\n\n getAggregated = (id: number, belongsToOrder?: boolean) => {\n return Promise.all([\n this.operationEntity\n .get({\n 'id': id,\n 'join': [\n 'articleOperation',\n 'articleOperation.operation',\n 'articleOperation.operation.parameters',\n 'articleOperation.operation.visibleMaterialCategories',\n 'resourceBookings',\n 'resourceBookings.workplace',\n 'resourceBookings.workplace.workgroup',\n 'resourceBookings.employee.photo',\n 'resourceBookings.childBookings',\n 'resourceBookings.childBookings.employee',\n 'resourceBookings.childBookings.employee.photo',\n 'supervisor.photo',\n 'segmentParameter',\n 'segmentParameter.articleProductionParameter',\n 'comments',\n 'comments.tags',\n 'order.files',\n 'resourceBookings.subcontractor.logo'\n ],\n 'resourceBookings.parentBooking.id': this.QueryExpression.isNull(),\n 'partialJoin': {\n 'resourceBookings.subcontractor': ['id', 'name'],\n 'productionOperationParameters': ['id', 'value'],\n 'productionOperationParameters.parameter': ['id', 'name', 'type', 'value'],\n 'resourceBookings.employee': ['id', 'name'],\n 'comments.author': ['id', 'name'],\n 'supervisor': ['id', 'name'],\n 'order': ['id', 'name', 'number', 'customerNumber', 'managerComments', 'packagingRequirements'],\n 'order.manager': ['name'],\n 'order.customer': ['name'],\n 'order.shipments': ['id', 'date'],\n 'order.articles': ['id', 'name', 'altName'],\n 'tags': ['id', 'name', 'color'],\n 'order.tags': ['id', 'name', 'color'],\n 'order.type': ['id', 'name'],\n },\n 'sort': { 'order.shipments': { date : 'asc' }, 'resourceBookings': { plannedStat: 'asc' } }\n }),\n !belongsToOrder ? this.Entity.get('production')\n .get({\n 'operations.id': id,\n 'join': [\n 'order.shipments',\n 'order.files',\n 'article.files',\n 'order.tags',\n 'tags',\n 'type',\n 'subtype',\n ],\n 'partialJoin': {\n 'order': ['id', 'name'],\n 'order.type': ['id', 'name'],\n 'order.customer': ['name'],\n 'article': ['id', 'name', 'altName'],\n 'order.manager': ['id', 'name'],\n }\n })\n .catch((response: any): any => {\n return null;\n }) : null,\n ])\n .then((response: [ProductionOperation, Production]) => {\n if (!response[1]) response[1] = null as Production;\n response[0].resourceBookings.sort((a, b) => a.plannedStart < b.plannedStart ? -1 : 1);\n response[0].production = response[1];\n (response[0] as any).orderType = response[1]?.order.type?.name;\n return response[0] as ProductionOperation;\n })\n .catch(() => {\n if (!belongsToOrder) this.PromanState.to('Events');\n });\n };\n\n isPersonalEvent(event: any, employeeId: number) {\n let result: boolean = false;\n\n if (event.resourceBookings) {\n\n event.resourceBookings.forEach((booking: any) => {\n\n if (booking.employee && employeeId === booking.employee.id) {\n result = true;\n\n }\n\n if (booking.workplace && booking.childBookings) {\n\n booking.childBookings.forEach((childBooking: any) => {\n\n if (childBooking.employee && employeeId === childBooking.employee.id) {\n result = true;\n\n }\n\n });\n\n }\n\n });\n\n }\n\n return result;\n }\n\n isSupervisedEvent = (event: ProductionOperation, employeeId: number) => {\n return event.supervisor?.id === employeeId;\n };\n\n showOptions = () => {\n return this.canUpdateEvent || this.ACL.check('event.update_status');\n };\n\n canUpdateWorkplace = () => {\n return this.canUpdateEvent;\n };\n\n canUpdateEmployees = () => {\n return this.ACL.check('event.update_status');\n };\n\n canUpdateTime = () => {\n return this.ACL.check('event.update_status');\n };\n\n canUpdateSupervisor = () => {\n return this.ACL.check('event.update_status');\n };\n\n canUpdateEvent = () => {\n return this.ACL.check('event.edit');\n };\n\n canUpdateParameters = (event: any, employeeId: number) => {\n return (this.isPersonalEvent(event, employeeId) ||\n this.canUpdateEvent) && event.status === this.operationEntity.STARTED;\n };\n\n showItemQuantities = (event: any) => {\n return event.articleOperation.productionStoreAccess &&\n (event.status === this.operationEntity.STARTED ||\n event.status === this.operationEntity.FINISHED);\n };\n\n canUpdateItemQuantities = (event: any) => {\n return event && event.articleOperation && event.articleOperation.operation.productionStoreAccess &&\n (event.status === this.operationEntity.STARTED || event.status === this.operationEntity.FINISHED);\n };\n\n canStart = (event: ResourceBooking, production: Production ) => {\n return (production ? production.status === this.productionEntity.STARTED : true) && // if not production operation\n event.status === this.operationEntity.UNSTARTED ||\n\n event.status === this.operationEntity.WAITING_FOR_PREVIOUS ||\n\n (event.type === 'workplace' && event.status === this.operationEntity.STARTED &&\n (event.parallelity !== undefined) && event.parallelity) ||\n\n (event.type === 'workplace' && event.status === this.operationEntity.FINISHED &&\n (event.parallelity !== undefined) && event.parallelity && production?.status !== this.productionEntity.COMPLETE);\n };\n\n canEnd = (booking: any, operation?: any) => {\n let parametersDone = true;\n let productionOperationParameters = operation && operation._parameters;\n\n if (productionOperationParameters && productionOperationParameters.length &&\n productionOperationParameters.filter((item: any) => item.parameter.required).length) {\n parametersDone = !!productionOperationParameters\n .filter((item: any) => item.parameter.required)\n .filter((item: any) => !this.Parameters.empty(item))\n .length;\n\n }\n\n return ['started'].includes(booking.status) && parametersDone;\n };\n\n canCancel = (event: any) => {\n return event.status === this.operationEntity.STARTED;\n };\n\n canComment = () => {\n return true;\n };\n\n showComments = (event: any) => {\n return (\n event.status === this.operationEntity.STARTED ||\n event.status === this.operationEntity.FINISHED ||\n event.status === this.operationEntity.CANCELED ||\n event.status === this.operationEntity.UNCONFIRMED\n );\n };\n\n canUpdateFiles = (event: any) => {\n return event.status === this.operationEntity.STARTED;\n };\n\n canConfirm = (event: ProductionOperation, employeeId: number) => {\n return (event.status === this.operationEntity.UNCONFIRMED || event.status === this.operationEntity.STARTED) &&\n (this.isSupervisedEvent(event, employeeId) || this.canUpdateEvent());\n };\n\n canRevertStatus = (event: any) => event.status !== this.operationEntity.UNSTARTED;\n\n getWorkplaceOperation = (workplaceId: any) => {\n return this.operationEntity\n .search({\n 'resourceBookings.plannedStart': this.QueryExpression.to(moment()),\n 'resourceBookings.plannedEnd': this.QueryExpression.from(moment()),\n 'resourceBookings.workplace.id': workplaceId,\n 'select': ['name'],\n 'partialJoin': {\n 'resourceBookings': ['plannedStart', 'plannedEnd', 'status'],\n 'resourceBookings.childBookings': ['plannedStart', 'plannedEnd'],\n 'resourceBookings.childBookings.employee': ['name'],\n 'segmentParameter': ['value'],\n 'production': ['name', 'quantity'],\n 'order': ['name']\n },\n 'join': ['resourceBookings.childBookings.employee.photo']\n });\n };\n\n getNextWorkplaceOperation = (workplaceId: number) => {\n return this.operationEntity\n .search({\n 'resourceBookings.plannedStart': this.QueryExpression.from(moment()),\n 'resourceBookings.workplace.id': workplaceId,\n 'select': ['name'],\n 'partialJoin': {\n 'resourceBookings': ['id', 'plannedStart', 'plannedEnd', 'status'],\n 'resourceBookings.childBookings': ['id', 'plannedStart', 'plannedEnd'],\n 'resourceBookings.childBookings.employee': ['id', 'name'],\n 'segmentParameter': ['id', 'value'],\n 'production': ['id', 'name'],\n 'order': ['id', 'name']\n },\n 'join': ['resourceBookings.childBookings.employee.photo'],\n 'paginate': false,\n 'limit': 1,\n 'sort': { 'resourceBookings.plannedStart': 'asc' }\n });\n };\n\n getExtraParameters = resourcesConfig['production_operation'].params.extraParameters;\n\n getStatusField = (): TableField => {\n const strict = this.QueryExpression.orStrict;\n\n return {\n name: 'status',\n key: 'status',\n translate: true,\n filter: {\n type: 'dropdown',\n options: [\n {\n name: this.Filter.translate('booked'),\n id: strict([this.operationEntity.BOOKED])\n },\n {\n name: this.Filter.translate('unstarted'),\n id: strict([this.operationEntity.UNSTARTED])\n },\n {\n name: this.Filter.translate('started'),\n id: strict([this.operationEntity.STARTED])\n },\n {\n name: this.Filter.translate('finished'),\n id: strict([this.operationEntity.FINISHED])\n },\n {\n name: this.Filter.translate('canceled'),\n id: strict([this.operationEntity.CANCELED])\n },\n {\n name: this.Filter.translate('unconfirmed'),\n id: strict([this.operationEntity.UNCONFIRMED])\n }\n ],\n key: 'id'\n }\n };\n };\n\n getFields = (operations: Operation[]): TableField[] => {\n return [\n {\n name: 'planned_start',\n key: 'plannedStart',\n formatter: 'dateTime',\n formatterConfig: '_datetime_js'\n },\n {\n name: 'planned_end',\n key: 'plannedEnd',\n formatter: 'dateTime',\n formatterConfig: '_datetime_js'\n },\n {\n name: 'operation',\n key: 'articleOperation.operation.id',\n getValue: ProductionOperationService.getNameValue,\n filter: {\n type: 'dropdown_multi',\n options: operations,\n showSearch: true\n },\n extraPartialJoins: {\n 'articleOperation': ['id'],\n 'articleOperation.operation': ['name'],\n }\n },\n {\n name: 'production',\n key: 'production.id',\n getValue: (row: ProductionOperation) =>\n (row.production ? row.production.id + ' - ' + row.production.name : ''),\n state: {\n name: 'Production',\n key: 'productionId',\n id: 'production.id',\n acl: 'production.edit',\n },\n extraPartialJoins: {\n 'production': ['id', 'name'],\n }\n },\n {\n name: 'article',\n key: 'articleOperation.article.name',\n extraPartialJoins: {\n 'articleOperation': ['id'],\n 'articleOperation.article': ['id', 'name'],\n }\n },\n {\n name: 'article_categories',\n key: 'articleOperation.article.categories.name',\n getValue: (event: ProductionOperation) => event.articleOperation?.article && safeMap(event.articleOperation?.article?.categories, 'name').join(', ') || '',\n extraPartialJoins: {\n 'articleOperation': ['id'],\n 'articleOperation.article.categories': ['id', 'name'],\n }\n },\n {\n name: 'order_number',\n key: 'production.order.number',\n getValue: this.concatOrdersProperty('number'),\n extraPartialJoins: {\n 'production': ['name', 'quantity', 'id'],\n 'production.order': ['number'],\n }\n },\n {\n name: 'order_name',\n key: 'production.order.name',\n getValue: this.concatOrdersProperty('name'),\n extraPartialJoins: {\n 'production.order': [ 'name'],\n }\n },\n {\n name: 'desired_dispatch_date',\n key: 'production.order.desiredDispatchDate',\n getValue: this.concatOrdersProperty('desiredDispatchDate'),\n formatter: 'dateTime',\n extraPartialJoins: {\n 'production.order': ['desiredDispatchDate'],\n }\n },\n {\n name: 'customer',\n key: 'production.order.customer.name',\n getValue: (row: ProductionOperation) => row.order?.customer?.name || row.production?.order?.customer?.name || '',\n extraPartialJoins: {\n 'production.order.customer': ['name'],\n }\n },\n {\n name: 'customer_number',\n key: 'production.order.customerNumber',\n getValue: this.concatOrdersProperty('customerNumber'),\n extraPartialJoins: {\n 'production.order': ['customerNumber'],\n }\n },\n {\n name: 'production',\n key: 'production.name',\n extraPartialJoins: {\n 'production': ['name'],\n }\n },\n {\n name: 'quantity',\n key: 'production.quantity'\n },\n this.getStatusField()\n ];\n };\n\n async endMultiple(operations: number[]) {\n await this.operationEntity.endMultiple({ ids: operations });\n }\n\n async startMultiple(operations: number[]) {\n await this.operationEntity.startMultiple({ ids: operations });\n }\n\n}\n","import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core';\nimport { contains } from '@proman/utils';\nimport { ProductionOperation, PromanFile } from '@proman/interfaces/entity-interfaces';\nimport { OverlayService } from '@frontend/shared/services/overlay.service';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from '@proman/rxjs-common';\n\n@Component({\n selector: 'pm-calendar-overlay-files',\n template: `\n \n\n `\n})\n\nexport class CalendarOverlayFilesComponent implements OnInit, OnChanges, OnDestroy {\n @Input() event: ProductionOperation;\n files: PromanFile[] = [];\n destroy$: Subject = new Subject();\n\n constructor(\n private Overlay: OverlayService,\n ) {\n this.Overlay.data\n .pipe(takeUntil(this.destroy$))\n .subscribe((value) => {\n if (this.event && value?.data) {\n this.handleFiles();\n }\n });\n }\n\n ngOnInit() {\n this.handleFiles();\n }\n\n ngOnChanges() {\n this.handleFiles();\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n }\n\n handleFiles() {\n const event = this.event;\n\n if (!(event && event.order && event.order.files)) return;\n\n if (event.production) {\n this.files = event.order.files.filter((file) => !contains(event.production.hiddenOrderFiles, file.id));\n } else if (event.order) {\n this.files = event.order.files;\n }\n }\n\n}\n","import { distinctUntilChanged, takeUntil, tap } from '@proman/rxjs-common';\nimport { Component, ViewChild, ElementRef, Renderer2, ChangeDetectorRef, ChangeDetectionStrategy, OnInit, OnDestroy, OnChanges,\n} from '@angular/core';\nimport { Observable, Subject, Subscription } from 'rxjs';\nimport { OverlayService } from '../services/overlay.service';\nimport { SALE_OPPORTUNITY_OVERLAY } from '../overlays/sale_opportunity.overlay';\nimport { SALE_EVENT_OVERLAY } from '../overlays/sale_event.overlay';\nimport { EVENT_OVERLAY } from '../overlays/event.overlay';\nimport { ACL } from '@proman/services/acl.service';\nimport { ProductionOperationService } from '../../products/services/production-operation.service';\n\n@Component({\n selector: 'pm-overlay',\n template: `\n \n
\n \n
\n
\n
\n
\n ` + SALE_OPPORTUNITY_OVERLAY + `\n
\n
\n ` + SALE_EVENT_OVERLAY + `\n
\n
\n
\n {{ data.data | translate }}\n \n : {{ (data.status ? 'on' : 'off') | translate }}\n \n
\n\n
\n \n \n {{ 'changed_time' | translate }} \n \n \n \n {{ 'workshift' | translate }}: {{ data.data.workshift.name }} \n \n\n \n {{ 'reason' | translate }}: {{ data.data.reason.name }} \n \n \n \n\n \n {{ data.data.text }} \n \n\n
\n\n
\n \n
\n\n
\n \n {{ data.data }}\n \n
\n\n
\n
\n {{ 'operation' | translate }}: {{ data.data.fullName }}\n \n
\n
\n {{ 'planned_start' | translate }}: {{ data.data.plannedStart | proDateTime }}\n \n
\n
\n {{ 'started' | translate }}: {{ data.data.realStart | proDateTime }}\n \n
\n
\n {{ 'planned_end' | translate }}: {{ data.data.plannedEnd | proDateTime }}\n \n
\n
\n {{ 'ended' | translate }}: {{ data.data.realEnd | proDateTime }}\n
\n
\n\n
\n
\n\n
\n {{ item.key }} : {{ item.value }}\n
\n
\n
\n\n
\n
\n ` + EVENT_OVERLAY + `\n
\n
\n\n\n
\n
\n
\n
\n {{ item.key | translate }}: {{ item.value }}\n
\n
\n
\n
\n\n
\n \n
\n `,\n styles: [\n `\n .DiffOverlay, .EventOverlay {\n word-break: break-all;\n }\n\n .DiffOverlay {\n max-width: 400px;\n }\n\n .EventOverlay {\n max-width: 900px;\n }\n\n .Overlay-saleOpportunity {\n overflow: hidden;\n }\n\n `\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\n\nexport class OverlayComponent implements OnInit, OnDestroy, OnChanges {\n @ViewChild('el') el: ElementRef;\n\n type: string;\n data: any = {};\n data$: Observable<{ type: string; data: any }>;\n _subShow: Subscription;\n destroyed$: Subject = new Subject();\n\n constructor(\n private Overlay: OverlayService,\n private Render2: Renderer2,\n private cd: ChangeDetectorRef,\n // acl used in event overlay\n private ACL: ACL,\n // production operations used in event overlay\n private ProductionOperations: ProductionOperationService,\n ) {\n\n }\n\n ngOnInit() {\n this.Overlay.overlayShow\n .pipe(\n takeUntil(this.destroyed$),\n distinctUntilChanged()\n )\n .subscribe((value: any) => value ? this.show() : this.hide());\n\n this.data$ = this.Overlay.data\n .pipe(\n takeUntil(this.destroyed$),\n distinctUntilChanged(),\n );\n }\n\n ngOnDestroy() {\n this.destroyed$.next();\n }\n\n ngOnChanges() {\n this.cd.markForCheck();\n }\n\n async show() {\n this.Render2.removeClass(this.el.nativeElement, 'DisplayNone');\n\n await this.setPosition();\n\n this.cd.markForCheck();\n }\n\n setPosition() {\n setTimeout(() => { // timeout to load image before repositioning\n this.Render2.setStyle(this.el.nativeElement, 'left', this.Overlay.getPos(this.el, 0));\n this.Render2.setStyle(this.el.nativeElement, 'top', this.Overlay.getPos(this.el, 1));\n\n this.cd.markForCheck();\n });\n }\n\n hide() {\n this.Render2.addClass(this.el.nativeElement, 'DisplayNone');\n\n this.Render2.setStyle(this.el.nativeElement, 'top', '-999999px');\n this.Render2.setStyle(this.el.nativeElement, 'left', '-999999px');\n\n this.cd.markForCheck();\n }\n\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogRef } from '@angular/material/legacy-dialog';\n\n@Component({\n selector: 'pm-iframe-dialog',\n template: `\n \n \n
\n `\n})\n\nexport class IframeDialogComponent {\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: {\n url: string;\n },\n\n private dialogRef: MatLegacyDialogRef\n ) {\n\n }\n\n}\n","import { distinctUntilChanged, takeUntil, tap } from '@proman/rxjs-common';\nimport {\n Component, ViewChild, ElementRef, Renderer2, ChangeDetectorRef, ChangeDetectionStrategy,\n OnInit, OnDestroy\n} from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { OverlayService } from '../services/overlay.service';\nimport { FilterService } from '@proman/services/filter.service';\nimport { RequestService } from '@proman/services/request.service';\nimport { DocsIdValues } from '@proman/store/docs-id';\nimport { Dialog } from '@frontend/shared/services/dialog.service';\nimport { IframeDialogComponent } from '@frontend/shared-dialogs/components/iframe-dialog.component';\n\n@Component({\n selector: 'pm-docs',\n template: `\n \n
\n \n {{ value.title }}\n
\n \n \n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\n\n\nexport class DocsOverlayComponent implements OnInit, OnDestroy {\n @ViewChild('el') el: ElementRef;\n\n cache: any = {};\n\n type: string;\n value$: Observable;\n destroyed$: Subject = new Subject();\n readMore: string;\n dialogText: string;\n hideTimeout: any;\n isValue: boolean;\n\n docsHref: string = 'https://doc.proman.app/p/';\n\n constructor(\n private Request: RequestService,\n private Overlay: OverlayService,\n private Render2: Renderer2,\n private cd: ChangeDetectorRef,\n private Filter: FilterService,\n private Dialog: Dialog,\n ) {\n if (window.location.host.includes('prochef.app')) {\n this.docsHref = 'https://doc.proman.app/p/';\n }\n if (window.location.host.includes('smarton.app')) {\n this.docsHref = 'https://doc.proman.app/p/';\n }\n if (window.location.host.includes('proman.app')) {\n this.docsHref = 'https://doc.proman.app/p/';\n }\n }\n\n ngOnInit() {\n this.Overlay.docShow.pipe(\n takeUntil(this.destroyed$),\n distinctUntilChanged())\n .subscribe((value: any) => value ? this.show() : this.hide());\n\n this.value$ = this.Overlay.docValues.pipe(\n takeUntil(this.destroyed$),\n distinctUntilChanged(),\n tap((value) => {\n this.isValue = !!value;\n })\n );\n\n }\n\n ngOnDestroy() {\n this.destroyed$.next();\n }\n\n async show() {\n this.readMore = this.Filter.translate('read_more');\n this.dialogText = this.Filter.translate('open_in_dialog');\n\n await this.Render2.removeClass(this.el.nativeElement, 'DisplayNone');\n\n this.setPosition();\n\n this.cd.markForCheck();\n }\n\n setPosition = () => {\n if (!this.el) return;\n\n setTimeout(() => { // timeout to load image before repositioning\n this.Render2.setStyle(this.el.nativeElement, 'left', this.Overlay.getPos(this.el, 0));\n this.Render2.setStyle(this.el.nativeElement, 'top', this.Overlay.getPos(this.el, 1));\n\n this.cd.markForCheck();\n });\n };\n\n hide() {\n if (!this.el) return;\n\n this.Render2.addClass(this.el.nativeElement, 'DisplayNone');\n\n this.Render2.setStyle(this.el.nativeElement, 'top', '-999999px');\n this.Render2.setStyle(this.el.nativeElement, 'left', '-999999px');\n\n this.cd.markForCheck();\n }\n\n enterDocs() {\n this.Overlay.docsSetActive(true);\n\n clearTimeout(this.hideTimeout);\n }\n\n leaveDocs() {\n this.Overlay.docsSetActive(false);\n this.Overlay.docValues.next(null);\n\n this.hideTimeout = setTimeout(() => {\n this.Overlay.docsHide();\n this.hide();\n }, 250);\n\n }\n\n handleDialog(event: MouseEvent, url: string) {\n event.preventDefault();\n this.Dialog.open(IframeDialogComponent, { url }, { width: '80%' })\n\n }\n\n}\n","import { Component, EventEmitter, OnInit, Output } from '@angular/core';\nimport { ParametersOptionsService } from '@proman/services/parameters-options.service';\nimport { Entity } from '@proman/services/entity.service';\nimport { FilterService } from '@proman/services/filter.service';\nimport { twoDigit } from '@proman/utils';\nimport moment from 'moment';\n\n@Component({\n selector: 'pm-workshifts-colors',\n template: `\n \n
\n
\n
\n
{{ 'other' | translate }} \n
\n
\n
\n `,\n styles: [`\n a {\n width: fit-content;\n }\n `]\n})\n\nexport class WorkshiftsColorsComponent implements OnInit {\n @Output() onColorChange: EventEmitter = new EventEmitter();\n\n workshifts: any = [];\n workdayExceptionReasons: any = [];\n calendarOptions: any = [];\n calendarEntity: any;\n utcOffset: number;\n\n constructor(\n private Entity: Entity,\n private Filter: FilterService,\n private ParametersOptions: ParametersOptionsService,\n ) {\n this.calendarEntity = this.Entity.get({ name: 'calendar', get: ['getOptions'], post: ['updateOptions'] });\n this.utcOffset = moment().utcOffset() / 60;\n }\n\n ngOnInit() {\n this.calendarEntity\n .getOptions()\n .then((response: any) => this.calendarOptions = response);\n\n this.ParametersOptions\n .search({ entity: 'workshift' })\n .then((response: any) => {\n\n if (moment().isDST()) {\n response.forEach((shift: any) => {\n shift.displayName = `${shift.name}\n ${moment.utc(shift.start, [moment.ISO_8601, 'HH:mm:ss']).utcOffset(this.utcOffset).subtract(1, 'hour').format('HH:mm').toString()} -\n ${moment.utc(shift.end, [moment.ISO_8601, 'HH:mm:ss']).utcOffset(this.utcOffset).subtract(1, 'hour').format('HH:mm').toString()}`;\n });\n } else {\n response.forEach((shift: any) => {\n shift.displayName = `${shift.name}\n ${moment.utc(shift.start, [moment.ISO_8601, 'HH:mm:ss']).utcOffset(this.utcOffset).format('HH:mm').toString()} -\n ${moment.utc(shift.end, [moment.ISO_8601, 'HH:mm:ss']).utcOffset(this.utcOffset).format('HH:mm').toString()}`;\n });\n }\n\n this.workshifts = response;\n\n });\n\n this.ParametersOptions\n .search({ entity: 'workday_exception_reason' })\n .then((response: any) => this.workdayExceptionReasons = response);\n\n }\n\n updateWorkshiftColor = (workshift: any, value: any) => {\n this.Entity.get('workshift')\n .update({ id: workshift.id, color: value })\n .then(() => {\n workshift.color = value;\n this.emitUpdate();\n });\n };\n\n updateWorkdayExceptionReasonColor = (reason: any, value: any) => {\n this.Entity.get('workday_exception_reason')\n .update({ id: reason.id, color: value })\n .then(() => {\n reason.color = value;\n this.emitUpdate();\n });\n };\n\n updateChangedScheduleColor = (value: any) => {\n this.calendarEntity\n .updateOptions({ changedScheduleColor: value })\n .then(() => {\n this.calendarOptions.changedScheduleColor = value;\n this.emitUpdate();\n });\n };\n\n emitUpdate = () => {\n this.onColorChange.emit();\n };\n\n}\n","import { Component, Output, EventEmitter, OnInit } from '@angular/core';\nimport { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\n\n@Component({\n selector: 'pm-change-username-form',\n template: `\n \n `\n})\n\nexport class ChangeUsernameFormComponent implements OnInit {\n @Output() onSubmit: EventEmitter = new EventEmitter();\n\n nameConfig = { label: 'username', required: true, type: 'text' };\n username: string;\n controls: any;\n form: UntypedFormGroup;\n\n ngOnInit() {\n this.controls = {\n current: new UntypedFormControl('', Validators.required),\n };\n this.form = new UntypedFormGroup(this.controls);\n }\n\n onChange(property: string, value: string) {\n this.username = value;\n }\n\n handleSubmit(form: any) {\n this.onSubmit.emit({ new_username: this.username });\n }\n}\n","import { Component, Inject } from \"@angular/core\";\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogRef } from \"@angular/material/legacy-dialog\";\nimport { Entity, EntityInterface, EntityNameType } from \"@proman/services/entity.service\";\nimport { AccountCategory } from \"@proman/interfaces/entity-interfaces\";\nimport { FilterService } from \"@proman/services/filter.service\";\nimport { LedgerEntityInterface } from \"@proman/resources/ledger\";\nimport { findById } from \"@proman/utils\";\n\n@Component({\n selector: 'pm-ledger-type-create-dialog',\n template: `\n \n \n
\n
\n
\n \n
\n
\n \n
\n \n
\n \n
\n \n
\n\n
\n\n \n \n `\n})\n\nexport class CreateLedgerTypeDialogComponent {\n entityName: EntityNameType;\n ledgerEntityInterface: LedgerEntityInterface\n LedgerTypesEntityInterface: EntityInterface\n typeDbit: string = 'D';\n typeCrdt: string = 'C';\n ledgerType: any;\n ledgerTypesOptions: any[] = [];\n type: any;\n accountCategoryCrdt: any;\n accountCategoryDbit: any;\n name: string = '';\n mode: string = '';\n ready: boolean = false;\n\n constructor(\n @Inject(MAT_LEGACY_DIALOG_DATA) public data: any,\n private Entity: Entity,\n private Filter: FilterService,\n public dialogRef: MatLegacyDialogRef\n ) {\n this.mode = data.mode;\n if (this.mode === 'edit' && data.item) {\n this.type = data.item.type;\n this.name = data.item.name;\n this.typeDbit = data.item.typeDbit ?? '';\n this.typeCrdt = data.item.typeCrdt ?? '';\n this.accountCategoryCrdt = data.item.accountCategoryCrdt;\n this.accountCategoryDbit = data.item.accountCategoryDbit;\n }\n this.LedgerTypesEntityInterface = Entity.get('ledger_types');\n this.ledgerEntityInterface = Entity.get('ledger');\n if (this.type === 'default') {\n this.ledgerTypesOptions = [{ id: 'default', name: this.Filter.translate('default')}];\n this.type = this.ledgerTypesOptions[0];\n } else {\n this.ledgerEntityInterface.getLedgerTypesList().then((response) => {\n Object.values(response).forEach((type: any) =>\n this.ledgerTypesOptions.push({ id: type, name: this.Filter.translate(type) }));\n this.type = findById(this.ledgerTypesOptions, this.type);\n })\n }\n }\n\n confirm = () => {\n this.LedgerTypesEntityInterface.create({\n name: this.name,\n typeCrdt: this.typeCrdt,\n typeDbit: this.typeDbit,\n accountCategoryDbit: this.accountCategoryDbit?.id,\n accountCategoryCrdt: this.accountCategoryCrdt?.id,\n type: this.type.id,\n }).then((response: any) => this.dialogRef.close(response.data));\n };\n\n save = () => {\n this.LedgerTypesEntityInterface.update({\n id: this.data.item.id,\n name: this.name,\n typeCrdt: this.typeCrdt,\n typeDbit: this.typeDbit,\n accountCategoryDbit: this.accountCategoryDbit?.id,\n accountCategoryCrdt: this.accountCategoryCrdt?.id,\n type: this.type.id,\n }).then((response: any) => this.dialogRef.close(response.data));\n };\n\n set = (property: string, value: any) => this[property] = value\n\n getCategoryName = (cat: AccountCategory) => cat ? `${cat.keyName} - ${cat.name}` : '';\n\n}\n","import { NgModule } from '@angular/core';\nimport { RadioGroupComponent } from '@frontend/shared/components/radio-group.component';\nimport { RadioInputDialogComponent } from '@frontend/shared/components/radio-input-dialog.component';\nimport { SimpleFormFieldComponent } from '@frontend/shared/components/simple-form-field.component';\nimport { PromanDurationDropdownComponent } from '@proman/datepicker/proman-duration-dropdown.component';\nimport { ElementsBuilderComponent } from '@frontend/shared/components/elements-builder.component';\nimport { PromanFilesManagerComponent } from '@proman/files-manager/proman-files-manager.component';\nimport { UploadComponent } from '@frontend/shared/components/upload.component';\nimport { UploadEntityPhotoComponent } from '@frontend/shared/components/upload-entity-photo.component';\nimport { PhoneComponent } from '@frontend/shared/components/phone.component';\nimport { ClickToCallComponent } from '@frontend/shared/components/click-to-call.component';\nimport { ProgressBarComponent } from '@frontend/shared/components/progress-bar.component';\nimport { ToolbarDriverComponent } from '@frontend/shared/components/toolbar-driver.component';\nimport { NavigationHeaderComponent } from '@frontend/shared/components/navigation-header.component';\nimport { LanguageSwitchComponent } from '@frontend/shared/components/language-switch.component';\nimport { UserThumbComponent } from '@frontend/shared/components/user-thumb.component';\nimport { TimelineChatComponent } from '@frontend/shared/components/timeline-chat.component';\nimport { ProgressComponent } from '@frontend/shared/components/progress.component';\nimport { TagsComponent } from '@proman/tags/tags.component';\nimport { ImageComponent } from '@frontend/shared/components/image.component';\nimport { ContactsManagerComponent } from '@frontend/shared/components/contacts-manager.component';\nimport { UserContactsCardComponent } from '@frontend/shared/components/user-contacts-card.component';\nimport { UpdateDataComponent } from '@frontend/shared/components/update-data.component';\nimport { BottomToolbarComponent } from '@frontend/shared/components/bottom-toolbar.component';\nimport { ActionsComponent } from '@frontend/shared/components/actions.component';\nimport { FrameComponent } from '@frontend/shared/components/frame.component';\nimport { ContentComponent } from '@frontend/shared/components/content.component';\nimport { BarcodeComponent } from '../printers/components/barcode.component';\nimport { UpdateComponent } from '@frontend/shared/components/update.component';\nimport { DynamicFieldsComponent } from '@frontend/shared/components/dynamic-fields.component';\nimport { LooseRelationComponent } from '../system/components/loose-relation.component';\nimport { IconSelectComponent } from '@frontend/shared/components/icon-select.component';\nimport { ErrorsComponent } from '@frontend/shared/components/errors.component';\nimport { BugTrackerDialogComponent } from '@frontend/shared/components/bug-tracker-dialog.component';\nimport { UsersSwitcherDialogComponent } from '../employees/components/users-switcher-dialog.component';\nimport { CountryRegionsComponent } from '@frontend/shared/components/country-regions.component';\nimport { TreeSelectComponent } from '@frontend/shared/components/tree-select.component';\nimport { EntityParentCategoryRecursiveComponent } from '@frontend/shared/components/entity-parent-category-recursive.component';\nimport { EntityParentCategoriesComponent } from '@frontend/shared/components/entity-parent-categories.component';\nimport { CategoryRecursiveComponent } from '@frontend/shared/components/category-recursive.component';\nimport { CreateCategoryDialogComponent } from '@frontend/shared/components/create-category-dialog.component';\nimport { CreateTaxTypeDialogComponent } from '@frontend/shared/components/create-tax-type-dialog.component';\nimport { ProductsTableComponent } from '../products/components/products-table.component';\nimport { EntityValidationErrorsComponent } from '@frontend/shared/components/entity-validation-errors.component';\nimport { EventParametersComponent } from '../events/components/event-parameters.component';\nimport { TabsComponent } from '@frontend/shared/components/tabs.component';\nimport { PermissionsComponent } from '../roles/components/permissions.component';\nimport { PromanQrReaderComponent } from '@proman/qr-reader/proman-qr-reader.component';\nimport { EmployeeDocumentsReadComponent } from '../employees/components/employee-documents-read.component';\nimport { EntityActivityLogComponent } from '@frontend/shared/components/entity-activity-log.component';\nimport { CreditMaterialsComponent } from '@frontend/shared/components/credit-materials.component';\nimport { InlineCommentsComponent } from '@frontend/shared/components/inline-comments.component';\nimport { EventOrderProductsTableComponent } from '../events/components/event-order-products-table.component';\nimport { ArticleSummaryBtnComponent } from '../articles/components/article-summary-btn.component';\nimport { UserMenuTreeComponent } from '../employees/components/user-menu-tree.component';\nimport { PipesModule } from '@proman/shared/pipes/pipes.module';\nimport { PromanCommonComponentsModule } from '@proman/common-components/proman-common-components.module';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatLegacyButtonModule } from '@angular/material/legacy-button';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatLegacyListModule } from '@angular/material/legacy-list';\nimport { MatLegacyMenuModule } from '@angular/material/legacy-menu';\nimport { MatLegacyProgressBarModule } from '@angular/material/legacy-progress-bar';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { InputsModule } from '../inputs/inputs.module';\nimport { RouterModule } from '@angular/router';\nimport { OverlayComponent } from '@frontend/shared/components/overlay.component';\nimport { DocsOverlayComponent } from '@frontend/shared/components/docs-overlay.component';\nimport { CalendarOverlayFilesComponent } from '../events/components/calendar-overlay-files.component';\nimport { ArticleCommentStatusComponent } from '../articles/components/article-comment-status.component';\nimport { OrderProductShipmentCellComponent } from '../orders/components/order-product-shipment-cell.component';\nimport { FlexLayoutModule } from 'ngx-flexible-layout';\nimport { WorkshiftsColorsComponent } from '../employees/components/workshifts-colors.component';\nimport { ClipboardCopyBtnComponent } from '@frontend/shared/components/clipboard-copy-btn.component';\nimport { ClipboardDirective } from '@frontend/shared/directives/clipboard.directive';\nimport { MatLegacyDialogModule } from '@angular/material/legacy-dialog';\nimport { AccountCategoryTypeBtnComponent } from '../accounting/components/account-category-type-btn.component';\nimport { ConfigFormFieldComponent } from '@frontend/shared/components/config-form-field.component';\nimport { ChangeUsernameFormComponent } from '@frontend/shared/components/change-username-form.component';\nimport { CorporatePanelComponent } from '@frontend/shared/components/corporate-panel.component';\nimport { FrontendPipesModule } from '@frontend/shared/pipes/frontend-pipes.module';\nimport { SharedDirectivesModule } from '@proman/shared/directives/shared-directives.module';\nimport { Fa6Module } from '@proman/fa/fa6.module';\nimport { FrontendTableModule } from '../table/frontend-table.module';\nimport { ParameterViewComponentModule } from '../parameters/parameter-view-component.module';\nimport { PromanColorComponent } from '@proman/color/proman-color.component';\nimport { AccountingPanelComponent } from \"@frontend/shared/components/accounting-panel.component\";\nimport { CreateLedgerTypeDialogComponent } from '@frontend/shared/components/create-ledger-type-dialog.component';\nimport { FrontendParametersModule } from '@frontend/frontend-parameters/frontend-parameters.module';\nimport { PromanAutocompleteComponent } from '@proman/autocomplete/proman-autocomplete.component';\nimport { CdkDrag, CdkDragPlaceholder, CdkDropList } from '@angular/cdk/drag-drop';\nimport { CropperDialogComponent } from \"@proman/cropper/cropper-dialog.component\";\nimport { PromanThumbnailComponent } from '@proman/common-components/components/proman-thumbnail.component';\nimport { PromanWarningComponent } from '@proman/common-components/components/warning.component';\nimport { FrontendDirectivesModule } from '@frontend/shared/frontend-directives.module';\n\nconst COMPONENTS = [\n RadioGroupComponent,\n RadioInputDialogComponent,\n SimpleFormFieldComponent,\n ConfigFormFieldComponent,\n ElementsBuilderComponent,\n UploadComponent,\n UploadEntityPhotoComponent,\n\n PhoneComponent,\n ClickToCallComponent, // phone component\n\n ProgressBarComponent,\n ToolbarDriverComponent,\n NavigationHeaderComponent,\n LanguageSwitchComponent,\n UserThumbComponent,\n TimelineChatComponent,\n ProgressComponent,\n\n ImageComponent,\n ContactsManagerComponent,\n UserContactsCardComponent, // used in contacts component\n UpdateDataComponent,\n BottomToolbarComponent,\n ActionsComponent,\n FrameComponent,\n ContentComponent,\n BarcodeComponent,\n\n UpdateComponent,\n\n DynamicFieldsComponent,\n LooseRelationComponent,\n IconSelectComponent,\n ErrorsComponent,\n\n // DefaultRouteComponent, // to app\n BugTrackerDialogComponent, // to app / account component\n UsersSwitcherDialogComponent, // too app / account\n\n CountryRegionsComponent, // table cell ??\n\n TreeSelectComponent, // categories module\n EntityParentCategoryRecursiveComponent, // categories module\n EntityParentCategoriesComponent, // categories module\n CategoryRecursiveComponent, // categories module\n CreateCategoryDialogComponent,\n CreateTaxTypeDialogComponent,\n CreateLedgerTypeDialogComponent,\n ProductsTableComponent, // production create / event dialog / event.overlay\n\n EntityValidationErrorsComponent,\n EventParametersComponent,\n TabsComponent,\n PermissionsComponent,\n\n EmployeeDocumentsReadComponent,\n\n EntityActivityLogComponent,\n CreditMaterialsComponent,\n\n InlineCommentsComponent, // event dialog\n EventOrderProductsTableComponent, // event dialog\n ArticleSummaryBtnComponent, // event dialog / production create\n\n UserMenuTreeComponent, // resources ? / system settings\n\n OverlayComponent, // to app\n DocsOverlayComponent, // to app\n CalendarOverlayFilesComponent, // overlay\n\n ArticleCommentStatusComponent,\n OrderProductShipmentCellComponent,\n WorkshiftsColorsComponent, // employee schedule / workshift colors dialog\n\n ClipboardCopyBtnComponent,\n AccountCategoryTypeBtnComponent,\n ChangeUsernameFormComponent,\n CorporatePanelComponent,\n AccountingPanelComponent,\n];\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n PipesModule,\n RouterModule,\n InputsModule,\n SharedDirectivesModule,\n PromanCommonComponentsModule,\n FrontendTableModule,\n MatRadioModule,\n MatLegacyButtonModule,\n MatLegacyListModule,\n MatLegacyProgressBarModule,\n MatLegacyMenuModule,\n MatTabsModule,\n MatProgressSpinnerModule,\n MatExpansionModule,\n FlexLayoutModule,\n MatLegacyDialogModule,\n Fa6Module,\n FrontendParametersModule,\n FrontendDirectivesModule,\n PromanAutocompleteComponent,\n ParameterViewComponentModule,\n FrontendPipesModule,\n PromanColorComponent,\n CdkDrag,\n CdkDropList,\n CdkDragPlaceholder,\n PromanDurationDropdownComponent,\n CropperDialogComponent,\n PromanFilesManagerComponent,\n TagsComponent,\n PromanThumbnailComponent,\n PromanWarningComponent,\n PromanQrReaderComponent,\n\n ],\n providers: [],\n declarations: [...COMPONENTS, ClipboardDirective],\n exports: [\n COMPONENTS,\n ClipboardDirective,\n PromanDurationDropdownComponent,\n PromanFilesManagerComponent,\n TagsComponent,\n PromanQrReaderComponent\n ]\n})\n\nexport class SharedComponentsModule {}\n"],"mappings":"4sGAAA,IAAAA,GAAAC,GAAA,CAAAC,GAAAC,KAAA,eAUC,SAAUC,EAAQC,EAAS,CAC1B,OAAOH,IAAY,UAAY,OAAOC,GAAW,IAAcA,GAAO,QAAUE,EAAQ,EAAI,OAAO,QAAW,YAAc,OAAO,IAAM,OAAOA,CAAO,GAAKD,EAAS,OAAO,WAAe,IAAc,WAAaA,GAAU,KAAMA,EAAO,QAAUC,EAAQ,EACjQ,GAAGH,GAAM,UAAY,CACnB,aAEA,SAASI,EAAQC,EAAGC,EAAG,CACrB,IAAIC,EAAI,OAAO,KAAKF,CAAC,EACrB,GAAI,OAAO,sBAAuB,CAChC,IAAIG,EAAI,OAAO,sBAAsBH,CAAC,EACtCC,IAAME,EAAIA,EAAE,OAAO,SAAUF,EAAG,CAC9B,OAAO,OAAO,yBAAyBD,EAAGC,CAAC,EAAE,UAC/C,CAAC,GAAIC,EAAE,KAAK,MAAMA,EAAGC,CAAC,CACxB,CACA,OAAOD,CACT,CACA,SAASE,EAAeJ,EAAG,CACzB,QAASC,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAAK,CACzC,IAAIC,EAAY,UAAUD,CAAC,GAAnB,KAAuB,UAAU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D,EAAA,QAAAN,EAAAjC,qBAAA,KAAA,KAAAiC,EAAAjC,oBAAAR,IAAA,EAAmC,SAAAuD,GAAA,GAAAC,GAAAJ,GAAA,GAAAK,EAAA,EAAAhB,EAAAtB,eAAA,CAAA,EAM7B6B,EAAA,CAAA,EAAAD,EAAA,QAAAN,EAAA5C,QAAA,EAGNmD,EAAA,CAAA,EAAAD,EAAA,QAAAN,EAAAnC,qBAAA,KAAA,KAAAmC,EAAAnC,oBAAAN,IAAA,EAAmC,SAAAuD,GAAA,GAAAG,GAAAN,GAAA,GAAAK,EAAA,EAAAhB,EAAAtB,eAAA,CAAA,EAUrC6B,EAAA,CAAA,EAAAD,EAAA,UAAAN,EAAAxC,OAAA,SAAA,SAAA,QAAA,EAAmD,qBAAA,CAAAwC,EAAAzC,IAAA,gEAM7D,IAAOT,EAAPoE,SAAOpE,CAA+B,GAAA,ECoL5C,IAAaqE,IAAsB,IAAA,CAA7B,IAAOA,EAAP,MAAOA,CAAsB,yCAAtBA,EAAsB,uBAAtBA,CAAsB,CAAA,2BAlD3BC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GAIAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,EAAuB,CAAA,CAAA,EAezB,IAAOjC,EAAPkC,SAAOlC,CAAsB,GAAA","names":["require_cropper","__commonJSMin","exports","module","global","factory","ownKeys","e","r","t","o","_objectSpread2","_defineProperty","_typeof","_classCallCheck","instance","Constructor","_defineProperties","target","props","i","descriptor","_toPropertyKey","_createClass","protoProps","staticProps","obj","key","value","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","_arrayLikeToArray","iter","minLen","n","len","arr2","_toPrimitive","input","hint","prim","res","arg","IS_BROWSER","WINDOW","IS_TOUCH_DEVICE","HAS_POINTER_EVENT","NAMESPACE","ACTION_ALL","ACTION_CROP","ACTION_MOVE","ACTION_ZOOM","ACTION_EAST","ACTION_WEST","ACTION_SOUTH","ACTION_NORTH","ACTION_NORTH_EAST","ACTION_NORTH_WEST","ACTION_SOUTH_EAST","ACTION_SOUTH_WEST","CLASS_CROP","CLASS_DISABLED","CLASS_HIDDEN","CLASS_HIDE","CLASS_INVISIBLE","CLASS_MODAL","CLASS_MOVE","DATA_ACTION","DATA_PREVIEW","DRAG_MODE_CROP","DRAG_MODE_MOVE","DRAG_MODE_NONE","EVENT_CROP","EVENT_CROP_END","EVENT_CROP_MOVE","EVENT_CROP_START","EVENT_DBLCLICK","EVENT_TOUCH_START","EVENT_TOUCH_MOVE","EVENT_TOUCH_END","EVENT_POINTER_DOWN","EVENT_POINTER_MOVE","EVENT_POINTER_UP","EVENT_READY","EVENT_RESIZE","EVENT_WHEEL","EVENT_ZOOM","MIME_TYPE_JPEG","REGEXP_ACTIONS","REGEXP_DATA_URL","REGEXP_DATA_URL_JPEG","REGEXP_TAG_NAME","MIN_CONTAINER_WIDTH","MIN_CONTAINER_HEIGHT","DEFAULTS","TEMPLATE","isNaN","isNumber","isPositiveNumber","isUndefined","isObject","hasOwnProperty","isPlainObject","_constructor","prototype","isFunction","slice","toArray","forEach","data","callback","assign","_len","args","_key","REGEXP_DECIMALS","normalizeDecimalNumber","times","REGEXP_SUFFIX","setStyle","element","styles","style","property","hasClass","addClass","elem","className","removeClass","toggleClass","added","REGEXP_CAMEL_CASE","toParamCase","getData","name","setData","removeData","REGEXP_SPACES","onceSupported","supported","once","listener","options","removeListener","type","handler","event","listeners","addListener","_handler","_element$listeners","_len2","_key2","dispatchEvent","getOffset","box","location","REGEXP_ORIGINS","isCrossOriginURL","url","parts","addTimestamp","timestamp","getTransforms","_ref","rotate","scaleX","scaleY","translateX","translateY","values","transform","getMaxZoomRatio","pointers","pointers2","maxRatio","pointer","pointerId","pointer2","x1","y1","x2","y2","z1","z2","ratio","getPointer","_ref2","endOnly","pageX","pageY","end","getPointersCenter","count","_ref3","startX","startY","getAdjustedSizes","_ref4","aspectRatio","height","width","isValidWidth","isValidHeight","adjustedWidth","getRotatedSizes","_ref5","degree","arc","sinArc","cosArc","newWidth","newHeight","getSourceCanvas","image","_ref6","_ref7","_ref8","imageAspectRatio","imageNaturalWidth","imageNaturalHeight","_ref6$rotate","_ref6$scaleX","_ref6$scaleY","naturalWidth","naturalHeight","_ref8$fillColor","fillColor","_ref8$imageSmoothingE","imageSmoothingEnabled","_ref8$imageSmoothingQ","imageSmoothingQuality","_ref8$maxWidth","maxWidth","_ref8$maxHeight","maxHeight","_ref8$minWidth","minWidth","_ref8$minHeight","minHeight","canvas","context","maxSizes","minSizes","destMaxSizes","destMinSizes","destWidth","destHeight","params","param","fromCharCode","getStringFromCharCode","dataView","start","length","str","REGEXP_DATA_URL_HEAD","dataURLToArrayBuffer","dataURL","base64","binary","arrayBuffer","uint8","arrayBufferToDataURL","mimeType","chunks","chunkSize","resetAndGetOrientation","orientation","littleEndian","app1Start","ifdStart","offset","exifIDCode","tiffOffset","endianness","firstIFDOffset","_length","_offset","parseOrientation","render","container","cropper","containerData","imageData","viewMode","rotated","canvasWidth","canvasHeight","canvasData","sizeLimited","positionLimited","cropBoxData","cropped","minCanvasWidth","minCanvasHeight","_getAdjustedSizes","newCanvasLeft","newCanvasTop","changed","transformed","_getRotatedSizes","autoCropArea","limited","minCropBoxWidth","minCropBoxHeight","maxCropBoxWidth","maxCropBoxHeight","preview","crossOrigin","alt","previews","el","img","cropBoxWidth","cropBoxHeight","left","top","originalWidth","originalHeight","events","handlers","ratioX","ratioY","_this","delta","buttons","button","action","touch","change","right","bottom","minLeft","minTop","renderable","range","check","side","p","methods","hasSameSize","offsetX","offsetY","_this$canvasData","x","y","_originalEvent","pivot","center","_scaleX","_scaleY","rounded","widthChanged","heightChanged","source","_this$getData","initialX","initialY","initialWidth","initialHeight","_options$imageSmoothi","sourceWidth","sourceHeight","srcX","srcY","srcWidth","srcHeight","dstX","dstY","dstWidth","dstHeight","scale","mode","dragBox","face","croppable","movable","AnotherCropper","Cropper","tagName","xhr","clone","_parseOrientation","crossOriginUrl","_this2","isIOSWebKit","done","sizingImage","body","template","cropBox","parentNode","require_zxing_js_umd","__commonJSMin","exports","module","global","factory","isNullOrUndefined","obj","extendStatics","d","b","p","__extends","__","fixProto","target","prototype","setPrototypeOf","fixStack","fn","captureStackTrace","CustomError","_super","message","_newTarget","_this","Exception","ArgumentException","IllegalArgumentException","BinaryBitmap","binarizer","y","row","left","top","width","height","newSource","ChecksumException","Binarizer","source","System","src","srcPos","dest","destPos","length","IndexOutOfBoundsException","ArrayIndexOutOfBoundsException","index","Arrays","a","val","i","len","fromIndex","toIndex","arrayLength","args","rows","cols","value","x","first","second","result","element","original","newLength","newArray","from","to","copy","ar","el","comparator","m","n","k","cmp","Integer","intNumber","dividend","divisor","num","radix","BitArray","size","bits","newBits","bitsOffset","currentBits","start","end","firstInt","lastInt","firstBit","mask","max","bit","numBits","numBitsLeft","other","otherSize","bitOffset","array","offset","numBytes","theByte","j","oldBitsLen","leftOffset","currentInt","nextInt","o","DecodeHintType","DecodeHintType$1","FormatException","CharacterSetValueIdentifiers","CharacterSetECI","valueIdentifier","valuesParam","name","otherEncodingNames","values","v","otherName","characterSet","UnsupportedOperationException","StringEncoding","bytes","encoding","encodingName","s","h","charList","uintArray","StringUtils","code","e","hints","canBeISO88591","canBeShiftJIS","canBeUTF8","utf8BytesLeft","utf2BytesChars","utf3BytesChars","utf4BytesChars","sjisBytesLeft","sjisKatakanaChars","sjisCurKatakanaWordLength","sjisCurDoubleBytesWordLength","sjisMaxKatakanaWordLength","sjisMaxDoubleBytesWordLength","isoHighOther","utf8bom","append","callback","exp","p0","p1","p2","p3","p4","base","ch","regex","str","charCode","StringBuilder","c","BitMatrix","rowSize","image","imageI","stringRepresentation","setString","unsetString","bitsPos","rowStartPos","rowLength","nRows","pos","matrix","rowArray","right","bottom","topRow","bottomRow","x32","theBits","hash","lineSeparator","NotFoundException","GlobalHistogramBinarizer","localLuminances","localBuckets","blackPoint","center","pixel","luminanceSize","buckets","numBuckets","maxBucketCount","firstPeak","firstPeakSize","secondPeak","secondPeakScore","distanceToBiggest","score","temp","bestValley","bestValleyScore","fromFirst","HybridBinarizer","luminances","subWidth","subHeight","blackPoints","newMatrix","maxYOffset","maxXOffset","yoffset","xoffset","sum","z","blackRow","average","min","threshold","stride","yy","xx","averageNeighborBlackPoint","LuminanceSource","sourceRow","luminance","InvertedLuminanceSource","delegate","invertedMatrix","HTMLCanvasElementLuminanceSource","canvas","imageData","imageBuffer","grayscaleBuffer","gray","pixelR","pixelG","pixelB","tempCanvasElement","angle","tempContext","angleRadians","newWidth","newHeight","VideoInputDevice","deviceId","label","groupId","__awaiter","thisArg","_arguments","P","generator","adopt","resolve","reject","fulfilled","step","rejected","BrowserCodeReader","reader","timeBetweenScansMillis","_hints","millis","devices","videoDevices","device","kind","videoDevice","videoSource","videoConstraints","constraints","stream","video","callbackFn","videoElement","mediaElementId","type","mediaElement","url","task","decodeTask","img","imageSource","imageElement","retryIfNotFound","retryIfChecksumOrFormatError","loop","ifNotFound","ifChecksumOrFormat","isChecksumOrFormatError","isNotFound","binaryBitmap","srcElement","dimensions","canvasElementContext","ctx","luminanceSource","hybridBinarizer","elem","canvasElement","t","Result","text","rawBytes","resultPoints","format","timestamp","metadata","newPoints","oldPoints","allPoints","BarcodeFormat","BarcodeFormat$1","ResultMetadataType","ResultMetadataType$1","DecoderResult","byteSegments","ecLevel","structuredAppendSequenceNumber","structuredAppendParity","errorsCorrected","erasures","AbstractGenericGF","GenericGFPoly","field","coefficients","coefficientsLength","firstNonZero","degree","coefficient","smallerCoefficients","largerCoefficients","sumDiff","lengthDiff","aCoefficients","aLength","bCoefficients","bLength","product","aCoeff","scalar","quotient","remainder","denominatorLeadingTerm","inverseDenominatorLeadingTerm","degreeDifference","scale","term","iterationQuotient","alphaPower","ArithmeticException","GenericGF","primitive","generatorBase","expTable","logTable","ReedSolomonException","IllegalStateException","ReedSolomonDecoder","received","twoS","poly","syndromeCoefficients","noError","evalResult","syndrome","sigmaOmega","sigma","omega","errorLocations","errorMagnitudes","position","R","rLast","r","tLast","rLastLast","tLastLast","q","dltInverse","degreeDiff","sigmaTildeAtZero","inverse","errorLocator","numErrors","errorEvaluator","xiInverse","denominator","termPlus1","Table","Decoder","detectorResult","rawbits","correctedBits","decoderResult","endIndex","latchTable","shiftTable","charCount","table","gf","codewordSize","numDataCodewords","numCodewords","dataWords","ex","stuffedBits","dataWord","compact","layers","baseMatrixSize","alignmentMap","matrixSize","origCenter","newOffset","rowOffset","low","high","columnOffset","startIndex","res","boolArr","byteArr","MathUtils","aX","aY","bX","bY","xDiff","yDiff","count","Float","f","ResultPoint","otherPoint","patterns","zeroOneDistance","oneTwoDistance","zeroTwoDistance","pointA","pointB","pointC","pattern1","pattern2","DetectorResult","points","AztecDetectorResult","nbDatablocks","nbLayers","WhiteRectangleDetector","initSize","halfsize","up","down","sizeExceeded","aBlackPointFoundOnBorder","atLeastOneBlackPointFoundOnBorder","atLeastOneBlackPointFoundOnRight","atLeastOneBlackPointFoundOnBottom","atLeastOneBlackPointFoundOnLeft","atLeastOneBlackPointFoundOnTop","rightBorderNotWhite","bottomBorderNotWhite","leftBorderNotWhite","topBorderNotWhite","maxSize","dist","xStep","yStep","yi","yj","zi","zj","xi","xj","ti","tj","CORR","fixed","horizontal","GridSampler","nudged","PerspectiveTransform","a11","a21","a31","a12","a22","a32","a13","a23","a33","x0","y0","x1","y1","x2","y2","x3","y3","x0p","y0p","x1p","y1p","x2p","y2p","x3p","y3p","qToS","xValues","yValues","dx3","dy3","dx1","dx2","dy1","dy2","DefaultGridSampler","dimensionX","dimensionY","p1ToX","p1ToY","p2ToX","p2ToY","p3ToX","p3ToY","p4ToX","p4ToY","p1FromX","p1FromY","p2FromX","p2FromY","p3FromX","p3FromY","p4FromX","p4FromY","transform","iValue","GridSamplerInstance","newGridSampler","Point","Detector","isMirror","pCenter","bullsEyeCorners","corners","sides","parameterData","side","correctedData","cornerBits","idx","arr","shift","numECCodewords","parameterWords","pina","pinb","pinc","pind","color","pouta","poutb","poutc","poutd","pinax","pinbx","pincx","pindx","pointD","cornerPoints","cx","cy","topLeft","topRight","bottomRight","bottomLeft","sampler","dimension","moduleSize","px","py","dx","dy","corr","cInit","error","colorModel","iMax","errRatio","init","oldSide","newSide","ratio","centerx","centery","result0","result2","result1","result3","point","AztecReader","exception","detector","rpcb","BrowserAztecCodeReader","OneDReader","rotatedImage","orientation","tryHarder","rowStep","maxLines","middle","rowStepsAboveOrBelow","isAbove","rowNumber","attempt","newHints","hint","key","counters","numCounters","isWhite","counterPosition","numTransitionsLeft","last","pattern","maxIndividualVariance","total","patternLength","unitBarWidth","totalVariance","counter","scaledPattern","variance","Code128Reader","patternStart","bestVariance","bestMatch","startCode","convertFNC1","startPatternInfo","currentRawCodesIndex","rawCodes","codeSet","done","isNextShifted","lastStart","nextStart","lastCode","checksumTotal","multiplier","lastCharacterWasPrintable","upperMode","shiftUpperMode","unshift","previous","current","lastPatternSize","resultLength","rawCodesSize","Code39Reader","usingCheckDigit","extendedMode","theCounters","decodedChar","whiteSpaceAfterEnd","resultString","maxNarrowCounter","wideCounters","minCounter","totalWideCountersWidth","encoded","decoded","next","ITFReader","startRange","endRange","allowedLengths","lengthOK","maxAllowedLength","payloadStart","payloadEnd","counterDigitPair","counterBlack","counterWhite","twoK","counterDigit","endStart","startPattern","quietCount","endPattern","AbstractUPCEANReader","foundStart","quietStart","check","digit","whiteFirst","slice","UPCEANExtension5Support","extensionStartRange","extensionData","extensionResult","lgPatternFound","checkDigit","raw","currency","rawAmount","unitsString","hundredths","hundredthsString","UPCEANExtension2Support","checkParity","UPCEANExtensionSupport","UPCEANReader","widths","reversedWidths","startGuardRange","resultPointCallback","resultPoint","budello","quietEnd","decodeResult","extensionLength","allowedExtensions","valid","EAN13Reader","EAN8Reader","UPCAReader","upcaResult","UPCEReader","numSys","prefix","suffix","upce","upceChars","lastChar","MultiFormatUPCEANReader","possibleFormats","readers","ean13MayBeUPCA","canReturnUPCA","resultUPCA","AbstractRSSReader","finderPatterns","errors","biggestError","firstTwoSum","maxCounter","DataCharacter","checksumPortion","that","FinderPattern","startEnd","RSSUtils","maxWidth","noNarrow","narrowMask","elements","bar","elmWidth","subVal","lessVal","mxwElement","maxDenom","minDenom","BitArrayBuilder","pairs","charNumber","binary","accPos","firstValue","currentPair","leftValue","rightValue","BlockParsedResult","finished","decodedInformation","DecodedObject","newPosition","DecodedChar","DecodedInformation","newString","remainingValue","DecodedNumeric","firstDigit","secondDigit","FieldParser","rawInformation","firstTwoDigits","dataLength","firstThreeDigits","firstFourDigits","aiSize","fieldSize","ai","remaining","parsedAI","variableFieldSize","GeneralAppIdDecoder","information","buff","initialPosition","currentPosition","info","parsedFields","numeric","digit1","digit2","lastDecoded","isFinished","iso","alpha","fiveBitValue","sevenBitValue","eightBitValue","sixBitValue","AbstractExpandedDecoder","AI01decoder","buf","currentPos","initialBufferPosition","currentBlock","AI01AndOtherAIs","initialGtinPosition","firstGtinDigit","AnyAIDecoder","AI01weightDecoder","weightSize","originalWeightNumeric","weightNumeric","currentDivisor","AI013x0xDecoder","AI013103decoder","weight","AI01320xDecoder","AI01392xDecoder","lastAIdigit","AI01393xDecoder","generalInformation","AI013x0x1xDecoder","firstAIdigits","dateCode","numericDate","day","month","year","createDecoder","ExpandedPair","leftChar","rightChar","finderPatter","mayBeLast","o1","o2","ExpandedRow","wasReversed","otherPairs","pair1","pair2","e1","e2","RSSExpandedReader","verbose","tryStackedDecode","ps","reverse","collectedRows","currentRow","collectedRow","rs","sequence","stop","insertPos","prevIsSame","nextIsSame","erow","pp","allFound","found","resultingString","firstPoints","lastPoints","firstPair","checkCharacter","firstCharacter","checksum","currentRightChar","initialPos","previousPairs","isOddPattern","keepFinding","forcedOffset","searchingEvenPair","tmp","oddPattern","firstCounter","firstElementStart","numModules","elementWidth","expectedElementWidth","oddCounts","evenCounts","oddRoundingErrors","evenRoundingErrors","weightRowNumber","oddSum","oddChecksumPortion","evenChecksumPortion","group","oddWidest","evenWidest","vOdd","vEven","tEven","gSum","evenSum","incrementOdd","decrementOdd","incrementEven","decrementEven","mismatch","oddParityBad","evenParityBad","Pair","finderPattern","RSS14Reader","leftPair","rightPair","possiblePairs","pair","symbolValue","buffer","leftPoints","rightPoints","checkValue","targetCheckValue","outside","inside","outsideChar","tOdd","rightFinderPattern","firstIsBlack","MultiFormatOneDReader","useCode39CheckDigit","BrowserBarcodeReader","ECBlocks","ecCodewords","ecBlocks1","ecBlocks2","ECB","dataCodewords","Version","versionNumber","symbolSizeRows","symbolSizeColumns","dataRegionSizeRows","dataRegionSizeColumns","ecBlocks","ecbArray","ecBlock","numRows","numColumns","version","BitMatrixParser","bitMatrix","resultOffset","column","corner1Read","corner2Read","corner3Read","corner4Read","currentByte","numDataRegionsRow","numDataRegionsColumn","sizeDataRegionRow","sizeDataRegionColumn","bitMatrixWithoutAlignment","dataRegionRow","dataRegionRowOffset","dataRegionColumn","dataRegionColumnOffset","readRowOffset","writeRowOffset","readColumnOffset","writeColumnOffset","DataBlock","codewords","rawCodewords","totalBlocks","ecBlockArray","numResultBlocks","numBlockCodewords","longerBlocksNumDataCodewords","shorterBlocksNumDataCodewords","rawCodewordsOffset","specialVersion","numLongerBlocks","jOffset","iOffset","BitSource","byteOffset","bitsLeft","toRead","bitsToNotRead","Mode","DecodedBitStreamParser","resultTrailer","mode","upperShift","oneByte","cValues","firstByte","cValue","c40char","textChar","secondByte","fullBitValue","edifactValue","codewordPosition","d1","uee","randomizedBase256Codeword","base256CodewordPosition","pseudoRandomNumber","tempVariable","Decoder$1","parser","dataBlocks","totalBytes","db","resultBytes","dataBlocksCount","dataBlock","codewordBytes","codewordsInts","Detector$1","dimensionTop","dimensionRight","div","fromX","fromY","trAB","trBC","trCD","trDA","tr","pointBs","pointCs","trBA","trTop","trRight","pointAs","candidate1","candidate2","sumc1","sumc2","dimH","dimV","centerX","centerY","pointDs","toX","toY","steep","ystep","xstep","transitions","inBlack","isBlack","DataMatrixReader","leftTopBlack","rightBottomBlack","matrixWidth","matrixHeight","nudge","BrowserDatamatrixCodeReader","ErrorCorrectionLevelValues","ErrorCorrectionLevel","stringValue","FormatInformation","formatInfo","maskedFormatInfo1","maskedFormatInfo2","bestDifference","bestFormatInfo","decodeInfo","targetInfo","bitsDifference","ECBlocks$1","ecCodewordsPerBlock","ECB$1","Version$1","alignmentPatternCenters","versionBits","bestVersion","targetVersion","DataMaskValues","DataMask","isMasked","BitMatrixParser$1","formatInfoBits1","formatInfoBits2","jMin","provisionalVersion","ijMin","theParsedVersion","dataMask","functionPattern","readingUp","bitsRead","col","DataBlock$1","shorterBlocksTotalCodewords","longerBlocksStartAt","ModeValues","Mode$1","characterCountBitsForVersions","DecodedBitStreamParser$1","symbolSequence","parityData","currentCharacterSetECI","fc1InEffect","modeBits","subset","countHanzi","twoBytes","assembledTwoBytes","ignored","readBytes","nextTwoCharsBits","threeDigitsBits","twoDigitsBits","digitBits","secondThirdBytes","QRCodeDecoderMetaData","mirrored","Decoder$2","AlignmentPattern","posX","posY","estimatedModuleSize","moduleSizeDiff","newModuleSize","combinedX","combinedY","combinedModuleSize","AlignmentPatternFinder","startX","startY","maxJ","middleI","stateCount","iGen","currentState","confirmed","maxVariance","startI","centerJ","maxCount","originalStateCountTotal","maxI","stateCountTotal","centerI","FinderPattern$1","combinedCount","FinderPatternInfo","patternCenters","FinderPatternFinder","pureBarcode","iSkip","rowSkip","patternInfo","totalModuleSize","crossCheckStateCount","startJ","possibleCenters","firstConfirmedCenter","confirmedCount","totalDeviation","startSize","square","stdDev","center1","center2","dA","dB","limit","possibleCenter","Detector$2","modulesBetweenFPCenters","alignmentPattern","bottomRightX","bottomRightY","correctionToTopLeft","estAlignmentX","estAlignmentY","re","dimMinusThree","sourceBottomRightX","sourceBottomRightY","tltrCentersDimension","tlblCentersDimension","otherPattern","moduleSizeEst1","moduleSizeEst2","otherToX","otherToY","state","xLimit","realX","realY","overallEstModuleSize","allowanceFactor","allowance","alignmentAreaLeftX","alignmentAreaRightX","alignmentAreaTopY","alignmentAreaBottomY","QRCodeReader","nudgedTooFarRight","nudgedTooFarDown","PDF417Common","moduleBitCount","list","integer","symbol","PDF417DetectorResult","Detector$3","multiple","barcodeCoordinates","foundBarcodeInRow","vertices","barcodeCoordinate","startRow","startColumn","tmpResult","destinationIndexes","loc","previousRowLoc","stopRow","skippedRowCount","pixelDrift","ModulusPoly","negativeCoefficients","ModulusBase","ModulusGF","modulus","ErrorCorrection","S","evaluation","knownErrors","erasure","errorLocatorDegree","formalDerivativeCoefficients","formalDerivative","numerator","BoundingBox","leftUnspecified","rightUnspecified","boundingBox","leftBox","rightBox","missingStartRows","missingEndRows","isLeft","newTopLeft","newBottomLeft","newTopRight","newBottomRight","newMinY","newTop","newMaxY","newBottom","BarcodeMetadata","columnCount","rowCountUpperPart","rowCountLowerPart","errorCorrectionLevel","Formatter","DetectionResultColumn","imageRow","codeword","nearImageRow","formatter","BarcodeValue","confidence","maxConfidence","entry","DetectionResultRowIndicatorColumn","barcodeMetadata","firstRow","lastRow","barcodeRow","maxRowHeight","currentRowHeight","codewordsRow","rowDifference","checkedRows","closePreviousCodewordFound","barcodeColumnCount","barcodeRowCountUpperPart","barcodeRowCountLowerPart","barcodeECLevel","rowIndicatorValue","codewordRowNumber","codewordRow","DetectionResult","unadjustedCodewordCount","previousUnadjustedCount","detectionResultColumn","unadjustedCount","barcodeColumn","LRIcodewords","RRIcodewords","rowIndicatorRowNumber","invalidRowCounts","previousColumnCodewords","nextColumnCodewords","otherCodewords","otherCodeword","rowIndicatorColumn","Codeword","endX","bucket","PDF417CodewordDecoder","currentSymbol","currentBit","decodedValue","bitCountSum","bitCountIndex","sumPreviousBits","sampleIndex","bitCountRatios","bestMatchError","ratioTableRow","diff","PDF417ResultMetadata","segmentIndex","fileId","optionalData","lastSegment","segmentCount","sender","addressee","fileName","fileSize","Long","NullPointerException","OutputStream","off","OutOfMemoryError","ByteArrayOutputStream","minCapacity","newCapacity","out","param","charsetName","hibyte","Mode$2","getBigIntConstructor","BigInteger","createBigInt","getEXP900","EXP900","nineHundred","DecodedBitStreamParser$2","codeIndex","resultMetadata","charsetECI","segmentIndexArray","optionalFieldsStart","optionalFieldsLength","textCompactionData","byteCompactionData","subMode","priorToShiftMode","subModeCh","decodedBytes","byteCompactedCodewords","nextCode","numericCodewords","PDF417ScanningDecoder","imageTopLeft","imageBottomLeft","imageTopRight","imageBottomRight","minCodewordWidth","maxCodewordWidth","leftRowIndicatorColumn","rightRowIndicatorColumn","detectionResult","firstPass","resultBox","maxBarcodeColumn","leftToRight","previousStartColumn","rowHeights","rowHeight","maxValue","leftBarcodeMetadata","rightBarcodeMetadata","startPoint","increment","barcodeMatrix","barcodeMatrix01","numberOfCodewords","calculatedNumberOfCodewords","ambiguousIndexValuesList","ambiguousIndexesList","codewordIndex","ambiguousIndexValues","erasureArray","ambiguousIndexes","ambiguousIndexCount","tries","err","skippedColumns","previousRowCodeword","minColumn","maxColumn","endColumn","codewordBitCount","tmpCount","imageColumn","moduleNumber","previousPixelValue","codewordStartColumn","correctedStartColumn","correctedErrorsCount","previousValue","barcodeValue","PDF417Reader","results","pdf417ResultMetadata","ReaderException","MultiFormatReader","formats","addOneDReader","BrowserMultiFormatReader","BrowserPDF417Reader","BrowserQRCodeReader","EncodeHintType","EncodeHintType$1","ReedSolomonEncoder","cachedGenerators","lastGenerator","nextGenerator","toEncode","ecBytes","dataBytes","infoCoefficients","numZeroCoefficients","MaskUtil","penalty","arrayY","numPenalties","numDarkCells","numTotalCells","maskPattern","intermediate","isHorizontal","iLimit","jLimit","numSameBitCells","prevBit","ByteMatrix","aByte","bytesY","otherBytesY","QRCode","WriterException","MatrixUtil","dataBits","typeInfoBits","coordinates","versionInfoBits","bitIndex","direction","msbSetInPoly","typeInfo","bchCode","maskBits","xStart","yStart","patternY","pdpWidth","hspWidth","vspSize","BlockPair","errorCorrectionBytes","Encoder","content","hasEncodingHint","headerBits","eci","bitsNeeded","headerAndDataBits","numLetters","numDataBytes","finalBits","qrCode","provisionalBitsNeeded","hasNumeric","hasAlphanumeric","byte1","minPenalty","bestMaskPattern","numInputBits","versionNum","numEcBytes","totalInputBytes","capacity","numBitsInLastByte","numPaddingBytes","numTotalBytes","numRSBlocks","blockID","numDataBytesInBlock","numECBytesInBlock","numRsBlocksInGroup2","numRsBlocksInGroup1","numTotalBytesInGroup1","numTotalBytesInGroup2","numDataBytesInGroup1","numDataBytesInGroup2","numEcBytesInGroup1","numEcBytesInGroup2","dataBytesOffset","maxNumDataBytes","maxNumEcBytes","blocks","numEcBytesInBlock","block","singleCharacter","cn","num1","num2","num3","code1","code2","byte2","subtracted","BrowserQRCodeSvgWriter","contents","quietZone","containerElement","svgElement","input","inputWidth","inputHeight","qrWidth","qrHeight","outputWidth","outputHeight","leftPadding","topPadding","inputY","outputY","inputX","outputX","svgRectElement","w","rect","QRCodeWriter","output","MultiFormatWriter","writer","PlanarYUVLuminanceSource","yuvData","dataWidth","dataHeight","reverseHorizontal","area","inputOffset","outputOffset","pixels","yuv","grey","rowStart","RGBLuminanceSource","luminancesUint8Array","g2","Charset","StandardCharsets","AztecCode","codeWords","Collections","item","collection","Token","SimpleToken","bitCount","bitArray","byteCount","BinaryShiftToken","binaryShiftStart","binaryShiftByteCount","addBinaryShift","token","add","MODE_NAMES","MODE_UPPER","MODE_LOWER","MODE_DIGIT","MODE_MIXED","MODE_PUNCT","EMPTY_TOKEN","LATCH_TABLE","static_SHIFT_TABLE","SHIFT_TABLE","State","binaryBytes","latch","latchModeBitCount","thisModeBitCount","deltaBitCount","newModeBitCount","symbols","static_CHAR_MAP","CHAR_MAP","spaceCharCode","pointCharCode","commaCharCode","zUpperCharCode","aUpperCharCode","zLowerCharCode","aLowerCharCode","nineCharCode","zeroCharCode","mixedTable","punctTable","HighLevelEncoder","lineBreakCharCode","states","pairCode","nextChar","charInCurrentTable","stateNoBinary","charInMode","latchState","shiftState","binaryState","digitState","newState","oldState","Encoder$1","data","minECCPercent","userSpecifiedLayers","eccBits","totalSizeBits","totalBitsInLayer","wordSize","usableBitsInLayers","messageBits","messageSizeInWords","modeMessage","aztec","totalBits","totalWords","messageWords","startPad","messageWord","word","AztecWriter","charset","eccPercent","init_operators","MatTabBody_ng_template_2_Template","rf","ctx","_c0","a0","_c1","a1","MatTab_ng_template_0_Template","ɵɵprojection","_c2","_c3","_c4","_c5","_c6","_c7","_c8","_c9","MatTabGroup_div_2_ng_template_6_ng_template_0_Template","MatTabGroup_div_2_ng_template_6_Template","ɵɵtemplate","tab_r4","ɵɵnextContext","ɵɵproperty","MatTabGroup_div_2_ng_template_7_Template","ɵɵtext","ɵɵtextInterpolate","MatTabGroup_div_2_Template","_r14","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","restoredCtx","ɵɵrestoreView","i_r5","ctx_r13","_r0","ɵɵreference","ɵɵresetView","$event","ctx_r15","ɵɵelement","ɵɵtemplateRefExtractor","ɵɵelementEnd","_r6","_r9","ctx_r1","ɵɵclassProp","ɵɵattribute","ɵɵadvance","MatTabGroup_mat_tab_body_5_Template","_r19","ctx_r18","ctx_r20","tab_r16","i_r17","ctx_r3","matTabsAnimations","trigger","state","style","transition","animate","MatTabBodyPortal","_MatTabBodyPortal","CdkPortalOutlet","componentFactoryResolver","viewContainerRef","_host","_document","Subscription","startWith","isCentering","t","ɵɵdirectiveInject","ComponentFactoryResolver$1","ViewContainerRef","forwardRef","MatTabBody","DOCUMENT","ɵɵdefineDirective","ɵɵInheritDefinitionFeature","_MatTabBodyBase","__MatTabBodyBase","position","_elementRef","_dir","changeDetectorRef","Subject","EventEmitter","dir","distinctUntilChanged","x","y","event","origin","ElementRef","Directionality","ChangeDetectorRef","_MatTabBody","elementRef","ɵɵdefineComponent","rf","ctx","ɵɵviewQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵelementStart","ɵɵlistener","$event","ɵɵtemplate","MatTabBody_ng_template_2_Template","ɵɵelementEnd","ɵɵproperty","ɵɵpureFunction2","_c1","ɵɵpureFunction1","_c0","MAT_TAB_CONTENT","InjectionToken","MatTabContent","_MatTabContent","template","TemplateRef","ɵɵProvidersFeature","MAT_TAB_LABEL","MAT_TAB","MatTabLabel","_MatTabLabel","CdkPortal","templateRef","_closestTab","ACTIVE_CLASS","NO_TRANSITION_CLASS","MatInkBar","_items","item","element","correspondingItem","currentItem","clientRect","mixinInkBarItem","base","args","v","newValue","coerceBooleanProperty","previousIndicatorClientRect","currentClientRect","widthDelta","xPosition","documentNode","parentElement","_MatTabLabelWrapperMixinBase","mixinDisabled","_MatTabLabelWrapperBase","__MatTabLabelWrapperBase","elementRef","t","ɵɵdirectiveInject","ElementRef","ɵɵdefineDirective","ɵɵInheritDefinitionFeature","_MatTabLabelWrapperBaseWithInkBarItem","mixinInkBarItem","MatTabLabelWrapper","_MatTabLabelWrapper","ɵMatTabLabelWrapper_BaseFactory","ɵɵgetInheritedFactory","rf","ctx","ɵɵattribute","ɵɵclassProp","_MatTabMixinBase","MAT_TAB_GROUP","InjectionToken","_MatTabBase","__MatTabBase","_viewContainerRef","_closestTabGroup","Subject","changes","TemplatePortal","value","ViewContainerRef","ɵɵviewQuery","TemplateRef","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵNgOnChangesFeature","MatTab","_MatTab","ɵMatTab_BaseFactory","ɵɵdefineComponent","dirIndex","ɵɵcontentQuery","MatTabContent","MatTabLabel","ɵɵProvidersFeature","MAT_TAB","_c2","ɵɵprojectionDef","ɵɵtemplate","MatTab_ng_template_0_Template","passiveEventListenerOptions","normalizePassiveListenerOptions","HEADER_SCROLL_DELAY","HEADER_SCROLL_INTERVAL","MatPaginatedTabHeader","_MatPaginatedTabHeader","coerceBooleanProperty","coerceNumberProperty","_elementRef","_changeDetectorRef","_viewportRuler","_dir","_ngZone","_platform","_animationMode","EventEmitter","fromEvent","takeUntil","dirChange","of","resize","realign","FocusKeyManager","take","merge","newFocusIndex","EMPTY","startWith","switchMap","tabItems","Observable","observer","resizeObserver","entries","item","skip","filter","e","event","hasModifierKey","textContent","index","tabIndex","containerEl","scrollDistance","translateX","direction","viewLength","scrollAmount","labelIndex","selectedLabel","offsetLeft","offsetWidth","labelBeforePos","labelAfterPos","beforeVisiblePos","afterVisiblePos","isEnabled","lengthOfTabList","selectedItem","selectedLabelWrapper","mouseEvent","timer","maxScrollDistance","distance","position","ChangeDetectorRef","ViewportRuler","Directionality","NgZone","Platform","ANIMATION_MODULE_TYPE","_MatTabHeaderBase","__MatTabHeaderBase","changeDetectorRef","viewportRuler","dir","ngZone","platform","animationMode","MatTabHeader","_MatTabHeader","MatInkBar","_c3","_c4","_c5","_c6","_c7","ɵɵelementStart","ɵɵlistener","$event","ɵɵelement","ɵɵelementEnd","ɵɵprojection","ɵɵproperty","ɵɵadvance","MatRipple","CdkObserveContent","MAT_TABS_CONFIG","nextId","_MatTabGroupMixinBase","mixinColor","mixinDisableRipple","_MatTabGroupBase","__MatTabGroupBase","classList","defaultConfig","QueryList","Subscription","indexToSelect","isFirstRun","wrapper","tab","tabs","selectedTab","i","header","MatTabChangeEvent","tabHeight","tabHeader","targetIndex","focusOrigin","MatTabGroup","_MatTabGroup","v","_c8","_c9","MatTabGroup_div_2_Template","MatTabGroup_mat_tab_body_5_Template","NgClass","NgForOf","NgIf","CdkPortalOutlet","CdkMonitorFocus","MatTabBody","MatTabsModule","_MatTabsModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","MatCommonModule","PortalModule","MatRippleModule","ObserversModule","A11yModule","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r3","ctx_r2","ɵɵnextContext","ɵɵresetView","hide","ɵɵelementEnd","PromanWarningComponent","stopPropagation","element","nativeElement","remove","selectors","viewQuery","rf","ctx","ɵɵelement","ɵɵprojection","ɵɵtemplate","PromanWarningComponent_Conditional_6_Template","ɵɵadvance","ɵɵconditional","preventClose","CommonModule","Fa6Module","FaComponent","FlexLayoutModule","DefaultLayoutDirective","DefaultLayoutAlignDirective","DefaultFlexDirective","PromanButtonComponent","styles","_PromanWarningComponent","WarehousesService","constructor","store","QueryExpression","select","getPublicSystemOptions","subscribe","value","systemOptions","corporateChild","namespace","getTableField","name","key","getValue","item","warehouseLocation","warehouse","divider","filter","type","keys","hidden","getAutocompleteConfig","params","label","entity","entityParams","join","searchFields","isNone","getOptionName","string","corporate","Object","assign","orNull","ɵɵinject","Store","QueryExpressionService","factory","ɵfac","providedIn","_WarehousesService","import_lodash","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r4","ctx_r3","ɵɵnextContext","ɵɵresetView","set","ɵɵelementEnd","ɵɵproperty","ctx_r1","printers","length","printer","ɵɵpureFunction0","_c0","_r6","ctx_r5","ctx_r2","templates","template","_c1","ɵɵtemplate","BarcodeComponent_div_0_pro_select_1_Template","BarcodeComponent_div_0_pro_select_2_Template","ɵɵadvance","ctx_r0","BarcodeComponent","constructor","ACL","Entity","LocalStorage","QueryExpression","ParametersOptions","handleData","prop","data","savedId","get","upperFirst","found","console","log","forEach","item","id","parseInt","setData","printerEntity","templateEntity","canView","check","search","entity","entityParams","type","then","response","name","configuration","in","value","ɵɵdirectiveInject","LocalStorageService","QueryExpressionService","ParametersOptionsService","selectors","decls","vars","consts","rf","ctx","BarcodeComponent_div_0_Template","_BarcodeComponent","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r2","ctx_r1","ɵɵnextContext","ɵɵresetView","reprint","ɵɵelementEnd","ɵɵproperty","ɵɵpipeBind1","ProductionContainerCreateDialogComponent","constructor","data","Entity","LocalStorage","UiPrefs","Warehouses","dialogRef","previousContainers","totalQuantity","quantityPerContainer","showCopy","set","property","value","calcQuantityPerContainer","roundNumber","quantity","batchSize","barcodePrinterEntity","get","productContainerEntity","isAutoCloseDialog","UI_CLOSE_AFTER_BARCODE_PRINT","productionProduct","packagingQuantity","productionQuantity","warehouseAutocompleteConfig","getAutocompleteConfig","print","moveToStore","createBatch","printer","barcode_template","id","product","orderProduct","event","warehouseLocation","printLabel","then","response","container","close","printProductContainer","productContainer","map","mapId","setQuantityPerContainer","setContainersQuantity","setAutocloseDialog","setQuantity","setWarehouseLocation","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","LocalStorageService","UiPreferencesService","WarehousesService","MatLegacyDialogRef","selectors","decls","vars","consts","template","rf","ctx","ɵɵelement","$event","ɵɵtext","ɵɵtemplate","ProductionContainerCreateDialogComponent_pro_btn_17_Template","name","ɵɵadvance","ɵɵpureFunction1","_c1","ɵɵpureFunction0","_c0","_c2","_c3","ɵɵtextInterpolate1","_c4","_ProductionContainerCreateDialogComponent","init_operators","extendStyles","dest","source","importantProperties","key","value","toggleNativeDragInteractions","element","enable","userSelect","toggleVisibility","combineTransforms","transform","initialTransform","parseCssTimeUnitsToMs","multiplier","getTransformTransitionDurationInMs","computedStyle","transitionedProperties","parseCssPropertyValue","property","prop","propertyIndex","rawDurations","rawDelays","name","part","getMutableClientRect","clientRect","isInsideClientRect","x","y","top","bottom","left","right","adjustClientRect","isPointerNearClientRect","rect","threshold","pointerX","pointerY","width","height","xThreshold","yThreshold","ParentPositionTracker","_document","elements","event","target","_getEventTarget","cachedPosition","scrollPosition","newTop","newLeft","viewportScrollPosition","topDifference","leftDifference","position","node","deepCloneNode","clone","descendantsWithId","nodeName","i","transferCanvasData","transferInputData","transferData","selector","callback","descendantElements","cloneElements","cloneUniqueId","context","passiveEventListenerOptions","normalizePassiveListenerOptions","activeEventListenerOptions","MOUSE_EVENT_IGNORE_TIME","dragImportantProperties","DragRef","handle","_config","_ngZone","_viewportRuler","_dragDropRegistry","Subject","Subscription","targetHandle","pointerPosition","distanceX","distanceY","isDelayElapsed","container","constrainedPointerPosition","offset","activeTransform","handles","coerceElement","disabledHandles","template","rootElement","boundaryElement","parent","direction","isTouchEvent","dropContainer","placeholder","anchor","shadowRoot","referenceElement","isDragging","isTouchSequence","isAuxiliaryMouseButton","isSyntheticEvent","isFakeEvent","isFakeTouchstartFromScreenReader","isFakeMousedownFromScreenReader","rootStyles","scrollEvent","previewTemplate","currentIndex","distance","isPointerOverContainer","rawX","rawY","newContainer","previewConfig","previewClass","preview","rootRect","viewRef","getRootNode","matchElementSize","getTransform","className","placeholderRect","duration","resolve","handler","timeout","placeholderConfig","placeholderTemplate","elementRect","handleElement","referenceRect","point","svgMatrix","svgPoint","dropContainerLock","pickupX","pickupY","boundaryRect","previewWidth","previewHeight","minY","maxY","minX","maxX","clamp$1","pointerPositionOnPage","delta","positionSinceLastChange","changeX","changeY","shouldEnable","styles","currentPosition","pickupPosition","leftOverflow","rightOverflow","topOverflow","bottomOverflow","scrollDifference","_getShadowRoot","initialParent","previewContainer","documentRef","min","max","rootNodes","wrapper","sourceRect","moveItemInArray","array","fromIndex","toIndex","from","clamp","to","clamp","value","max","SingleAxisSortStrategy","_element","_dragDropRegistry","items","item","pointerX","pointerY","pointerDelta","siblings","newIndex","isHorizontal","currentIndex","currentItem","siblingAtNewPosition","currentPosition","newPosition","delta","itemOffset","siblingOffset","oldOrder","moveItemInArray","sibling","index","isDraggedItem","offset","elementToOffset","combineTransforms","adjustClientRect","isInsideClientRect","activeDraggables","placeholder","newPositionReference","element","coerceElement","predicate","rootElement","initialTransform","p","topDifference","leftDifference","clientRect","drag","elementToMeasure","getMutableClientRect","a","b","immediateSibling","start","end","itemPositions","lastItemRect","firstItemRect","direction","DROP_PROXIMITY_THRESHOLD","SCROLL_PROXIMITY_THRESHOLD","DropListRef","_document","_ngZone","_viewportRuler","Subject","Subscription","interval","animationFrameScheduler","takeUntil","node","scrollStep","ParentPositionTracker","previousIndex","previousContainer","isPointerOverContainer","distance","dropPoint","event","previousItems","connectedTo","orientation","elements","isPointerNearClientRect","result","scrollNode","verticalScrollDirection","horizontalScrollDirection","position","getElementScrollDirections","width","height","getVerticalScrollDirection","getHorizontalScrollDirection","styles","x","y","elementFromPoint","nativeElement","activeSiblings","scrollDifference","shadowRoot","_getShadowRoot","draggedItems","top","bottom","yThreshold","left","right","xThreshold","computedVertical","computedHorizontal","scrollTop","scrollLeft","activeCapturingEventOptions","normalizePassiveListenerOptions","DragDropRegistry","_DragDropRegistry","drop","isTouchEvent","e","config","name","streams","Observable","observer","callback","merge","instance","t","ɵɵinject","NgZone","DOCUMENT","ɵɵdefineInjectable","DEFAULT_CONFIG","DragDrop","_DragDrop","DragRef","ViewportRuler","CDK_DRAG_PARENT","InjectionToken","CDK_DRAG_HANDLE","InjectionToken","CDK_DRAG_PLACEHOLDER","InjectionToken","CDK_DRAG_PREVIEW","InjectionToken","CDK_DRAG_CONFIG","InjectionToken","DRAG_HOST_CLASS","CDK_DROP_LIST","CdkDrag","_CdkDrag","value","element","dropContainer","_document","_ngZone","_viewContainerRef","config","_dir","dragDrop","_changeDetectorRef","_selfHandle","_parentDrag","Subject","EventEmitter","Observable","observer","subscription","map","movedEvent","take","takeUntil","changes","rootSelectorChange","positionChange","index","rootElement","boundary","coerceElement","ref","dir","dragStartDelay","placeholder","preview","coerceNumberProperty","parent","drag","startEvent","releaseEvent","endEvent","enterEvent","exitEvent","dropEvent","lockAxis","constrainPosition","previewClass","boundaryElement","draggingDisabled","rootElementSelector","previewContainer","startWith","tap","handles","childHandleElements","handle","switchMap","merge","item","handleInstance","dragRef","t","ɵɵdirectiveInject","ElementRef","DOCUMENT","NgZone","ViewContainerRef","Directionality","DragDrop","ChangeDetectorRef","CDK_DRAG_HANDLE","CDK_DRAG_PARENT","ɵɵdefineDirective","rf","ctx","dirIndex","ɵɵcontentQuery","CDK_DRAG_PREVIEW","CDK_DRAG_PLACEHOLDER","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵclassProp","booleanAttribute","ɵɵProvidersFeature","ɵɵInputTransformsFeature","ɵɵNgOnChangesFeature","CDK_DROP_LIST_GROUP","_uniqueIdCounter","CdkDropList","_CdkDropList","value","element","dragDrop","_changeDetectorRef","_scrollDispatcher","_dir","_group","config","Subject","EventEmitter","drag","drop","index","item","a","b","ref","startWith","takeUntil","siblings","coerceArray","correspondingDropList","list","scrollableParents","scrollable","coerceNumberProperty","event","dropEvent","merge","lockAxis","draggingDisabled","sortingDisabled","listAutoScrollDisabled","listOrientation","t","ɵɵdirectiveInject","ElementRef","DragDrop","ChangeDetectorRef","ScrollDispatcher","Directionality","CDK_DROP_LIST_GROUP","CDK_DRAG_CONFIG","ɵɵdefineDirective","rf","ctx","ɵɵattribute","ɵɵclassProp","booleanAttribute","ɵɵProvidersFeature","CDK_DROP_LIST","ɵɵInputTransformsFeature","DragDropModule","_DragDropModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","DragDrop","CdkScrollableModule","ArticlesService","constructor","Entity","Dialog","ACL","currentMaterialSummary","BehaviorSubject","displayParents","article","open","TableDialogComponent","header","id","tableId","config","entity","aclRoot","addButton","hideSettings","fields","name","key","state","extraParameters","join","initMaterials","next","addMaterials","materials","item","pushArrays","value","isChild","get","search","then","response","length","canEditArticle","artcle","confirmed","check","ɵɵinject","factory","ɵfac","providedIn","_ArticlesService","ɵɵtext","ɵɵtextInterpolate1","ctx_r6","article","weightUnit","ɵɵelementStart","ɵɵtemplate","ArticleSummaryMaterialsComponent_Conditional_3_Conditional_4_Template","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ɵɵpipeBind2","ctx_r0","id","name","ɵɵconditional","ratio","ɵɵpipeBind1","ɵɵelement","ɵɵtextInterpolate","ctx_r2","totalPrice","ɵɵpipeBind3","material_r12","description","_quantity","netto","materialType","unit","_price","_priceRatio","ɵɵrepeaterCreate","ArticleSummaryMaterialsComponent_Conditional_6_For_1_For_32_Template","ɵɵrepeaterTrackByIndex","mc_r8","ɵɵrepeater","materials","ArticleSummaryMaterialsComponent_Conditional_6_For_1_Template","ctx_r3","materialCategories","materialArticle_r16","quantity","ctx_r15","categories","length","color","ArticleSummaryMaterialsComponent_Conditional_7_For_2_Template","ctx_r4","materialsArticles","sub_r20","child","ctx_r19","coefficientBruttoNetto","ArticleSummaryMaterialsComponent_Conditional_8_For_2_Template","ctx_r5","subproducts","ArticleSummaryMaterialsComponent","constructor","Currencies","Entity","Filter","Articles","ACL","isOther","handleClick","isSubmenu","isHidden","materialEntity","get","getZeroPrice","totalQuantity","ngOnInit","check","search","then","data","__async","rootCategories","localRoot","root","otherCat","translate","material","parent","findById","isDefined","push","index","getIndexById","splice","response","filter","a","optional","totalNettoQuantity","totalBruttoQuantity","forEach","articleMaterial","standardQuantity","cost","standardCost","defaultQuant","unitPrice","amount","ratioBruttoNetto","articleMaterials","finalCoefficient","price","priceRatio","toString","addMaterials","item","ɵɵdirectiveInject","CurrenciesService","FilterService","ArticlesService","selectors","inputs","decls","vars","consts","template","rf","ctx","ɵɵlistener","ArticleSummaryMaterialsComponent_Conditional_3_Template","ArticleSummaryMaterialsComponent_Conditional_4_Template","ArticleSummaryMaterialsComponent_Conditional_5_Template","ArticleSummaryMaterialsComponent_Conditional_6_Template","ArticleSummaryMaterialsComponent_Conditional_7_Template","ArticleSummaryMaterialsComponent_Conditional_8_Template","ɵɵpureFunction1","_c0","_c1","PricePipe","DecimalPipe","TranslatePipe","SrefPipe","styles","_ArticleSummaryMaterialsComponent","ImageComponent","constructor","ImagePath","ngOnChanges","image","imageUrl","getFile","ɵɵdirectiveInject","ImagePathService","selectors","inputs","options","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","ɵɵelement","ɵɵproperty","ɵɵsanitizeUrl","ɵɵpureFunction2","_c0","width","borderRadius","ɵɵpureFunction1","_c1","fit","_ImageComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","error_r9","ɵɵlistener","ɵɵrestoreView","_r13","ctx_r12","ɵɵnextContext","ɵɵresetView","downloadPdfs","ɵɵproperty","ɵɵpipeBind1","ɵɵelement","option_r19","name","ɵɵrepeaterCreate","ArticleSummaryComponent_Conditional_12_For_5_For_2_Template","ɵɵrepeaterTrackByIndex","feature_r15","ɵɵrepeater","options","ArticleSummaryComponent_Conditional_12_For_5_Template","ctx_r2","features","ctx_r3","item","ctx_r4","totalQuantityBrutto","ɵɵsanitizeHtml","totalQuantityNetto","ɵɵpipeBind2","totalPrice","ao_r23","files","ɵɵtextInterpolate1","w_r30","workplace","ArticleSummaryComponent_Conditional_16_For_5_Conditional_12_For_2_Template","articleOperationWorkplaces","ɵɵtemplate","ArticleSummaryComponent_Conditional_16_For_5_Conditional_2_Template","ArticleSummaryComponent_Conditional_16_For_5_Conditional_12_Template","ɵɵconditional","ɵɵpureFunction2","_c0","article","id","operation","_c1","standardCost","toString","ctx_r22","defaultCurrency","technicalDescription","length","ArticleSummaryComponent_Conditional_16_For_5_Template","ctx_r5","operations","standardOperationsCost","ɵɵpureFunction0","_c2","ctx_r34","photo","ArticleSummaryComponent_Conditional_18_Conditional_1_Template","ctx_r6","description","ctx_r7","articleParameter_r38","_c3","childParameter_r41","parameter","childParameter_r48","_c4","ArticleSummaryComponent_Conditional_20_For_15_For_4_Template","parameterGroup_r44","children","ArticleSummaryComponent_Conditional_20_For_5_Template","ArticleSummaryComponent_Conditional_20_For_12_Template","ArticleSummaryComponent_Conditional_20_For_15_Template","ctx_r8","parameters","parameterGroups","ArticleSummaryComponent","constructor","Entity","Dialog","Articles","Currencies","Cookies","route","FilePreview","Model","ACL","materialCategories","subproducts","allComments","commentsArray","articleOperationId","eventsOfArticleId","pdfArray","print","__async","entityParams","context","templates","get","search","openPdf","template","token","COOKIE_AUTHORIZATION","url","CONFIG","api","window","open","InputDialogComponent","header","variant","mainField","key","type","value","config","entity","then","result","parent","snapshot","data","materialEntity","featureValueEntity","articleProductionParameterEntity","articleOperationEntity","articleEntity","getZeroPrice","currency","ngOnInit","initMaterials","model","isVisible","response","weightUnitOptions","map","__spreadProps","__spreadValues","Promise","all","position","enabledValues","featureId","iter","feature","push","forEach","JSON","parse","errors","o","currentMaterialSummary","subscribe","values","weightBrutto","weightNetto","price","material","unit","materialType","quantity","_quantity","ratioBruttoNetto","articleMaterials","finalCoefficient","addMoney","_price","brutto","netto","Object","keys","toFixed","getCommentsOfArticle","filter","file","extension","download","join","resp","eventOperation2","comments","eventOperation","comm","comment","ɵɵdirectiveInject","ArticlesService","CurrenciesService","CookiesService","ActivatedRoute","FilePreviewService","ModelService","selectors","inputs","decls","vars","consts","rf","ctx","ArticleSummaryComponent_For_2_Template","ArticleSummaryComponent_Conditional_6_Template","$event","update","ArticleSummaryComponent_Conditional_12_Template","ArticleSummaryComponent_Conditional_14_Template","ArticleSummaryComponent_Conditional_15_Template","ArticleSummaryComponent_Conditional_16_Template","ArticleSummaryComponent_Conditional_18_Template","ArticleSummaryComponent_Conditional_19_Template","ArticleSummaryComponent_Conditional_20_Template","erros","_c5","productYield","weightUnit","_c6","_c7","check","_ArticleSummaryComponent","ArticleSummaryDialogComponent","constructor","data","dialogRef","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","MatLegacyDialogRef","selectors","decls","vars","consts","template","rf","ctx","ɵɵelement","ɵɵelementStart","ɵɵelementEnd","ɵɵproperty","item","name","ɵɵadvance","_ArticleSummaryDialogComponent","ParameterDropdownDefinitionComponent","constructor","Entity","Dialog","cd","onChange","EventEmitter","items","getItems","parameterDropdownOptionEntity","search","config","parameter","id","position","then","map","item","value","name","openEdit","handleEdit","findById","markForCheck","get","ngOnInit","onAdd","open","InputDialogComponent","variant","header","data","create","length","onRemove","$event","remove","onUpdate","update","translate","deepCopy","entityEdit","mainField","key","required","afterClosed","subscribe","handleRemove","handleDrop","__async","setTimeout","reposition","ɵɵdirectiveInject","ChangeDetectorRef","selectors","inputs","disabled","outputs","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","ɵɵelementEnd","ɵɵproperty","ɵɵpureFunction0","_c0","_ParameterDropdownDefinitionComponent","ParameterListComponent","constructor","onChange","EventEmitter","items","setItems","JSON","parse","map","item","value","ngOnChanges","changes","currentValue","ngOnInit","handleChanges","$event","emit","stringify","selectors","inputs","config","disabled","outputs","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","ɵɵelementEnd","ɵɵproperty","_ParameterListComponent","_Cropper","Cropper","_Cropper","CROPPER_CSS_ID","CropperDialogComponent","constructor","data","dialogRef","isPreview","cropCanvas","sourceCanvas","left","top","width","height","destCanvas","document","querySelector","style","getContext","drawImage","then","styles","createElement","innerText","cropperCss","head","appendChild","ngOnInit","ngAfterViewInit","container","nativeElement","window","innerHeight","file","handleChange","target","files","_event","event","FR","FileReader","input","fileName","name","addEventListener","evt","image","canvas","getElementById","ctx","onload","naturalHeight","naturalWidth","src","result","initCropper","readAsDataURL","options","crop","detail","x","y","viewMode","aspectRatio","NaN","initialAspectRatio","cropper","togglePreview","setTimeout","scrollIntoView","behavior","close","confirm","base64Canvas","toDataURL","fileFromBase64","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","MatLegacyDialogRef","selectors","viewQuery","rf","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵelement","ɵɵlistener","$event","ɵɵadvance","ɵɵtextInterpolate","ɵɵpipeBind1","ɵɵproperty","ɵɵpureFunction1","_c1","CommonModule","NgClass","MatLegacyDialogModule","MatLegacyDialogClose","MatLegacyDialogTitle","MatLegacyDialogContent","MatLegacyDialogActions","PromanButtonComponent","Fa6Module","FlexModule","DefaultLayoutDirective","DefaultLayoutAlignDirective","TranslatePipe","_CropperDialogComponent","PromanFilesManagerRestrictionsDialogComponent","constructor","data","dialogRef","file","__spreadValues","confirm","createForm","close","times","accessibleTimes","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","MatLegacyDialogRef","selectors","standalone","features","ɵɵStandaloneFeature","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r1","_r0","ɵɵreference","ɵɵresetView","ɵɵelement","$event","ɵɵelementEnd","accessibleUntil","ɵɵproperty","form","ɵɵadvance","ɵɵpureFunction0","_c0","_c1","valid","CommonModule","ReactiveFormsModule","ɵNgNoValidate","NgControlStatusGroup","FormGroupDirective","DialogTitleComponent","DialogActionsComponent","PromanTextSimpleComponent","PromanDateTimeModule","PromanDatepickerComponent","FlexLayoutModule","DefaultLayoutDirective","MatLegacyDialogModule","MatLegacyDialogContent","encapsulation","_PromanFilesManagerRestrictionsDialogComponent","PromanFilesManagerEditNameDialogComponent","constructor","data","dialogRef","form","UntypedFormGroup","file","confirm","close","name","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","MatLegacyDialogRef","selectors","standalone","features","ɵɵStandaloneFeature","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","ɵɵelement","$event","ɵɵelementEnd","ɵɵproperty","ɵɵadvance","ɵɵpureFunction0","_c0","id","_c1","extension","_c2","createdAt","_c3","valid","CommonModule","ReactiveFormsModule","ɵNgNoValidate","NgControlStatusGroup","FormGroupDirective","DialogTitleComponent","DialogActionsComponent","PromanTextSimpleComponent","PromanDateTimeModule","PromanDatepickerComponent","FlexLayoutModule","DefaultLayoutDirective","MatLegacyDialogModule","MatLegacyDialogContent","encapsulation","_PromanFilesManagerEditNameDialogComponent","PromanSimpleConfirmDialogComponent","constructor","data","dialogRef","confirm","set","parameter","value","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","MatLegacyDialogRef","selectors","standalone","features","ɵɵStandaloneFeature","decls","vars","consts","template","rf","ctx","ɵɵelement","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵlistener","close","ɵɵproperty","header","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","question","MatLegacyDialogModule","MatLegacyDialogContent","FlexLayoutModule","TranslatePipe","PromanButtonComponent","DialogTitleComponent","DialogActionsComponent","encapsulation","_PromanSimpleConfirmDialogComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ɵɵpipeBind1","ɵɵlistener","ɵɵrestoreView","_r9","ctx_r8","ɵɵnextContext","ɵɵresetView","showDialog","ɵɵproperty","_r11","ctx_r10","addFileById","ɵɵtextInterpolate1","ɵɵelement","file_r13","ɵɵtextInterpolate2","createdBy","name","ɵɵtextInterpolate3","accessibleTimes","accessibleUntil","ɵɵtemplate","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Conditional_12_Conditional_1_Template","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Conditional_12_Conditional_2_Template","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Conditional_12_Conditional_3_Template","ɵɵconditional","$event","_r37","$implicit","ctx_r35","toggleProductionFiles","selected","_r41","ctx_r39","callOcr","_r44","ctx_r42","copyFileUrl","_r47","ctx_r45","setPreviewFile","_r50","ctx_r48","editFileRestrictions","_r53","ctx_r51","onDownloadPdf","_r56","ctx_r55","$index_r14","$index","ctx_r54","handleRemove","_r59","ctx_r57","editFileName","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Conditional_7_Template","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Conditional_11_Template","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Conditional_12_Template","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Conditional_14_Template","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Conditional_15_Template","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Conditional_16_Template","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Conditional_17_Template","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Conditional_18_Template","ctx_r60","onDownload","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Conditional_21_Template","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Conditional_22_Template","tags","length","createdAt","ctx_r16","production","config","identificationDocument","copyLink","order","previewFile","id","systemOptions","useFileRestriction","useFileRestrictions","canEditFiles","articleTest","onRemove","observers","disabled","modelWithin","noRemove","inArticleOperationsCanDeleteFiles","PromanFilesManagerComponent_Conditional_12_For_2_Conditional_2_Template","ɵɵrepeaterCreate","PromanFilesManagerComponent_Conditional_12_For_2_Template","ɵɵrepeaterTrackByIndex","ɵɵrepeater","ctx_r5","_value","ctx_r7","uploadInstance","progress","PromanFilesManagerComponent","value","files","isArray","constructor","Uploader","UiPrefs","Entity","ImagePath","Dialog","Toast","FilePreview","QueryExpression","store","ACL","EventEmitter","onChange","getProgress","event","loaded","total","uploadProgressCallback","handleDragEnter","preventDefault","showOverlay","handleDragOver","stopPropagation","handleDrop","hideOverlay","dataTransfer","tryResizingUpload","canResizeFile","open","CropperDialogComponent","file","aspectRatio","resizeImageRatio","width","getScreenWidthPercent","disableClose","then","result","uploadFiles","resizeImage","type","includes","init","data","upload","uploaderConfig","handleUploadSuccess","catch","overlayElement","style","setProperty","download","downloadPdf","show","item","push","multiple","emit","get","addAssociation","hiddenOrderFiles","splice","indexOf","update","handlePaste","clipboardData","index","removeCallback","map","PromanSimpleConfirmDialogComponent","question","copyToClipboard","getFile","pop","PromanFilesManagerEditNameDialogComponent","PromanFilesManagerRestrictionsDialogComponent","response","times","date","eqStrict","recognizeIndentificationDocument","newId","isPasteEnabled","UI_CLIPBOARD_PASTE_TARGET","select","getSystemOptions","subscribe","check","ngOnInit","inArticleOperations","sort","a","b","window","location","href","ngOnChanges","changes","ngAfterViewInit","element","nativeElement","document","querySelectorAll","querySelector","body","appendChild","overlayMoved","Dragster","addEventListener","ngOnDestroy","removeEventListener","parentNode","removeChild","ɵɵdirectiveInject","UploaderService","UiPreferencesService","ImagePathService","PromanDialogService","ToastService","FilePreviewService","QueryExpressionService","Store","selectors","viewQuery","rf","ctx","ɵɵNgOnChangesFeature","ɵɵStandaloneFeature","decls","vars","consts","template","PromanFilesManagerComponent_Conditional_3_Template","PromanFilesManagerComponent_Conditional_8_Template","PromanFilesManagerComponent_Conditional_9_Template","PromanFilesManagerComponent_Conditional_11_Template","PromanFilesManagerComponent_Conditional_12_Template","PromanFilesManagerComponent_Conditional_13_Template","PromanFilesManagerComponent_Conditional_14_Template","preventOverlay","label","canAddFileRef","tmp_5_0","CommonModule","FlexLayoutModule","DefaultLayoutDirective","DefaultLayoutAlignDirective","DefaultFlexDirective","PipesModule","DateTimePipe","TranslatePipe","PromanButtonComponent","MatLegacyListModule","MatLegacyList","LabelComponent","PromanThumbnailComponent","PromanCommonComponentsModule","NoRecordsComponent","PromanCheckboxComponent","MatLegacyProgressBarModule","MatLegacyProgressBar","TagsComponent","styles","_PromanFilesManagerComponent","ParameterWorkgroupComponent","constructor","Entity","store","ParametersOptions","cd","Toast","onChange","EventEmitter","select","getSystemOptions","subscribe","value","systemOptions","ngOnInit","config","isDefinition","fooBoo","parameter","pop","name","booFoo","data","JSON","parse","get","search","then","response","findById","id","operationId","options","markForCheck","handleChange","$event","workplaceId","emit","stringify","__async","parsedData","params","articleId","aliasDisplay","nameDisplay","workplace","fullDisplay","alias","selectDisplayFn","production","article","orderProposalProduct","entity","entityParams","articleOperationId","displayFn","translate","workplaces","map","articleOperationWorkplace","iter","length","workgroup","workgroupName","workgroupParameterDisplay","forEach","findByProperty","parseInt","ɵɵdirectiveInject","Store","ParametersOptionsService","ChangeDetectorRef","ToastService","selectors","inputs","disabled","outputs","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","ɵɵelementEnd","ɵɵproperty","_ParameterWorkgroupComponent","FaIcons","ɵɵelement","ɵɵproperty","ctx_r0","value","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ɵɵpipeBind1","ɵɵlistener","icon_r3","ɵɵrestoreView","_r5","$implicit","ctx_r4","ɵɵnextContext","ɵɵresetView","selectIcon","IconSelectComponent","constructor","cd","config","toggled","onChange","EventEmitter","icons","FaIcons","ngOnInit","toggle","isDefined","markForCheck","icon","emit","ɵɵdirectiveInject","ChangeDetectorRef","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","ɵɵtemplate","IconSelectComponent_fa_5_Template","IconSelectComponent_span_6_Template","IconSelectComponent_fa_9_Template","ɵɵtextInterpolate1","label","_IconSelectComponent","ɵɵelement","AccountCategoryTypeBtnComponent","constructor","disabled","config","onChange","EventEmitter","ngOnInit","setData","ngOnChanges","changes","label","value","theme","handleClick","event","emit","selectors","inputs","outputs","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","$event","ɵɵelementEnd","ɵɵtemplate","AccountCategoryTypeBtnComponent_br_1_Template","ɵɵproperty","ɵɵadvance","newLineAfter","_AccountCategoryTypeBtnComponent","AccountingPanelComponent","constructor","disabled","config","groupInput","onChange","EventEmitter","getOptionName","option","keyName","name","set","property","value","emit","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","$event","keyCat1","ɵɵelementEnd","keyType1","keyCat2","keyType2","ɵɵadvance","ɵɵproperty","ɵɵpureFunction5","_c2","label1","required","ɵɵpureFunction0","_c0","_c1","label2","_AccountingPanelComponent","import_jquery","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r4","ctx_r3","ɵɵnextContext","ɵɵresetView","add","ɵɵelementEnd","ɵɵproperty","ɵɵpipeBind1","ctx_r0","disabled","ɵɵelement","ɵɵclassMap","_r22","parameter_r6","$implicit","ctx_r20","update","ctx_r9","form","config","entity","parametersConfigBind","id","reloading","isLocked","_r26","ctx_r24","updateExpression","ɵɵpureFunction0","_c0","expression","parameterFunction","parameter","ctx_r10","hideExpression","disableExpression","_r30","ctx_r28","setupMaterialFilter","type","_r33","ctx_r31","setProperty","isActive","_r37","ctx_r35","handleLock","_r41","ctx_r39","isVisible","_r45","ctx_r43","autoCreated","_r49","ctx_r47","handleForEachBooking","forEachBooking","_r53","ctx_r51","clearValue","ctx_r17","_r56","ctx_r54","removeLayer","ctx_r18","_r59","ctx_r57","goToParameter","ɵɵelementContainerStart","ɵɵtemplate","ParametersComponent_div_4_div_1_ng_container_1_pro_move_handle_1_Template","ParametersComponent_div_4_div_1_ng_container_1_pro_parameter_2_Template","ParametersComponent_div_4_div_1_ng_container_1_pro_expression_expression_3_Template","ParametersComponent_div_4_div_1_ng_container_1_pro_btn_4_Template","ParametersComponent_div_4_div_1_ng_container_1_pro_btn_5_Template","ParametersComponent_div_4_div_1_ng_container_1_pro_btn_6_Template","ParametersComponent_div_4_div_1_ng_container_1_pro_btn_7_Template","ParametersComponent_div_4_div_1_ng_container_1_pro_btn_8_Template","ParametersComponent_div_4_div_1_ng_container_1_pro_btn_9_Template","ParametersComponent_div_4_div_1_ng_container_1_pro_btn_10_Template","ParametersComponent_div_4_div_1_ng_container_1_pro_btn_11_Template","ParametersComponent_div_4_div_1_ng_container_1_pro_btn_12_Template","ɵɵelementContainerEnd","ɵɵadvance","ctx_r7","isMove","_isRerendering","isCustomer","hideFilter","ACL","check","isVisibility","_isForEachOperation","isEraser","removeEnabled","isHyperlink","ParametersComponent_div_4_div_1_ng_container_1_Template","_isVisible","ParametersComponent_div_4_div_1_Template","ctx_r1","dragulaId","parameters","ParametersComponent","constructor","Entity","Dialog","Toast","InlineListService","Dragula","QueryExpression","Parameter","PromanState","store","evaluateParameters","onInit","EventEmitter","onUpdate","addLayerCallback","init","params","fromArticlesTest","join","sort","isProductionParams","position","translate","extraJoin","push","parametersConfig","addLayer","updateChild","setPosition","isMoveGroup","groupActions","article","modelKey","images","showId","model","entityInstance","search","then","response","handleParameters","setParametersConfig","setVisibleParameters","setModelParams","getParametersList","isLoaded","emit","handleUpdate","preventExpressionCheck","checkExpressions","updateFiltered","some","p","filter","observers","length","entityCreate","layer","ids","promise","flatten","remove","swapParameter","getIndexByProperty","parametersList","data","Object","assign","positionData","positionId","positionAt","reposition","property","value","childEntityInstance","allWorkgroupParameters","allEmpty","parameterEntity","WORKGROUP","getWorkgroupParameters","workgroupParameter","item","empty","map","mapId","forEach","get","_parameters","open2","ParameterMaterialFilterSetupDialogComponent","material","width","ParameterMaterialCategoryFilterSetupDialogComponent","materialCategory","afterClosed","subscribe","result","stringResult","JSON","stringify","isDefined","event","isNewTab","ctrlKey","metaKey","to","deleted","setTimeout","in","par","findById","select","getCurrUser","user","Date","valueOf","Math","random","createGroup","moves","el","source","handle","element","$","hasClass","isMovable","parent","invalid","isGroupParameter","subscriberDrag","drag","name","index","slice","call","parentElement","children","indexOf","dragParameter","subscriberDrop","drop","ngOnChanges","changes","timeStamp","isFirstChange","currentValue","previousValue","ngOnDestroy","destroy","unsubscribe","aggregateGroupParameters","currParam","offset","aggregated","iter","items","tmpIds","count","boo","createParameter","key","create","createListParameter","defaultValues","values","ngOnInit","replace","output","rerender","__async","context","eqStrict","singularParameterPresent","productionParameters","pp","show","param","__spreadProps","__spreadValues","closeOnSelect","onSelect","createKey","tmpVal","i","multiple","pop","addCallback","PARAMETER_GROUP","mainField","required","parse","operationId","operation","getParameterConfig","_parameter","parameterChild","parameterGrandchild","ɵɵdirectiveInject","ToastService","DragulaService","QueryExpressionService","ParametersService","PromanStateService","Store","selectors","inputs","outputs","features","ɵɵNgOnChangesFeature","ngContentSelectors","_c2","decls","vars","consts","template","rf","ctx","ParametersComponent_pro_btn_2_Template","ɵɵprojection","ParametersComponent_div_4_Template","ParametersComponent_pro_no_records_5_Template","isAdd","_ParametersComponent","init_operators","_c0","_c1","nextUniqueId","MatRadioChange","source","value","MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR","NG_VALUE_ACCESSOR","forwardRef","MatRadioGroup","MAT_RADIO_GROUP","InjectionToken","MAT_RADIO_DEFAULT_OPTIONS","MAT_RADIO_DEFAULT_OPTIONS_FACTORY","_MatRadioGroupBase","__MatRadioGroupBase","v","newValue","selected","coerceBooleanProperty","_changeDetector","EventEmitter","radio","isAlreadySelected","fn","isDisabled","t","ɵɵdirectiveInject","ChangeDetectorRef","ɵɵdefineDirective","MatRadioButtonBase","_elementRef","_MatRadioButtonMixinBase","mixinDisableRipple","mixinTabIndex","_MatRadioButtonBase","__MatRadioButtonBase","newCheckedState","radioGroup","elementRef","_focusMonitor","_radioDispatcher","animationMode","_providerOverride","tabIndex","coerceNumberProperty","options","origin","id","name","focusOrigin","event","groupValueChanged","group","input","ɵɵinvalidFactory","rf","ctx","ɵɵviewQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵInheritDefinitionFeature","_MatRadioGroup","ɵMatRadioGroup_BaseFactory","ɵɵgetInheritedFactory","dirIndex","ɵɵcontentQuery","MatRadioButton","ɵɵProvidersFeature","_MatRadioButton","ElementRef","FocusMonitor","UniqueSelectionDispatcher","ANIMATION_MODULE_TYPE","ɵɵinjectAttribute","ɵɵdefineComponent","ɵɵlistener","ɵɵattribute","ɵɵclassProp","ɵɵprojectionDef","ɵɵelementStart","$event","ɵɵelementEnd","ɵɵelement","ɵɵprojection","_r0","ɵɵreference","ɵɵadvance","ɵɵproperty","MatRipple","MatRadioModule","_MatRadioModule","ɵɵdefineNgModule","ɵɵdefineInjector","MatCommonModule","CommonModule","MatRippleModule","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ɵɵpipeBind1","ctx_r0","config","label","ɵɵlistener","option_r2","ɵɵrestoreView","_r4","$implicit","ctx_r3","ɵɵnextContext","ɵɵresetView","handleClick","ɵɵproperty","ctx_r1","disabled","isDisabled","ɵɵtextInterpolate1","displayKey","RadioGroupComponent","constructor","onChange","EventEmitter","ngOnInit","tmpVal","findById","options","value","ngOnChanges","changes","findByProperty","currentValue","item","emit","disabledFilter","selectors","inputs","outputs","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","ɵɵtemplate","RadioGroupComponent_pro_label_0_Template","$event","RadioGroupComponent_mat_radio_button_2_Template","_RadioGroupComponent","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r5","ctx_r4","ɵɵnextContext","ɵɵresetView","setSingle","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ctx_r3","entity","children","ɵɵpureFunction0","_c0","disabled","ɵɵtemplate","CorporatePanelComponent_Conditional_0_Conditional_4_Conditional_0_Template","ɵɵconditional","ctx_r1","_r13","namespace_r7","$implicit","ctx_r11","toggleConnect","ctx_r10","ɵɵpureFunction1","_c1","name","getValue","CorporatePanelComponent_Conditional_0_Conditional_5_For_2_Conditional_1_Template","ctx_r6","systemOptions","namespace","_r16","ctx_r15","selectAllNamespace","ɵɵrepeaterCreate","CorporatePanelComponent_Conditional_0_Conditional_5_For_2_Template","ɵɵrepeaterTrackByIndex","ctx_r2","_c2","ɵɵrepeater","ɵɵtext","CorporatePanelComponent_Conditional_0_Conditional_4_Template","CorporatePanelComponent_Conditional_0_Conditional_5_Template","ɵɵtextInterpolate","ɵɵpipeBind1","ctx_r0","config","single","CorporatePanelComponent","constructor","Entity","store","ACL","onSingleChange","EventEmitter","onChange","nameSpace","value","observers","length","emit","namespaceEntity","addAssociation","id","class","removeAssociation","isDefinedNotNull","namespaces","some","child","singleKey","ngOnInit","select","getPublicSystemOptions","subscribe","getNamespaces","pipe","filter","val","findByProperty","get","selectedChildrenArray","setInitial","entityEntity","loadEntity","join","then","findById","forEach","setTimeout","ɵɵdirectiveInject","Store","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","CorporatePanelComponent_Conditional_0_Template","corporate","check","_CorporatePanelComponent","FrontendParametersModule","CommonModule","FlexLayoutModule","InputsModule","DragulaModule","forRoot","PromanSelectComponent","PromanCommonComponentsModule","PromanExpressionModule","SharedDirectivesModule","PipesModule","PromanFilesManagerComponent","PromanParametersModule","templates","component","MonthpickerComponent","ParameterListComponent","SwitchComponent","TimeIntervalComponent","PriceComponent","ParameterDropdownDefinitionComponent","config","groupBy","ParameterWorkgroupComponent","TagsComponent","IconSelectComponent","CorporatePanelComponent","AccountCategoryTypeBtnComponent","noPadding","EmojiComponent","HtmlTxtComponent","AccountingPanelComponent","groupInput","_FrontendParametersModule","ɵɵelementStart","ɵɵlistener","button_r3","ɵɵrestoreView","_r5","$implicit","ctx_r4","ɵɵnextContext","ɵɵresetView","getCallback","ɵɵelementEnd","ɵɵproperty","label","theme","ɵɵelementContainerStart","ɵɵtemplate","RadioInputDialogComponent_ng_container_6_pro_btn_1_Template","ɵɵelementContainerEnd","ɵɵadvance","ctx_r1","data","buttons","RadioInputDialogComponent","constructor","dialogRef","controls","inputData","validators","Validators","required","mainField","key","name","type","config","control","UntypedFormControl","parameters","Object","assign","concat","parameter","item","value","set","debounce","form","UntypedFormGroup","isDefinedNotNull","defaultValue","selections","property","create","createForm","valid","prepareRequest","close","button","callback","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","MatLegacyDialogRef","selectors","decls","vars","consts","template","rf","ctx","_r6","_r0","ɵɵreference","ɵɵelement","$event","RadioInputDialogComponent_ng_container_6_Template","header","ɵɵpureFunction1","_c0","variant","_RadioInputDialogComponent","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r4","ctx_r3","ɵɵnextContext","ɵɵresetView","handleChange","ɵɵelementEnd","ɵɵproperty","ctx_r0","value","ɵɵpureFunction2","_c0","config","description","required","_r6","ctx_r5","ctx_r1","_c1","_r8","ctx_r7","ctx_r2","ɵɵpureFunction3","_c3","ɵɵpureFunction0","_c2","SimpleFormFieldComponent","constructor","onChange","EventEmitter","ngOnInit","default","emit","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","ɵɵelementContainerStart","ɵɵtemplate","SimpleFormFieldComponent_pm_txt_1_Template","SimpleFormFieldComponent_pm_txt_2_Template","SimpleFormFieldComponent_pm_txt_3_Template","ɵɵelementContainerEnd","type","ɵɵadvance","_SimpleFormFieldComponent","ɵɵelementContainerStart","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵelement","ɵɵelementContainerEnd","ɵɵadvance","ɵɵtextInterpolate","ɵɵpipeBind1","ɵɵproperty","ctx_r1","preview","ɵɵsanitizeHtml","ɵɵlistener","$event","ɵɵrestoreView","_r15","value_r8","ɵɵnextContext","$implicit","item_r5","ctx_r13","ɵɵresetView","setElementValue","key","value","ɵɵpureFunction1","_c0","_r20","$index_r6","index","ctx_r18","setActiveIndex","ɵɵtemplate","ElementsBuilderComponent_div_0_div_3_div_4_ng_container_1_div_1_div_3_Template","ctx_r9","getFormattedHTML","activeInput","_r24","ctx_r22","_c1","ctx_r10","getOptions","ElementsBuilderComponent_div_0_div_3_div_4_ng_container_1_div_1_Template","ElementsBuilderComponent_div_0_div_3_div_4_ng_container_1_pro_select_2_Template","ctx_r7","getType","ElementsBuilderComponent_div_0_div_3_div_4_ng_container_1_Template","_r30","ctx_r29","removeElement","ɵɵattribute","_r32","ctx_r31","handleCdkDrop","ElementsBuilderComponent_div_0_div_3_div_4_Template","ctx_r2","elementValues","element_r33","className","ElementsBuilderComponent_div_0_ng_container_2_Template","ElementsBuilderComponent_div_0_div_3_Template","ElementsBuilderComponent_div_0_div_5_Template","ctx_r0","isView","elements","ElementsBuilderComponent","constructor","Entity","cd","onChange","EventEmitter","getElements","elementEntity","list","then","response","item","options","keys","Object","configuration","push","class","config","substring","lastIndexOf","configKey","type","data","optionsKey","id","name","markForCheck","rawElements","Promise","resolve","generateElementsPreview","__async","template","get","render","updateView","requests","forEach","output","observableForkJoin","map","r","toPromise","values","join","ngOnInit","inputElements","length","updateDebounce","debounce","updateElements","splice","request","emit","formatStyle","text","words","split","newHTML","toUpperCase","funcs","funcsNewLine","f","replaceFn","match","offset","string","replace","setTimeout","console","log","container","previousContainer","arraymove","previousIndex","currentIndex","deepCopy","element","default","ɵɵdirectiveInject","ChangeDetectorRef","selectors","inputs","outputs","decls","vars","consts","rf","ctx","ElementsBuilderComponent_div_0_Template","_ElementsBuilderComponent","import_jquery","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ɵɵtext","ɵɵadvance","ɵɵproperty","ɵɵpipeBind1","ɵɵtextInterpolate1","ɵɵlistener","$event","ɵɵrestoreView","_r5","ctx_r4","ɵɵnextContext","ɵɵresetView","deleteFile","ɵɵtemplate","UploadComponent_div_3_pro_btn_3_Template","ctx_r2","file","onRemove","observers","length","UploadComponent","constructor","Uploader","UiPrefs","Dialog","zone","onUpload","EventEmitter","config","uploadDrop","event","isOverlay","stopPropagation","preventDefault","tryResizingUpload","originalEvent","dataTransfer","files","showOverlay","run","hideOverlay","handleFile","response","emit","handlePaste","clipboardData","init","callback","upload","then","canResizeFiles","open","CropperDialogComponent","aspectRatio","resizeImageRatio","width","getScreenWidthPercent","disableClose","result","uploadFiles","data","resizeImage","type","includes","isPasteEnabled","get","UI_CLIPBOARD_PASTE_TARGET","ngOnInit","element","nativeElement","window","Dragster","$","on","handleDragEnter","handleDragOver","document","addEventListener","ngOnDestroy","off","removeEventListener","progress","loaded","total","uploaderSettings","show","ɵɵdirectiveInject","UploaderService","UiPreferencesService","NgZone","selectors","viewQuery","rf","ctx","UploadComponent_div_2_Template","UploadComponent_div_3_Template","ɵɵpureFunction1","_c1","_UploadComponent","UploadEntityPhotoComponent","constructor","Entity","onChange","EventEmitter","ngOnInit","key","config","entityInstance","get","resource","add","response","data","id","value","update","then","tempValue","deepCopy","emit","remove","ɵɵdirectiveInject","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","$event","ɵɵelementEnd","ɵɵproperty","ɵɵpureFunction2","_c0","resizeImageRatio","resizeImage","_UploadEntityPhotoComponent","ProgressBarComponent","constructor","color","mode","value","bufferValue","selectors","inputs","decls","vars","consts","template","rf","ctx","ɵɵelement","ɵɵproperty","_ProgressBarComponent","ToolbarService","constructor","timeStampSubject","Subject","reset","item","title","subtitle","subtitleIcon","actions","actionsEditable","entity","newsFeedEntityType","entityName","tagType","tabs","parentState","parentStateFilter","additionalState","backlink","hideBacklink","hasColor","hasTags","update","next","Date","getTime","factory","ɵfac","providedIn","_ToolbarService","ToolbarDriverComponent","constructor","Toolbar","ngOnInit","props","reset","prop","isDefinedNotNull","update","ngOnChanges","changes","key","isFirstChange","setThing","thing","currentValue","ɵɵdirectiveInject","ToolbarService","selectors","inputs","item","entity","actions","actionsEditable","title","subtitle","subtitleIcon","subtitleWarn","entityName","tagType","parentState","parentStateFilter","additionalState","hideBacklink","timeStamp","hasColor","hasTags","backlink","features","ɵɵNgOnChangesFeature","decls","vars","template","rf","ctx","encapsulation","_ToolbarDriverComponent","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r5","ctx_r4","ɵɵnextContext","ɵɵresetView","handleBack","ɵɵelementEnd","ɵɵproperty","ɵɵpipeBind1","ɵɵtext","ɵɵadvance","ɵɵtextInterpolate1","ctx_r1","headerBrackets","ctx_r6","headerTextSub","ɵɵtemplate","NavigationHeaderComponent_div_9_div_1_Template","ctx_r2","ɵɵelement","ctx_r3","tagItem","ɵɵpureFunction2","_c0","entityName","tagType","NavigationHeaderComponent","constructor","promanState","onAdd","EventEmitter","to","backButton","ɵɵdirectiveInject","PromanStateService","selectors","inputs","headerText","dynamicStatus","hasTags","outputs","ngContentSelectors","_c2","decls","vars","consts","template","rf","ctx","NavigationHeaderComponent_pro_btn_3_Template","NavigationHeaderComponent_span_8_Template","NavigationHeaderComponent_div_9_Template","ɵɵprojection","NavigationHeaderComponent_pro_tags_13_Template","ɵɵtextInterpolate","_NavigationHeaderComponent","ɵɵelementStart","ɵɵlistener","language_r4","ɵɵrestoreView","_r6","$implicit","ctx_r5","ɵɵnextContext","ɵɵresetView","setLanguage","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","ɵɵtextInterpolate","ctx_r3","currLang","LanguageSwitchComponent","constructor","Entity","store","Preferences","preventReload","onChange","EventEmitter","personEntity","get","select","getPublicSystemOptions","subscribe","value","publicSystemOptions","getCurrUser","currUser","ngOnInit","isUser","languages","CONFIG","language","defaultLanguage","handleLanguageChange","lang","emit","window","location","reload","isCustomer","type","update","id","person","then","ɵɵdirectiveInject","Store","PreferencesService","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","ɵɵtemplate","LanguageSwitchComponent_button_2_Template","ɵɵelement","LanguageSwitchComponent_span_5_Template","LanguageSwitchComponent_span_6_Template","ɵɵproperty","_r0","_LanguageSwitchComponent","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r5","ctx_r4","ɵɵnextContext","ɵɵresetView","handleError","ɵɵelementEnd","ɵɵproperty","ɵɵpipeBind1","ctx_r0","thumb","ɵɵsanitizeUrl","_r9","ctx_r8","ctx_r6","placeholderUrl","ɵɵtemplate","UserThumbComponent_Conditional_2_Conditional_0_Template","ɵɵconditional","ctx_r1","isUserThumb","ɵɵelement","DEFAULT_USER_PLACEHOLDER","PROMAN_LOGO_PLACEHOLDER","SMARTON_LOGO_PLACEHOLDER","LOCALHOST_LOGO_PLACEHOLDER","UserThumbComponent","constructor","isProman","isSmarton","isLocal","isLocalhost","getPlaceHolder","ngOnInit","error","target","src","selectors","viewQuery","rf","ctx","UserThumbComponent_Conditional_1_Template","UserThumbComponent_Conditional_2_Template","UserThumbComponent_Conditional_3_Template","ɵɵadvance","_UserThumbComponent","ɵɵelement","ɵɵproperty","ɵɵpureFunction1","_c2","item_r6","internal","ɵɵelementStart","ɵɵelementEnd","file","ɵɵlistener","ɵɵrestoreView","_r23","ɵɵnextContext","$implicit","ctx_r21","ɵɵresetView","handleReply","ɵɵtext","ɵɵadvance","ɵɵtextInterpolate2","ɵɵpipeBind1","updatedAt","ɵɵtextInterpolate","createdAt","_r28","ctx_r26","setInternal","replyTo","ɵɵsanitizeHtml","content","commit_link","ɵɵsanitizeUrl","ɵɵtextInterpolate1","message","_r34","ctx_r33","$last_r7","last","ctx_r32","handleMessageClick","type","isPreview","preview","ɵɵtemplate","TimelineChatComponent_div_5_Case_3_Template","TimelineChatComponent_div_5_Case_4_Template","TimelineChatComponent_div_5_Case_5_Template","TimelineChatComponent_div_5_Conditional_6_Template","ɵɵelementContainer","TimelineChatComponent_div_5_Conditional_12_Template","TimelineChatComponent_div_5_Case_13_Template","TimelineChatComponent_div_5_Case_14_Template","_r37","ctx_r36","editMessage","TimelineChatComponent_div_5_Conditional_18_Template","ctx_r38","deleteMessage","TimelineChatComponent_div_5_Conditional_21_Template","TimelineChatComponent_div_5_Case_22_Template","TimelineChatComponent_div_5_Case_23_Template","ɵɵconditional","TimelineChatComponent_div_5_contFlowTmp","author","_r5","_c3","isEdited","isEditMode","ctx_r1","currUser","isEmployee","internalMode","_r40","ctx_r39","cancelReply","ctx_r2","reaction_r45","_r50","item_r41","item","ctx_r48","handleReaction","reaction_r51","users","length","TimelineChatComponent_ng_template_12_For_5_Conditional_2_Template","icon","_c4","isMyReaction","TimelineChatComponent_ng_template_12_Conditional_0_Template","ɵɵrepeaterCreate","TimelineChatComponent_ng_template_12_For_3_Template","ɵɵrepeaterTrackByIndex","TimelineChatComponent_ng_template_12_For_5_Template","reactions","_c5","ctx_r4","messageReactions","ɵɵrepeater","REACTIONS","TimelineChatComponent","constructor","Entity","Filter","store","newMessage","history","pending","sendSuccess","setMessage","loadHistory","userId","id","toString","timelineEntity","formatted","params","then","response","map","maxLength","filter","react","forEach","includes","newId","setScrollPosition","select","getCurrUser","subscribe","value","get","name","timelineMsgEntity","ngOnChanges","changes","entity","firstChange","ngAfterViewInit","entityType","entityId","Object","assign","toggleEditMode","element","nativeElement","editableMessage","querySelector","focus","blur","remove","update","send","secondaryCheck","__async","setTimeout","create","catch","messagesContainerElement","document","querySelectorAll","scrollTop","scrollHeight","isLast","isMyMessage","author_id","person","reactionIcon","hasMyReaction","find","_reaction","hasThisReaction","match","removeReaction","_icon","_reac","_userId","addReaction","thisReaction","findByProperty","push","_react","console","log","ɵɵdirectiveInject","FilterService","Store","selectors","viewQuery","rf","ctx","TimelineChatComponent_div_5_Template","TimelineChatComponent_Conditional_6_Template","$event","TimelineChatComponent_ng_template_12_Template","ɵɵtemplateRefExtractor","ɵɵpureFunction0","_c6","_TimelineChatComponent","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r5","ctx_r4","ɵɵnextContext","ɵɵresetView","searchContacts","ctx_r6","setContact","ɵɵelementEnd","ctx_r7","cancelAddContact","ɵɵadvance","ɵɵproperty","ɵɵpureFunction0","_c0","ctx_r0","contact","options","ɵɵpipeBind1","ɵɵtext","ɵɵtextInterpolate","ctx_r8","config","label","_r11","ctx_r10","addContact","ɵɵtemplate","ContactsManagerComponent_Conditional_3_Conditional_1_Template","ContactsManagerComponent_Conditional_3_Conditional_2_Template","ɵɵconditional","ctx_r1","disabled","ɵɵelement","contact_r12","photo","ɵɵtextInterpolate1","customer","alias","ContactsManagerComponent_For_7_Conditional_5_Conditional_2_Template","name","endsWith","phone","email","ContactsManagerComponent_For_7_Conditional_6_Conditional_1_Template","ContactsManagerComponent_For_7_Conditional_6_Conditional_2_Template","_r33","$implicit","ctx_r31","handleNotification","notified","_r37","ctx_r35","goToEmployee","_r40","ctx_r38","removeContact","ContactsManagerComponent_For_7_Conditional_3_Template","ContactsManagerComponent_For_7_Conditional_4_Template","ContactsManagerComponent_For_7_Conditional_5_Template","ContactsManagerComponent_For_7_Conditional_6_Template","ContactsManagerComponent_For_7_Conditional_8_Template","ContactsManagerComponent_For_7_Conditional_9_Template","ContactsManagerComponent_For_7_Conditional_10_Template","ctx_r2","entity","entityType","hasLink","ContactsManagerComponent","constructor","promanState","Entity","QueryExpressionService","ParametersOptions","QueryExpression","onChange","EventEmitter","onAdd","onRemove","person","_customerEmployee","to","employeeId","id","customerId","_employee","getEmployeeData","ids","localValue","map","mapId","length","Promise","all","search","entityParams","in","join","then","values","forEach","item","ngOnInit","searchEntity","SearchEntity","get","mainEntity","setLocalValue","value","ngOnChanges","changes","currentValue","handleAddContact","__async","setTimeout","isAddContactMode","postRequest","push","addItem","observers","emit","result","emitMapped","data","Object","assign","mainParams","isCreate","key","addAssociation","removeItem","removeKey","removeAssociation","handleRemoveContact","removeByProperty","getUsedIds","items","output","query","usedIds","params","notIn","searchParams","onSearch","sendNotification","ɵɵdirectiveInject","PromanStateService","ParametersOptionsService","selectors","inputs","outputs","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","ContactsManagerComponent_Conditional_2_Template","ContactsManagerComponent_Conditional_3_Template","ɵɵrepeaterCreate","ContactsManagerComponent_For_7_Template","ɵɵrepeaterTrackByIndex","ContactsManagerComponent_ForEmpty_8_Template","ɵɵrepeater","_ContactsManagerComponent","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ɵɵpipeBind1","ctx_r0","user","skype","ɵɵsanitizeUrl","UserContactsCardComponent","constructor","selectors","inputs","decls","vars","consts","template","rf","ctx","ɵɵtext","ɵɵtemplate","UserContactsCardComponent_pro_editable_container_14_Template","photo","ɵɵtextInterpolate","name","email","ɵɵpropertyInterpolate1","phone","_UserContactsCardComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵproperty","ctx_r1","key","ɵɵadvance","ɵɵtextInterpolate1","item","name","ɵɵtemplate","UpdateDataComponent_div_0_pro_editable_container_4_Template","ctx_r0","ɵɵpipeBind1","UpdateDataComponent","constructor","selectors","inputs","decls","vars","consts","template","rf","ctx","UpdateDataComponent_div_0_Template","_UpdateDataComponent","SIDENAV_CLASS","BottomToolbarComponent","constructor","Observables","positionStatic","layout","subject","subscribe","setPosition","ngOnInit","element","elementRef","nativeElement","wrapperEl","parentNode","render","ngOnDestroy","remove","parentElement","document","querySelector","setTimeout","style","marginBottom","offsetHeight","insertBefore","sidenavElement","window","innerWidth","left","offsetWidth","onResize","event","ɵɵdirectiveInject","ObservablesService","selectors","viewQuery","rf","ctx","$event","ɵɵresolveWindow","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","ɵɵproperty","_BottomToolbarComponent","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r6","action_r2","ɵɵnextContext","$implicit","ɵɵresetView","callback","ɵɵelementEnd","ɵɵproperty","icon","theme","ɵɵelementContainerStart","ɵɵtemplate","ActionsComponent_div_0_ng_container_1_pro_btn_1_Template","ɵɵelementContainerEnd","ɵɵadvance","isVisible","ActionsComponent_div_0_ng_container_1_Template","ctx_r0","actions","ActionsComponent","constructor","ngOnChanges","action","selectors","inputs","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","ActionsComponent_div_0_Template","length","_ActionsComponent","FrameComponent","constructor","selectors","ngContentSelectors","_c0","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","_FrameComponent","ContentComponent","constructor","height","selectors","inputs","ngContentSelectors","_c1","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","ɵɵproperty","ɵɵpureFunction1","_c0","_ContentComponent","_c0","MatProgressSpinner_ng_template_0_Template","rf","ctx","ɵɵnamespaceSVG","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ctx_r0","ɵɵnextContext","ɵɵattribute","ɵɵadvance","ɵɵstyleProp","_MatProgressSpinnerBase","mixinColor","_elementRef","MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS","InjectionToken","MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY","BASE_SIZE","BASE_STROKE_WIDTH","MatProgressSpinner","_MatProgressSpinner","elementRef","animationMode","defaults","v","coerceNumberProperty","size","value","viewBox","t","ɵɵdirectiveInject","ElementRef","ANIMATION_MODULE_TYPE","ɵɵdefineComponent","ɵɵviewQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵclassProp","ɵɵInheritDefinitionFeature","ɵɵtemplate","ɵɵtemplateRefExtractor","ɵɵnamespaceHTML","ɵɵelementContainer","_r1","ɵɵreference","ɵɵproperty","NgTemplateOutlet","MatProgressSpinnerModule","_MatProgressSpinnerModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","MatCommonModule","UpdateComponent","constructor","Request","cd","refresh","reload","setTimeout","get","CONFIG","root","then","response","deploy","window","location","catch","markForCheck","ngOnInit","ɵɵdirectiveInject","RequestService","ChangeDetectorRef","selectors","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","_UpdateComponent","import_moment","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r3","ctx_r2","ɵɵnextContext","ɵɵresetView","model","addFile","ctx_r4","removeFile","ɵɵelementEnd","ɵɵproperty","ɵɵpureFunction0","_c0","ctx_r0","item","files","ɵɵelement","ctx_r1","STATUSES","ConsumerBookingDialogComponent","constructor","data","Entity","Filter","Model","DynamicFields","dialogRef","duration","durationData","days","hours","minutes","startTimeData","dayValues","hoursValues","minutesValues","setEnd","set","parseTimeUtc","moment","start","add","subtract","utcOffset","format","consumerBookingEntity","get","statusOptions","map","mapOptionTranslate","translate","hoursOptions","mapOption","daysOptions","minutesOptions","id","end","diff","asSeconds","startTime","startOf","status","calculateTimeOptions","calculateDurationOptions","property","value","update","prepareRequest","twoDigit","durationInSeconds","day","Math","floor","hour","seconds","setDuration","create","then","response","__async","result","requests","dynamicFieldsData","forEach","push","createFieldValue","Object","assign","entityId","Promise","all","close","catch","handleDynamicFields","dynamicFieldsValid","isValid","values","setStartTimeData","date","startValue","utc","setDurationData","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","FilterService","ModelService","DynamicFieldsService","MatLegacyDialogRef","selectors","decls","vars","consts","template","rf","ctx","ɵɵtext","ɵɵtemplate","ConsumerBookingDialogComponent_pro_files_manager_40_Template","ConsumerBookingDialogComponent_pm_loose_relation_41_Template","ɵɵadvance","orderConsumer","_c1","_c2","_c3","_c4","_c5","_c6","ɵɵtextInterpolate","ɵɵpipeBind1","email","ɵɵpureFunction1","_c8","_c7","phone","_c9","sum","_c10","numberOfVisitors","_c11","comments","_c12","_ConsumerBookingDialogComponent","ENTITY_TO_STATE","sale_opportunity","development_project","order","employee","production","workplace","purchase","sale_event","ENTITY_TABLE_STATE","entity","table","state","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r5","ctx_r4","ɵɵnextContext","ɵɵresetView","handleAdd","ɵɵelementEnd","ɵɵproperty","ɵɵpipeBind1","ɵɵelement","ɵɵtext","relation_r6","_r8","$implicit","ctx_r7","handleRelationClick","ctx_r9","removeRelation","ɵɵadvance","ɵɵpureFunction1","_c0","b","_name","style","looseRelationType","icon","ɵɵtextInterpolate1","_relation","ɵɵtextInterpolate2","ɵɵpipeBind2","id","entityName","ɵɵtemplate","LooseRelationComponent_div_0_pro_btn_5_Template","LooseRelationComponent_div_0_div_7_Template","LooseRelationComponent_div_0_pro_no_records_8_Template","ctx_r0","disabled","relations","length","STATES","sale_opportunity","name","key","order","production","article","development_project","article_test","consumer_booking","nameKey","dialog","ConsumerBookingDialogComponent","extraGet","join","order_proposal","sale_event","LooseRelationComponent","constructor","cd","ACL","Dialog","Entity","Filter","InlineList","PromanState","store","QueryExpression","ParametersOptions","UiPrefs","_inited","getOptions","entity","getSearchRequest","query","searchRequest","search","limit","comment","start","check","item","customer","systemOptions","projectsRelationsSameCustomer","get","then","response","forEach","looseRelationEntity","select","getSystemOptions","subscribe","value","ngOnChanges","ngOnInit","getRelations","tableName","entityId","fromState","fromTableName","fromParams","fromEntityId","toState","toTableName","toParams","toEntityId","from","parseInt","params","color","a","entityParams","markForCheck","catch","defaultVal","data","translate","push","isSmarton","show","event","closeOnSelect","onSelect","open","InputDialogComponent","mainField","type","config","parameters","header","variant","width","result","object","create","remove","relation","__async","state","ENTITY_TO_STATE","isNewTab","ctrlKey","metaKey","to","Object","assign","open2","disableAutoFocus","set","ɵɵdirectiveInject","ChangeDetectorRef","FilterService","InlineListService","PromanStateService","Store","QueryExpressionService","ParametersOptionsService","UiPreferencesService","selectors","inputs","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","LooseRelationComponent_div_0_Template","_LooseRelationComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","e_r1","ErrorsComponent","constructor","cd","ngOnInit","ngOnChanges","handleErrors","markForCheck","errorValues","key","errors","error","push","code","value","join","message","ɵɵdirectiveInject","ChangeDetectorRef","selectors","inputs","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","ɵɵrepeaterCreate","ErrorsComponent_For_1_Template","ɵɵrepeaterTrackByIndex","ɵɵrepeater","_ErrorsComponent","init_operators","BugTrackerDialogComponent","constructor","data","Entity","store","dialogRef","form","UntypedFormGroup","bugTrackerEntity","get","select","getCurrUser","pipe","filter","value","subscribe","currUser","message","person","id","screenshot","url","comment","set","property","confirm","postRequest","then","close","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","Store","MatLegacyDialogRef","selectors","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","ɵɵelement","ɵɵtext","ɵɵelementEnd","$event","ɵɵproperty","ɵɵadvance","ɵɵsanitizeUrl","ɵɵtextInterpolate","ɵɵpipeBind1","ɵɵtextInterpolate1","ɵɵpureFunction0","_c0","_BugTrackerDialogComponent","TreeSelectComponent","constructor","config","onChange","EventEmitter","ngOnInit","tmpVal","getTmpValue","value","options","disabled","ngOnChanges","changes","isFirstChange","currentValue","tmpOptions","tmpValue","findById","selectors","inputs","outputs","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵlistener","$event","emit","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","label","ɵɵproperty","ɵɵpureFunction0","_c0","_TreeSelectComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate2","ctx_r1","category","id","name","ɵɵlistener","$event","ɵɵrestoreView","_r5","ctx_r4","ɵɵnextContext","ɵɵresetView","handleToggle","ɵɵproperty","ɵɵpureFunction1","_c0","ctx_r2","isEnabled","isEditMode","_r9","ctx_r8","field","value","_category_r7","ctx_r6","ɵɵtemplate","EntityParentCategoryRecursiveComponent_div_0_div_4_div_1_Template","ctx_r3","__children","EntityParentCategoryRecursiveComponent_div_0_div_2_Template","EntityParentCategoryRecursiveComponent_div_0_div_3_Template","EntityParentCategoryRecursiveComponent_div_0_div_4_Template","ctx_r0","length","EntityParentCategoryRecursiveComponent","constructor","toggle","EventEmitter","emit","ngOnInit","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","EntityParentCategoryRecursiveComponent_div_0_Template","isActiveParent","styles","_EntityParentCategoryRecursiveComponent","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r3","ctx_r2","ɵɵnextContext","ɵɵresetView","toggleEditMode","ɵɵelementEnd","ɵɵproperty","ɵɵpipeBind1","$event","_r6","ctx_r5","toggle","field","category","value","ɵɵadvance","category_r4","ctx_r1","isEditMode","EntityParentCategoriesComponent","constructor","Entity","Model","getEnabled","categories","selectedCategoriesIds","parent","root","t","__children","length","indexOf","id","isEnabled","isActiveParent","enableAllParents","added","model","ngOnInit","entity","get","name","entityName","entityCategoryEntity","treeParams","Object","assign","tree","entityParams","categoryParams","Promise","all","search","then","response","categoriesTree","selectedCategories","flatten","ɵɵdirectiveInject","ModelService","selectors","inputs","disabled","decls","vars","consts","template","rf","ctx","ɵɵtemplate","EntityParentCategoriesComponent_pro_btn_1_Template","EntityParentCategoriesComponent_div_2_Template","_EntityParentCategoriesComponent","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r5","ctx_r4","ɵɵnextContext","ɵɵresetView","onToggle","emit","ɵɵelementEnd","ɵɵproperty","_category_r3","ctx_r2","isEditMode","ɵɵtemplate","CategoryRecursiveComponent_div_0_div_4_pm_category_recursive_1_Template","ɵɵadvance","ctx_r1","category","children","_r7","ctx_r6","type","field","value","CategoryRecursiveComponent_div_0_div_4_Template","ɵɵpureFunction1","_c0","ctx_r0","name","isEnabled","length","CategoryRecursiveComponent","constructor","EventEmitter","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","CategoryRecursiveComponent_div_0_Template","isActiveParent","styles","_CategoryRecursiveComponent","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r2","ctx_r1","ɵɵnextContext","ɵɵresetView","set","ɵɵelementEnd","ctx_r3","ctx_r4","ɵɵadvance","ɵɵproperty","ctx_r0","category","keyName","ɵɵpureFunction1","_c2","_c1","_c0","entityName","description","ɵɵpureFunction0","_c3","type","_c4","typeOptions","CreateCategoryDialogComponent","constructor","data","Entity","Toast","Filter","dialogRef","property","value","setEntity","entity","setTimeout","getMetadataFields","confirm","prepareRequest","rootParent","parent","root","id","pop","handleMaterialCategoryParams","create","then","response","close","loadCategories","params","_treeSort","search","parents","map","name","getOptionName","option","get","customizedRequest","metadataOptions","Object","keys","translate","push","treeSelectConfig","label","disabled","isNone","mapOptionTranslate","entityField","setHeader","stock","inventory","MATERIAL_STOCK","INVENTORY","MATERIAL","header","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","ToastService","FilterService","MatLegacyDialogRef","selectors","decls","vars","consts","template","rf","ctx","ɵɵelement","ɵɵtemplate","CreateCategoryDialogComponent_div_4_Template","_c5","_CreateCategoryDialogComponent","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r3","ctx_r2","ɵɵnextContext","ɵɵresetView","role","ɵɵelementEnd","ɵɵproperty","ctx_r0","name","ɵɵpureFunction1","_c1","ɵɵpureFunction0","_c0","_r5","ctx_r4","parts","ctx_r6","ctx_r7","ctx_r8","ɵɵadvance","tmp_0_0","ctx_r1","undefined","_c2","salaryParts","tmp_3_0","tmp_6_0","tmp_9_0","CreateTaxTypeDialogComponent","constructor","data","Entity","Filter","dialogRef","typeDbit","typeCrdt","taxesTypesOptions","mode","ready","confirm","taxTypesEntityInterface","create","accountCategoryDbit","accCatDbit","id","accountCategoryCrdt","accCatCrdt","type","then","response","close","save","update","item","getCategoryName","cat","keyName","i","get","taxEntityInterface","getTaxTypesList","Object","values","forEach","push","translate","console","log","findById","getSalaryParts","salaryPartsOptions","keys","part","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","FilterService","MatLegacyDialogRef","selectors","decls","vars","consts","template","rf","ctx","ɵɵelement","ɵɵtemplate","CreateTaxTypeDialogComponent_pro_autoc_5_Template","CreateTaxTypeDialogComponent_div_11_Template","_c5","_c4","_c3","_c6","ɵɵpureFunction2","_c8","_c7","_c9","_CreateTaxTypeDialogComponent","init_operators","ProductsService","constructor","Entity","Filter","PromanState","Warehouses","store","getExtraParameters","resourcesConfig","params","extraParameters","getNew","customerAlias","name","getName","quantity","getEntity","productEntity","getStorageInfo","id","get","search","then","response","map","productionProduct","order","orderProduct","orderId","orderName","orderNumber","number","customerName","customer","packagedQuantity","date","production","deadline","getPackageName","item","material","quantName","getPackageValue","row","package","getFields","currUser","bookkeepingUser","key","formatter","hidden","getValue","weight","article","weightUnit","filter","type","value","userValueExpiry","stats","getTableField","vat","percentage","keys","formatterConfig","acl","product","suppliers","category","join","state","categories","getOrders","sort","maxLength","result","orderProducts","forEach","oP","push","uniq","translate","oProduct","extraJoins","preloadParametersData","warehouseLocation","warehouse","systemOptions","defaultDecimalPlacesProductWeight","storedQuantity","capacity","extent","isDefinedNotNull","comments","removeHtmlTags","customerComments","select","getSystemOptions","subscribe","getCurrUser","pipe","val","articleCode","rowData","evaluatePackageQuantity","packagingQuantity","data","evaluateProductQuantity","productQuantity","ɵɵinject","FilterService","PromanStateService","WarehousesService","Store","factory","ɵfac","_ProductsService","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ɵɵpipeBind2","record_r1","orderId","ɵɵtextInterpolate2","orderNumber","orderName","ɵɵtextInterpolate","customerName","ɵɵpipeBind1","date","quantity","ProductStorageInfoDialogComponent","constructor","data","productService","dialogRef","getStorageInfo","product","id","then","response","info","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","ProductsService","MatLegacyDialogRef","selectors","decls","vars","consts","template","rf","ctx","ɵɵelement","ɵɵtemplate","ProductStorageInfoDialogComponent_tr_19_Template","name","_ProductStorageInfoDialogComponent","ɵɵelementContainerStart","ɵɵelement","ɵɵelementContainerEnd","ɵɵadvance","ɵɵproperty","ctx_r0","tableConfig","tablePayload","tableTimeStamp","ProductsTableComponent","constructor","ACL","Dialog","header","onRemove","EventEmitter","onEditPackagedQuantity","onEditRequiredPackaging","onEditRequiredQuantity","isProductionProduct","data","total","refresh","Date","getTime","onRemoveCallback","product","emit","onEditRequiredQuantityCallback","requiredQuantity","onEditRequiredPackagingCallback","requiredPackaging","onEditPackagedQuantityCallback","packagedQuantity","showStorageInfoCallback","orderProduct","open2","ProductStorageInfoDialogComponent","updateButtons","removeAction","rowButtons","showStorageInfo","push","icon","tooltip","callback","state","observers","length","label","action","theme","actionButtons","event","acl","productionProduct","open","ProductionContainerCreateDialogComponent","then","__spreadValues","initFields","fields","name","key","sortable","filter","check","id","showParameters","formatter","showRequiredQuantity","stats","editRequiredQuantity","showPackagedQuantity","editPackagedQuantity","showStoredQuantity","handleProducts","products","ngOnInit","hideSettings","multiselect","headerState","aclRoot","preventFixedHeader","transform","parameters","storedQuantity","packagingQuantity","quantity","productionQuantity","parentOrderProduct","Error","_name","_requiredQuantity","_storedQuantity","_packagedQuantity","_packagingQuantity","ngOnChanges","changes","topButtons","Array","isArray","currentValue","previousValue","ɵɵdirectiveInject","selectors","inputs","removeProducts","outputs","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","ɵɵtemplate","ProductsTableComponent_ng_container_0_Template","_ProductsTableComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","ctx_r1","config","label","ɵɵelement","ɵɵproperty","orderParameter_r5","productionParameter_r6","ɵɵpureFunction1","_c0","parameter","name","ɵɵtextInterpolate","child_r12","child_r15","ɵɵpureFunction0","_c1","ɵɵtemplate","EventParametersComponent_div_0_div_4_table_1_tr_8_td_3_Template","_c2","layer_r13","id","ctx_r11","event","segmentParameter","children","EventParametersComponent_div_0_div_4_table_1_th_6_Template","EventParametersComponent_div_0_div_4_table_1_tr_8_Template","group_r9","metaParameters","ɵɵpipeBind2","parameters","EventParametersComponent_div_0_div_4_table_1_Template","ctx_r4","productionGroups","EventParametersComponent_div_0_pro_label_1_Template","EventParametersComponent_div_0_pm_parameter_view_2_Template","EventParametersComponent_div_0_pm_parameter_view_3_Template","EventParametersComponent_div_0_div_4_Template","ctx_r0","orderParameters","length","productionParameters","EventParametersComponent","constructor","ACL","canShow","check","ngOnChanges","changes","currentValue","key","push","productionMaterialCategories","ɵɵdirectiveInject","selectors","inputs","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","EventParametersComponent_div_0_Template","_EventParametersComponent","ɵɵelement","ɵɵproperty","ɵɵpipeBind1","item_r2","name","ɵɵattribute","aState_r8","translation","ɵɵrepeaterCreate","TabsComponent_Conditional_3_Conditional_0_For_1_Template","ɵɵrepeaterTrackByIndex","ɵɵrepeater","ctx_r5","additionalState","ctx_r6","ɵɵtemplate","TabsComponent_Conditional_3_Conditional_0_Template","TabsComponent_Conditional_3_Conditional_1_Template","ɵɵconditional","ctx_r1","isArray","tabStates","Order","keys","states","params","acl","Production","ShipmentsTabs","Employee","EmployeesDocuments","Product","Article","ArticleParameters","ArticleOperation","Material","MaterialsFormulas","MaterialsReservations","Inventory","Suppliers","Supplier","Agent","Carrier","Customer","Customers","types","DevelopmentProjects","DevelopmentProjectView","Role","RoleSpecialisation","MaintenanceList","MaintenanceRecord","ResourcesList","Workplace","Operation","WorkplacesInfo","Workgroup","Subcontractor","SystemSettingsDevices","SalesReports","LoadingReports","MaterialsReports","ProductionReports","EntranceReport","UserOptions","SaleOpportunitiesList","TimeOptions","Tabel","Company","SystemSettingsMenu","ActionsList","TabsComponent","constructor","platformLocation","route","Router","PromanState","Location","ACL","Toolbar","store","items","activeItemIndex","isSmarton","handleTabChange","event","_preventNavigation","index","length","to","path","value","onPopState","setActiveItem","select","getCurrUser","subscribe","currUser","getPublicSystemOptions","publicSystemOptions","ngOnChanges","changes","parentState","cloneDeep","console","warn","adjustParams","forEach","item","getRouterLink","filter","chef","isDefined","check","indexOf","type","corporateChild","corporateRestrict","setTimeout","ngOnInit","timeStampSubject","key","root","keyVal","firstChild","snapshot","map","aState","hasSubstring","activeItem","iter","join","ɵɵdirectiveInject","PlatformLocation","ActivatedRoute","PromanStateService","ToolbarService","Store","selectors","inputs","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","$event","TabsComponent_For_2_Template","TabsComponent_Conditional_3_Template","ɵɵelementEnd","ɵɵadvance","_TabsComponent","PermissionsService","constructor","Entity","permissions","getForEntity","type","id","permissionEntity","customizedRequest","get","getEntity","getPos","posAvailablePermissions","name","post","ɵɵinject","factory","ɵfac","_PermissionsService","import_lodash","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r4","ctx_r3","ɵɵnextContext","ɵɵresetView","sudoPermissionToggle","ɵɵelementEnd","ɵɵproperty","ɵɵpureFunction0","_c0","_r6","ctx_r5","removePermissions","ɵɵpipeBind1","ɵɵtext","ɵɵadvance","ɵɵtextInterpolate1","permission_r9","_r15","resource_r10","$implicit","ctx_r13","clearResourceOverride","_r21","permission_r16","ctx_r19","toggle","actions","status","allowed","ɵɵtemplate","PermissionsComponent_table_4_tr_8_td_5_div_1_Template","PermissionsComponent_table_4_tr_8_td_5_div_2_Template","_r27","ctx_r26","toggleResource","PermissionsComponent_table_4_tr_8_pro_btn_4_Template","PermissionsComponent_table_4_tr_8_td_5_Template","ɵɵpureFunction1","_c1","name","override","ctx_r8","allPermissions","PermissionsComponent_table_4_th_6_Template","PermissionsComponent_table_4_tr_8_Template","ɵɵtextInterpolate","ctx_r2","resources","PermissionsComponent","constructor","promanState","Toast","ACL","Entity","store","Permissions","route","_loaded","setPermissions","data","resource","isDefined","view","push","getPermissions","getForEntity","type","id","then","value","request","entityId","entityType","permissions","keys","map","action","permissionEntity","update","permission","clearOverride","remove","response","requests","Promise","all","ngOnInit","resolve","select","getCurrUser","subscribe","currUser","entity","snapshot","get","check","pop","go","forEach","ɵɵdirectiveInject","PromanStateService","ToastService","Store","PermissionsService","ActivatedRoute","selectors","inputs","decls","vars","consts","template","rf","ctx","PermissionsComponent_pro_checkbox_2_Template","PermissionsComponent_pro_btn_3_Template","PermissionsComponent_table_4_Template","username","_PermissionsComponent","import_jquery","Html5QrcodeSupportedFormats","html5QrcodeSupportedFormatsTextMap","isValidHtml5QrcodeSupportedFormats","format","Html5QrcodeSupportedFormats","Html5QrcodeScanType","Html5QrcodeConstants","QrcodeResultFormat","format","formatName","html5QrcodeSupportedFormatsTextMap","Html5QrcodeResultFactory","decodedText","qrcodeResult","Html5QrcodeErrorTypes","Html5QrcodeErrorFactory","error","BaseLoggger","verbose","message","isExperimental","errors","isNullOrUndefined","obj","clip","value","minValue","maxValue","Html5QrcodeStrings","exception","error","Html5QrcodeScannerStrings","decodedText","LibraryInfoStrings","VideoConstraintsUtil","videoConstraints","logger","typeofVideoConstraints","bannedKeys","bannedkeysSet","keysInVideoConstraints","_i","keysInVideoConstraints_1","key","ZXing","ZXingHtml5QrcodeDecoder","requestedFormats","verbose","logger","Html5QrcodeSupportedFormats","ZXing","formats","hints","canvas","_this","resolve","reject","error","zxingDecoder","luminanceSource","binaryBitmap","result","QrcodeResultFormat","value","key","_","zxingFormat","zxingFormats","_i","requestedFormats_1","requestedFormat","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","__generator","body","_","t","f","y","g","verb","n","v","op","BarcodeDetectorDelegate","requestedFormats","verbose","logger","Html5QrcodeSupportedFormats","formats","dummyDetector","canvas","barcodes","largestBarcode","_a","QrcodeResultFormat","maxArea","_i","barcodes_1","barcode","area","requestedFormats_1","requestedFormat","barcodeDetectorFormat","key","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","__generator","body","_","t","f","y","g","verb","n","v","op","Html5QrcodeShim","requestedFormats","useBarCodeDetectorIfSupported","verbose","logger","BarcodeDetectorDelegate","ZXingHtml5QrcodeDecoder","canvas","startTime","_a","error_1","executionTime","sum","_i","mean","__extends","extendStatics","d","b","p","__","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","__generator","body","_","t","f","y","g","verb","n","v","op","AbstractCameraCapability","name","track","constraint","constraints","settings","settingValue","AbstractRangeCameraCapability","_super","capabilities","capability","ZoomFeatureImpl","TorchFeatureImpl","CameraCapabilitiesImpl","RenderedCameraImpl","parentElement","mediaStream","callbacks","width","videoElement","_this","onVideoStart","videoWidth","videoHeight","options","renderedCamera","aspectRatioConstraint","_a","onResumeCallback","$this","onVideoResume","tracks","tracksToClose","tracksClosed","videoTrack","CameraImpl","videoConstraints","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","__generator","body","_","t","f","y","g","verb","n","v","op","CameraFactory","_a","videoConstraints","CameraImpl","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","__generator","body","_","t","f","y","g","verb","n","v","op","CameraRetriever","mst","errorMessage","Html5QrcodeStrings","host","closeActiveStreams","mediaStream","devices","results","_i","devices_1","device","_a","stream","tracks","tracks_1","track","callback","sourceInfos","sourceInfos_1","sourceInfo","Html5QrcodeScannerState","StateManagerImpl","newState","tempNewState","disallowedStatesToTransition","_i","disallowedStatesToTransition_1","disallowedState","StateManagerProxy","stateManager","StateManagerFactory","StateManagerProxy","StateManagerImpl","__extends","extendStatics","d","b","p","__","Constants","_super","Html5QrcodeConstants","InternalHtml5QrcodeConfig","config","logger","VideoConstraintsUtil","isNullOrUndefined","Html5Qrcode","elementId","configOrVerbosityFlag","experimentalFeatureConfig","configObject","BaseLoggger","Html5QrcodeShim","StateManagerFactory","cameraIdOrConfig","configuration","qrCodeSuccessCallback","qrCodeErrorCallback","_this","qrCodeErrorCallbackInternal","internalConfig","videoConstraintsAvailableAndValid","areVideoConstraintsEnabled","element","rootElementWidth","$this","toScanningStateChangeTransaction","Html5QrcodeScannerState","resolve","reject","videoConstraints","cameraRenderingOptions","renderingCallbacks","viewfinderWidth","viewfinderHeight","CameraFactory","factory","camera","renderedCamera","error","Html5QrcodeStrings","_","shouldPauseVideo","transitionToScanning","toStoppedStateTransaction","removeQrRegion","childElement","imageFile","showImage","html5qrcodeResult","inputImage","imageWidth","imageHeight","containerWidth","containerHeight","visibleCanvas","context_1","padding","hiddenImageWidth","hiddenImageHeight","hiddenCanvasWidth","hiddenCanvasHeight","hiddenCanvas","context","result","Html5QrcodeResultFactory","exception","CameraRetriever","videoConstaints","allFormats","Html5QrcodeSupportedFormats","supportedFormats","_i","_a","format","isValidHtml5QrcodeSupportedFormats","experimentalFeatures","qrboxSize","qrDimensions","validateMinSize","size","correctWidthBasedOnRootElementSize","configWidth","shouldShadingBeApplied","defaultQrRegion","qrRegion","canvasElement","contextAttributes","rootElement","scannerPausedUiElement","errorMessage","Html5QrcodeErrorFactory","videoElement","widthRatio","heightRatio","sWidthOffset","sHeightOffset","sxOffset","syOffset","triggerNextScan","isSuccessfull","facingModeKey","deviceIdKey","allowedFacingModeValues_1","exactKey","isValidFacingModeValue","value","keys","key","facingMode","type_1","deviceId","type_2","type","xoffset","yoffset","formerImageWidth","formerImageHeight","qrMatch","shader","width","height","customId","canvasWidth","canvasHeight","shadingElement","rightLeftBorderSize","topBottomBorderSize","smallSize","largeSize","shaderElem","top","bottom","side","isLeft","elem","fps","SVG_XML_PREFIX","ASSET_CAMERA_SCAN","ASSET_FILE_SCAN","ASSET_INFO_ICON_16PX","ASSET_CLOSE_ICON_16PX","PersistedDataFactory","PersistedDataManager","data","hasPermission","lastUsedCameraId","LibraryInfoDiv","parent","LibraryInfoStrings","projectLink","breakElemFirst","breakElemSecond","reportIssueLink","LibraryInfoIcon","onTapIn","onTapOut","_this","ASSET_INFO_ICON_16PX","_","ASSET_CLOSE_ICON_16PX","LibraryInfoContainer","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","__generator","body","_","t","f","y","g","verb","n","v","op","CameraPermissions","devices","_i","devices_1","device","_a","ScanTypeSelector","supportedScanTypes","_i","_a","scanType","Html5QrcodeScanType","Html5QrcodeConstants","maxExpectedValues","supportedScanTypes_1","PublicUiElementIdAndClasses","BaseUiElementFactory","elementType","elementId","element","PublicUiElementIdAndClasses","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","__generator","body","_","t","f","y","g","verb","n","v","op","TorchController","torchCapability","buttonController","onTorchActionFailureCallback","isTorchOnExpected","error_1","_a","isTorchOn","Html5QrcodeScannerStrings","error","errorMessage","TorchButton","BaseUiElementFactory","PublicUiElementIdAndClasses","parentElement","torchButtonOptions","_this","$this","text","button","FileSelectionUi","parentElement","showOnRender","onFileSelected","fileScanLabel","BaseUiElementFactory","PublicUiElementIdAndClasses","$this","e","target","fileList","file","fileName","dragAndDropMessage","event","dataTransfer","files","isAnyFileImage","i","imageType","Html5QrcodeScannerStrings","fileBasedScanRegion","imageFileName","MAX_CHARS","start8Chars","length_1","last8Chars","newText","initialText","button","CameraSelectionUi","cameras","BaseUiElementFactory","PublicUiElementIdAndClasses","parentElement","cameraSelectionContainer","numCameras","selectCameraString","Html5QrcodeScannerStrings","anonymousCameraId","_i","_a","camera","value","name_1","option","cameraSelectUi","CameraZoomUi","BaseUiElementFactory","PublicUiElementIdAndClasses","parentElement","renderOnCreate","zoomString","Html5QrcodeScannerStrings","$this","minValue","maxValue","defaultValue","step","onChangeCallback","cameraZoomUi","Html5QrcodeScannerStatus","toHtml5QrcodeCameraScanConfig","config","toHtml5QrcodeFullConfig","verbose","Html5QrcodeScanner","elementId","ScanTypeSelector","BaseLoggger","PersistedDataManager","qrCodeSuccessCallback","qrCodeErrorCallback","_this","decodedText","result","Html5QrcodeScannerStrings","errorMessage","error","container","Html5Qrcode","shouldPauseVideo","isNullOrUndefined","emptyHtmlContainer","mainContainer","resolve","reject","_","videoConstaints","Html5QrcodeConstants","parent","qrCodeScanRegion","scanRegionId","qrCodeDashboard","dashboardId","dashboard","$this","header","libraryInfo","LibraryInfoContainer","headerMessageContainer","section","scpCameraScanRegion","requestPermissionContainer","requestPermissionButton","createPermissionButtonIfNotExists","cameras","BaseUiElementFactory","CameraPermissions","hasPermissions","sectionControlPanel","showOnRender","onFileSelected","file","html5qrcodeResult","Html5QrcodeErrorFactory","FileSelectionUi","cameraZoomUi","CameraZoomUi","renderCameraZoomUiIfSupported","cameraCapabilities","zoomCapability","zoomValue","defaultZoom","clip","cameraSelectUi","CameraSelectionUi","cameraActionContainer","cameraActionStartButton","PublicUiElementIdAndClasses","cameraActionStopButton","torchButton","createAndShowTorchButtonIfSupported","TorchButton","resetCameraActionStartButton","shouldShow","cameraId","TEXT_IF_CAMERA_SCAN_SELECTED","TEXT_IF_FILE_SCAN_SELECTED","switchContainer","switchScanTypeLink","Html5QrcodeScanType","permissionButton","messageDiv","messageText","scannerStatus","shouldDisplay","ASSET_CAMERA_SCAN","ASSET_FILE_SCAN","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r4","ctx_r3","ɵɵnextContext","ɵɵresetView","startCamera","ɵɵelement","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","ɵɵproperty","ɵɵpureFunction1","_c1","ctx_r2","_paused","PromanQrReaderComponent","constructor","status","onCodeRead","EventEmitter","stopStream","stream","getTracks","forEach","track","stop","ngOnInit","window","jsQR","$","getScript","Quagga","ngAfterViewInit","console","log","document","querySelector","getBoundingClientRect","width","qrbox","Math","floor","html5QrcodeScanner","Html5QrcodeScanner","fps","experimentalFeatures","useBarCodeDetectorIfSupported","onScanSuccess","decodedText","decodedResult","emit","multiple","pause","clear","onScanFailure","error","render","ngOnDestroy","__async","getElementById","delay","video","createElement","canvasElement","canvas","getContext","loadingMessage","min","element","nativeElement","height","tick","innerText","hidden","readyState","HAVE_ENOUGH_DATA","drawImage","imageData","getImageData","code","data","inversionAttempts","url","setTimeout","requestAnimationFrame","init","inputStream","name","type","target","decoder","readers","err","warn","start","onDetected","codeResult","navigator","mediaDevices","getUserMedia","then","srcObject","setAttribute","play","selectors","viewQuery","rf","ctx","ɵɵtemplate","PromanQrReaderComponent_div_2_Template","PromanQrReaderComponent_div_3_Template","ɵɵelementContainerStart","ɵɵelementContainerEnd","CommonModule","NgClass","NgIf","LabelComponent","Fa6Module","FaComponent","TranslatePipe","styles","_PromanQrReaderComponent","import_moment","EmployeesService","constructor","Entity","Injector","QueryExpression","store","getParameters","item","ids","Array","isArray","map","employee","id","employeeBookingEntity","search","in","notIn","statuses","FINISHED","then","response","count","key","name","type","config","getManagers","customParams","currUser","params","join","Object","assign","person","employeeEntity","QB","managers","is","promise","specialisations","Promise","resolve","get","spec","role","isEmployeesDirector","director","employeeDeps","safeMap","filter","some","dir","dep","isMe","select","getCurrUser","subscribe","value","entityConfig","resourcesConfig","QueryBuilder","orStrict","roles","aggregate","ɵɵinject","QueryExpressionService","Store","factory","ɵfac","_EmployeesService","CanvasSignDialogComponent","constructor","data","store","dialogRef","Filter","position","positionOptions","id","name","translate","handleCanvasSave","close","setPosition","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","Store","MatLegacyDialogRef","FilterService","selectors","decls","vars","consts","template","rf","ctx","ɵɵelement","ɵɵelementStart","ɵɵlistener","$event","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ɵɵpureFunction0","_c0","_CanvasSignDialogComponent","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r8","document_r1","ɵɵnextContext","$implicit","ctx_r6","ɵɵresetView","read","ɵɵelementEnd","ɵɵproperty","ɵɵelement","signature","ɵɵtext","ɵɵadvance","ɵɵtextInterpolate1","ɵɵpipeBind1","ɵɵtextInterpolate","isRead","_r14","ctx_r12","removeSignature","ɵɵtemplate","EmployeeDocumentsReadComponent_mat_list_item_6_Conditional_2_Template","EmployeeDocumentsReadComponent_mat_list_item_6_Conditional_3_Template","_r16","ctx_r15","preview","EmployeeDocumentsReadComponent_mat_list_item_6_Conditional_8_Template","EmployeeDocumentsReadComponent_mat_list_item_6_pro_btn_9_Template","ɵɵconditional","ctx_r0","isMe","name","canRemoveSignature","EmployeeDocumentsReadComponent","constructor","Entity","FilePreview","ImagePath","Dialog","Employees","store","onReadAll","EventEmitter","item","signRequest","employeeEntity","documentRead","employeeId","employee","id","employeeDocumentId","data","then","refresh","open","CanvasSignDialogComponent","width","getScreenWidthPercent","disableClose","res","console","log","file","show","link","window","employeeDocumentEntity","getByEmployee","response","employeeDocuments","documents","reads","forEach","documentId","moment","date","format","readId","length","emit","document","get","remove","select","getCurrUser","pipe","filter","value","subscribe","person","specialisations","spec","type","ngOnInit","ɵɵdirectiveInject","FilePreviewService","ImagePathService","EmployeesService","Store","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","EmployeeDocumentsReadComponent_mat_list_item_6_Template","_EmployeeDocumentsReadComponent","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r7","row_r1","ɵɵnextContext","$implicit","ctx_r5","ɵɵresetView","loadFromHistory","ɵɵelementEnd","ɵɵproperty","ɵɵpipeBind1","ɵɵtext","ɵɵelement","ɵɵtemplate","EntityActivityLogComponent_For_14_Conditional_8_Template","ɵɵadvance","ɵɵtextInterpolate2","person","firstName","lastName","ɵɵtextInterpolate","datetime","ɵɵpureFunction1","_c0","diffData","toString","ɵɵsanitizeHtml","ɵɵconditional","ctx_r0","entityName","EntityActivityLogComponent","constructor","cd","Entity","Filter","route","onLoad","EventEmitter","value","emit","diff","snapshot","data","entityId","ngOnInit","get","log","then","response","prepareData","detectChanges","history","forEach","item","Object","keys","length","key","customValue","name","isDefined","amount","currency","price","endsWith","dateTime","roundNumber","JSON","stringify","slice","translate","filter","metadata","ɵɵdirectiveInject","ChangeDetectorRef","FilterService","ActivatedRoute","selectors","inputs","outputs","decls","vars","consts","template","rf","ctx","ɵɵrepeaterCreate","EntityActivityLogComponent_For_14_Template","ɵɵrepeaterTrackByIndex","ɵɵrepeater","_EntityActivityLogComponent","ɵɵelementStart","ɵɵlistener","item_r1","ɵɵrestoreView","_r3","$implicit","ctx_r2","ɵɵnextContext","ɵɵresetView","select","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","name","MaterialQuantSearchDialogComponent","constructor","data","Entity","Filter","dialogRef","query","quants","materialId","handleSearch","get","search","Object","assign","params","then","response","forEach","quant","material","quantName","barcode","value","close","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","FilterService","MatLegacyDialogRef","selectors","decls","vars","consts","template","rf","ctx","ɵɵelement","$event","ɵɵtemplate","MaterialQuantSearchDialogComponent_mat_list_item_5_Template","ɵɵproperty","ɵɵpureFunction0","_c0","_MaterialQuantSearchDialogComponent","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r7","ctx_r6","ɵɵnextContext","isAddMaterial","ɵɵresetView","isAddMaterialButton","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ɵɵpipeBind1","$event","_r9","ctx_r8","addMaterial","ctx_r10","searchQuant","ctx_r1","searchEntity","ɵɵpureFunction0","_c0","searchMaterial","ɵɵtext","ɵɵtextInterpolate1","material_r11","error","$index_r12","_r16","index","ctx_r15","searchSource","$implicit","ctx_r17","set","ctx_r18","ɵɵtemplate","CreditMaterialsComponent_div_3_p_5_Template","ɵɵtextInterpolate","name","quant","_c1","ctx_r2","materialQuantOptions","quantity","ɵɵpureFunction1","_c3","_c2","_r20","ctx_r19","credit","ctx_r3","isCreditPending","_r22","ctx_r21","cancel","ɵɵpipeBind3","quant_r24","material","id","ɵɵtextInterpolate3","materialType","unit","ctx_r23","Filter","quantFormat","CreditMaterialsComponent_mat_list_6_mat_list_item_4_Template","ctx_r5","accountedMaterials","CreditMaterialsComponent","constructor","Entity","QueryExpression","Dialog","ACL","materials","value","materialEntity","search","alias","join","limit","get","materialQuantEntity","checkOne","ngOnInit","getCreditedMaterials","setUpMaterial","unshift","setTimeout","materialFormats","length","isFormated","request","TYPE_STOCK","then","quants","map","quantName","requests","filter","credited","moveToProduction","order","production","source","catch","response","data","errors","message","Promise","reject","all","undefined","item","property","type","TYPE_PRODUCTION","open","MaterialQuantSearchDialogComponent","params","stock","width","result","ɵɵdirectiveInject","QueryExpressionService","FilterService","selectors","inputs","decls","vars","consts","template","rf","ctx","CreditMaterialsComponent_div_1_Template","CreditMaterialsComponent_div_2_Template","CreditMaterialsComponent_div_3_Template","CreditMaterialsComponent_pro_btn_4_Template","CreditMaterialsComponent_pro_btn_5_Template","CreditMaterialsComponent_mat_list_6_Template","_CreditMaterialsComponent","import_moment","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r5","ctx_r4","ɵɵnextContext","ɵɵresetView","enableAddMode","ɵɵelementEnd","$event","_r7","ctx_r6","set","ctx_r8","ɵɵelement","ctx_r9","addComment","ctx_r10","isAddCommentMode","ctx_r11","toggleImportant","ɵɵadvance","ɵɵproperty","ctx_r1","newComment","text","ɵɵpureFunction0","_c0","type","_c1","types","ɵɵpureFunction1","_c2","entityName","isImportant","_c3","_r19","comment_r12","$implicit","ctx_r17","editCommentValue","ctx_r15","_c4","isReadOnly","_r24","ctx_r22","editComment","ɵɵtemplate","InlineCommentsComponent_For_9_Conditional_8_Conditional_4_Template","ɵɵsanitizeHtml","ɵɵconditional","author","id","ctx_r16","currUser","person","ɵɵtext","InlineCommentsComponent_For_9_Conditional_7_Template","InlineCommentsComponent_For_9_Conditional_8_Template","ɵɵtextInterpolate1","name","ɵɵpipeBind1","date","isEdit","InlineCommentsComponent","constructor","EntityService","Filter","store","tags","select","getCurrUser","subscribe","value","get","search","then","res","additionalTypes","pushArrays","resourcesConfig","article_operation_production_comment","params","map","item","translate","ngOnInit","Entity","deepCopy","tag","data","prepareRequest","utcFormat","moment","event","entity","create","response","join","comments","unshift","property","comment","update","ɵɵdirectiveInject","FilterService","Store","selectors","inputs","label","decls","vars","consts","template","rf","ctx","InlineCommentsComponent_Conditional_5_Template","InlineCommentsComponent_Conditional_6_Template","InlineCommentsComponent_Conditional_7_Template","ɵɵrepeaterCreate","InlineCommentsComponent_For_9_Template","ɵɵrepeaterTrackByIndex","ɵɵtextInterpolate","length","ɵɵrepeater","_InlineCommentsComponent","EventOrderProductsTableComponent","constructor","Dialog","Entity","store","Filter","showInfo","orderProduct","open2","ProductStorageInfoDialogComponent","product","updateReadyToShipQuantity","quantity","orderProductEntity","update","id","readyForShipmentQuantity","setTableConfig","tableConfig","entity","preventFixedHeader","aclRoot","hideSettings","rowButtons","icon","tooltip","acl","callback","fields","name","key","filter","state","formatter","type","keys","stats","extraParameters","event","order","header","headerState","toString","transform","data","currUser","isCustomer","item","parentOrderProduct","forEach","decimal","decimalProductQuantity","select","getCurrUser","subscribe","value","getDecimalPlaces","ngOnInit","get","ɵɵdirectiveInject","Store","FilterService","selectors","inputs","timeStamp","decls","vars","consts","template","rf","ctx","ɵɵelement","ɵɵproperty","_EventOrderProductsTableComponent","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r2","ctx_r1","ɵɵnextContext","ɵɵresetView","showArticleSummary","ɵɵelementEnd","ɵɵproperty","ɵɵpipeBind1","ArticleSummaryBtnComponent","constructor","Entity","Dialog","ACL","article","type","photo","showDialog","loadArticleData","articleEntity","get","open2","ArticleSummaryDialogComponent","item","id","join","then","response","ɵɵdirectiveInject","selectors","inputs","decls","vars","consts","template","rf","ctx","ɵɵtemplate","ArticleSummaryBtnComponent_pro_btn_0_Template","check","_ArticleSummaryBtnComponent","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","_r3","ctx_r2","ɵɵnextContext","ɵɵresetView","updateMenuLimitations","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ctx_r0","employee","menuLimitations","ɵɵpureFunction0","_c0","ɵɵtext","ɵɵtextInterpolate1","ɵɵpipeBind1","menuItem_r4","name","_r14","$implicit","ctx_r12","revert","_r17","ctx_r15","handleMenuClick","ɵɵtemplate","UserMenuTreeComponent_For_3_Conditional_3_Conditional_2_Template","class","ctx_r8","classEnabled","ɵɵpureFunction1","_c1","ɵɵconditional","isOverride","_r25","tab_r19","ctx_r23","_r29","ctx_r27","handleTabClick","UserMenuTreeComponent_For_3_For_5_Conditional_2_Template","ctx_r9","UserMenuTreeComponent_For_3_Conditional_2_Template","UserMenuTreeComponent_For_3_Conditional_3_Template","ɵɵrepeaterCreate","UserMenuTreeComponent_For_3_For_5_Template","ɵɵrepeaterTrackByIdentity","tabs","ɵɵrepeater","SYSTEM_OPTION_KEYS","agent","customer","UserMenuTreeComponent","constructor","cd","route","store","Entity","defaultData","classDisabled","updateView","markForCheck","saveChanges","isEntity","specialisation","get","update","id","menuSettings","currentData","then","data","key","keys","Object","assign","type","debounceLoadSystemOptions","snapshot","parent","select","getSystemOptions","subscribe","value","systemOptions","ngOnInit","initData","setData","setMenuClasses","inited","users","bookkeeping","isArray","isDefined","length","EMPTY_VALUE","specialisations","forEach","spec","undefined","loadMenu","debounce","dispatch","loadSystemOptions","startData","cloneDeep","menu","menuEmployee","menuAgent","menuCustomer","menuBookkeepingUser","menuItem","tab","menuName","tabName","save","isTruthy","tabClass","push","window","location","reload","ɵɵdirectiveInject","ChangeDetectorRef","ActivatedRoute","Store","selectors","decls","vars","consts","template","rf","ctx","UserMenuTreeComponent_Conditional_1_Template","UserMenuTreeComponent_For_3_Template","_UserMenuTreeComponent","import_moment","ProductionOperationService","constructor","Filter","Entity","Parameters","PromanState","ACL","QueryExpression","store","getEntity","operationEntity","getAggregated","id","belongsToOrder","Promise","all","get","isNull","date","plannedStat","catch","response","then","resourceBookings","sort","a","b","plannedStart","production","orderType","order","type","name","to","isSupervisedEvent","event","employeeId","supervisor","showOptions","canUpdateEvent","check","canUpdateWorkplace","canUpdateEmployees","canUpdateTime","canUpdateSupervisor","canUpdateParameters","isPersonalEvent","status","STARTED","showItemQuantities","articleOperation","productionStoreAccess","FINISHED","canUpdateItemQuantities","operation","canStart","productionEntity","UNSTARTED","WAITING_FOR_PREVIOUS","parallelity","undefined","COMPLETE","canEnd","booking","parametersDone","productionOperationParameters","_parameters","length","filter","item","parameter","required","empty","includes","canCancel","canComment","showComments","CANCELED","UNCONFIRMED","canUpdateFiles","canConfirm","canRevertStatus","getWorkplaceOperation","workplaceId","search","moment","from","getNextWorkplaceOperation","getExtraParameters","resourcesConfig","params","extraParameters","getStatusField","strict","orStrict","key","translate","options","BOOKED","getFields","operations","formatter","formatterConfig","getValue","getNameValue","showSearch","extraPartialJoins","row","state","acl","article","safeMap","categories","join","concatOrdersProperty","customer","select","getCurrUser","subscribe","value","currUser","setEntity","op","groupName","segmentParameter","JSON","parse","prop","result","forEach","employee","workplace","childBookings","childBooking","endMultiple","__async","ids","startMultiple","ɵɵinject","FilterService","ParametersService","PromanStateService","QueryExpressionService","Store","factory","ɵfac","_ProductionOperationService","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","file_r1","CalendarOverlayFilesComponent","constructor","Overlay","files","destroy$","Subject","data","pipe","takeUntil","subscribe","value","event","handleFiles","ngOnInit","ngOnChanges","ngOnDestroy","next","order","production","filter","file","contains","hiddenOrderFiles","id","ɵɵdirectiveInject","OverlayService","selectors","inputs","features","ɵɵNgOnChangesFeature","decls","vars","consts","template","rf","ctx","ɵɵtemplate","CalendarOverlayFilesComponent_div_1_Template","_CalendarOverlayFilesComponent","OverlayComponent","constructor","Overlay","Render2","cd","ACL","ProductionOperations","data","destroyed$","Subject","ngOnInit","overlayShow","pipe","takeUntil","distinctUntilChanged","subscribe","value","show","hide","data$","ngOnDestroy","next","ngOnChanges","markForCheck","__async","removeClass","el","nativeElement","setPosition","setTimeout","setStyle","getPos","addClass","ɵɵdirectiveInject","OverlayService","Renderer2","ChangeDetectorRef","ProductionOperationService","selectors","viewQuery","rf","ctx","_OverlayComponent","IframeDialogComponent","constructor","data","dialogRef","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","MatLegacyDialogRef","selectors","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ɵɵpipeBind1","url","ɵɵsanitizeResourceUrl","_IframeDialogComponent","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵelement","ɵɵlistener","$event","value_r2","ɵɵrestoreView","_r4","ngIf","ctx_r3","ɵɵnextContext","ɵɵresetView","handleDialog","docsHref","path","ɵɵadvance","ɵɵtextInterpolate1","title","ɵɵproperty","firstParagraph","ɵɵsanitizeHtml","ctx_r1","ɵɵsanitizeUrl","readMore","DocsOverlayComponent","constructor","Request","Overlay","Render2","cd","Filter","Dialog","cache","destroyed$","Subject","setPosition","el","setTimeout","setStyle","nativeElement","getPos","markForCheck","window","location","host","includes","ngOnInit","docShow","pipe","takeUntil","distinctUntilChanged","subscribe","value","show","hide","value$","docValues","tap","isValue","ngOnDestroy","next","__async","translate","dialogText","removeClass","addClass","enterDocs","docsSetActive","clearTimeout","hideTimeout","leaveDocs","docsHide","event","url","preventDefault","open","IframeDialogComponent","width","ɵɵdirectiveInject","RequestService","OverlayService","Renderer2","ChangeDetectorRef","FilterService","selectors","viewQuery","rf","ctx","ɵɵtemplate","DocsOverlayComponent_pm_frame_2_Template","ɵɵpureFunction1","_c1","ɵɵpipeBind1","_DocsOverlayComponent","import_moment","ɵɵelementStart","ɵɵlistener","$event","workshift_r2","ɵɵrestoreView","_r5","$implicit","ctx_r4","ɵɵnextContext","ɵɵresetView","updateWorkshiftColor","ɵɵelementEnd","ɵɵproperty","color","ɵɵpureFunction2","_c0","displayName","$index_r3","reason_r6","_r8","ctx_r7","updateWorkdayExceptionReasonColor","ɵɵpureFunction1","_c1","name","WorkshiftsColorsComponent","constructor","Entity","Filter","ParametersOptions","onColorChange","EventEmitter","workshifts","workdayExceptionReasons","calendarOptions","workshift","value","get","update","id","then","emitUpdate","reason","updateChangedScheduleColor","calendarEntity","updateOptions","changedScheduleColor","emit","post","utcOffset","moment","ngOnInit","getOptions","response","search","entity","isDST","forEach","shift","utc","start","ISO_8601","subtract","format","toString","end","ɵɵdirectiveInject","FilterService","ParametersOptionsService","selectors","outputs","decls","vars","consts","template","rf","ctx","ɵɵtext","ɵɵtemplate","WorkshiftsColorsComponent_pro_color_7_Template","WorkshiftsColorsComponent_pro_color_14_Template","ɵɵadvance","ɵɵpipeBind1","ɵɵtextInterpolate","_WorkshiftsColorsComponent","ChangeUsernameFormComponent","constructor","onSubmit","EventEmitter","nameConfig","label","required","type","ngOnInit","controls","current","UntypedFormControl","Validators","form","UntypedFormGroup","onChange","property","value","username","handleSubmit","emit","new_username","selectors","outputs","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r1","_r0","ɵɵreference","ɵɵresetView","$event","ɵɵelementEnd","ɵɵelement","ɵɵproperty","ɵɵadvance","ɵɵpropertyInterpolate","ɵɵpipeBind1","_ChangeUsernameFormComponent","CreateLedgerTypeDialogComponent","constructor","data","Entity","Filter","dialogRef","typeDbit","typeCrdt","ledgerTypesOptions","name","mode","ready","confirm","LedgerTypesEntityInterface","create","accountCategoryDbit","id","accountCategoryCrdt","type","then","response","close","save","update","item","set","property","value","getCategoryName","cat","keyName","get","ledgerEntityInterface","translate","getLedgerTypesList","Object","values","forEach","push","findById","ɵɵdirectiveInject","MAT_LEGACY_DIALOG_DATA","FilterService","MatLegacyDialogRef","selectors","decls","vars","consts","template","rf","ctx","ɵɵelement","ɵɵelementStart","ɵɵlistener","$event","ɵɵelementEnd","ɵɵproperty","ɵɵadvance","ɵɵpureFunction1","_c2","_c1","ɵɵpureFunction0","_c0","_c3","ɵɵpureFunction2","_c5","_c4","_c6","_CreateLedgerTypeDialogComponent","SharedComponentsModule","CommonModule","FormsModule","ReactiveFormsModule","PipesModule","RouterModule","InputsModule","SharedDirectivesModule","PromanCommonComponentsModule","FrontendTableModule","MatRadioModule","MatLegacyButtonModule","MatLegacyListModule","MatLegacyProgressBarModule","MatLegacyMenuModule","MatTabsModule","MatProgressSpinnerModule","MatExpansionModule","FlexLayoutModule","MatLegacyDialogModule","Fa6Module","FrontendParametersModule","FrontendDirectivesModule","PromanAutocompleteComponent","ParameterViewComponentModule","FrontendPipesModule","PromanColorComponent","PromanDurationDropdownComponent","CropperDialogComponent","PromanFilesManagerComponent","TagsComponent","PromanThumbnailComponent","PromanWarningComponent","PromanQrReaderComponent","_SharedComponentsModule"],"x_google_ignoreList":[0,1,2,7,27,49,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91]}