All Downloads are FREE. Search and download functionalities are using the official Maven repository.

webapp.stateDiagram-v2-1992cada.08fa5e24.js.map Maven / Gradle / Ivy

There is a newer version: 1.0-20241113
Show newest version
{"mappings":"A,S,E,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,I,E,A,W,iB,C,E,E,Q,C,E,Q,S,C,C,C,E,E,E,O,C,U,I,G,I,E,E,S,E,E,S,E,E,S,E,E,S,E,E,S,E,S,E,S,E,S,E,S,E,S,E,SCmBA,IAAM,EAAc,OACd,EAAwB,gBAOxB,EAAc,eAEd,EAAoB,GAAG,SAA0B,CACjD,EAAW,aAGX,EAAqB,GAAG,aAA2B,CACnD,EAAmB,GAAG,QAAyB,CAE/C,EAAsB,GAAG,WAA4B,CAErD,EAA0B,GAAG,eAAgC,CAC7D,EAAS,SACT,EAAO,OAEP,EAAoB,OACpB,EAAU,CAAC,EAAE,EAAkB,EAAE,EAAK,CAAC,CACvC,EAAY,CAAC,EAAE,EAAkB,EAAE,EAAO,CAAC,CAC3C,EAAe,YACf,EAAwB,aAExB,EAAmB,OACnB,EAAmB,SACrB,EAAS,CAAC,EACV,EAAiB,EAsBrB,SAAS,EAAW,EAAS,EAAE,CAAE,EAAU,CAAC,CAAE,EAAO,EAAE,CAAE,EAAa,CAAiB,EACrF,IAAM,EAAU,AAAS,OAAT,GAAiB,EAAK,MAAM,CAAG,EAAI,CAAC,EAAE,EAAW,EAAE,EAAK,CAAC,CAAG,GAC5E,MAAO,SAAkB,IAAS,KAAW,GAAS,AACxD,CACA,IAAM,EAAY,CAAC,EAAG,EAAQ,EAAY,EAAe,EAAW,SAftC,EAgB5B,IAAM,EAAS,EAAW,EAAE,CACtB,EAhBN,AAAI,OADwB,EAiBU,CAAa,CAAC,EAAO,EAflD,GAEP,AAAI,EAAW,OAAO,CACb,EAAW,OAAO,CAAC,IAAI,CAAC,KAExB,GAWX,GAAI,AAAW,SAAX,EAAmB,CACrB,IAAI,EAAQ,CACa,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AAW,GACL,SAAS,gBAAgB,CAAC,QAAU,EAAK,yBAC5B,CAC1B,IAAM,EAAM,EAAM,OAAO,GACnB,EAAO,SAAS,eAAe,CAAC,6BAA8B,GACpE,EAAK,YAAY,CAAC,KAAM,GACxB,EAAK,YAAY,CAAC,KAAM,GACxB,EAAK,YAAY,CAAC,QAAS,EAAI,KAAK,EACpC,EAAK,YAAY,CAAC,SAAU,EAAI,MAAM,EACtC,EAAM,YAAY,CAAC,EAAM,EAAM,UAAU,CAC3C,CACF,EAMM,EAAU,CACd,OAAA,EAAA,CAAA,CACA,GAAA,EAAA,CAAA,CACA,SARe,CACf,QArQc,SAAS,CAAG,EAE1B,IAAK,IAAM,KADE,OAAO,IAAI,CAAC,GAEvB,CAAG,CAAC,EAAI,AAEZ,EAiQE,WAhQiB,SAAS,CAAI,CAAE,CAAU,EAE1C,OADA,EAAW,EAAE,CAAC,OAAO,CAAC,EAAW,EAAE,CAAC,YAAY,IACzC,EAAW,EAAE,CAAC,UAAU,EACjC,EA8PE,KAAA,CACF,EAKE,OAAA,EAAA,CAAA,CACA,KAAM,AAAC,IACA,EAAI,KAAK,EACZ,CAAA,EAAI,KAAK,CAAG,CAAC,CAAA,EAEf,EAAI,KAAK,CAAC,mBAAmB,CAAG,EAAI,mBAAmB,CACvD,AAAA,CAAA,EAAA,EAAA,CAAC,AAAD,EAAG,KAAK,EACV,CACF,C,G,E,Q,S,C,C,C,E,E,E,O,C,U,I,G,I,E,E,SCtSA,EAJA,SAAe,CAAK,EAClB,MAAO,AAAA,CAAA,EAAA,EAAA,OAAQ,AAAR,EAAU,EA7BM,EA8BzB,C","sources":["","node_modules/mermaid/dist/stateDiagram-v2-1992cada.js","node_modules/lodash-es/clone.js"],"sourcesContent":["\nfunction $parcel$export(e, n, v, s) {\n  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n      var $parcel$global = globalThis;\n    var parcelRequire = $parcel$global[\"parcelRequire0031\"];\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"i62GY\", function(module, exports) {\n\n$parcel$export(module.exports, \"diagram\", () => $d2cae025305c9e56$export$6118d022d940d562);\n\nvar $3ltxT = parcelRequire(\"3ltxT\");\n\nvar $4LkSm = parcelRequire(\"4LkSm\");\n\nvar $2YFJl = parcelRequire(\"2YFJl\");\n\nvar $4jcZX = parcelRequire(\"4jcZX\");\n\nvar $4FlE0 = parcelRequire(\"4FlE0\");\nparcelRequire(\"eJNXH\");\nparcelRequire(\"gngdn\");\nparcelRequire(\"2ujND\");\nparcelRequire(\"i8Fxz\");\n\n\n\n\n\nparcelRequire(\"hV1gR\");\nparcelRequire(\"c0ySZ\");\n\n\n\nconst $d2cae025305c9e56$var$SHAPE_STATE = \"rect\";\nconst $d2cae025305c9e56$var$SHAPE_STATE_WITH_DESC = \"rectWithTitle\";\nconst $d2cae025305c9e56$var$SHAPE_START = \"start\";\nconst $d2cae025305c9e56$var$SHAPE_END = \"end\";\nconst $d2cae025305c9e56$var$SHAPE_DIVIDER = \"divider\";\nconst $d2cae025305c9e56$var$SHAPE_GROUP = \"roundedWithTitle\";\nconst $d2cae025305c9e56$var$SHAPE_NOTE = \"note\";\nconst $d2cae025305c9e56$var$SHAPE_NOTEGROUP = \"noteGroup\";\nconst $d2cae025305c9e56$var$CSS_DIAGRAM = \"statediagram\";\nconst $d2cae025305c9e56$var$CSS_STATE = \"state\";\nconst $d2cae025305c9e56$var$CSS_DIAGRAM_STATE = `${$d2cae025305c9e56$var$CSS_DIAGRAM}-${$d2cae025305c9e56$var$CSS_STATE}`;\nconst $d2cae025305c9e56$var$CSS_EDGE = \"transition\";\nconst $d2cae025305c9e56$var$CSS_NOTE = \"note\";\nconst $d2cae025305c9e56$var$CSS_NOTE_EDGE = \"note-edge\";\nconst $d2cae025305c9e56$var$CSS_EDGE_NOTE_EDGE = `${$d2cae025305c9e56$var$CSS_EDGE} ${$d2cae025305c9e56$var$CSS_NOTE_EDGE}`;\nconst $d2cae025305c9e56$var$CSS_DIAGRAM_NOTE = `${$d2cae025305c9e56$var$CSS_DIAGRAM}-${$d2cae025305c9e56$var$CSS_NOTE}`;\nconst $d2cae025305c9e56$var$CSS_CLUSTER = \"cluster\";\nconst $d2cae025305c9e56$var$CSS_DIAGRAM_CLUSTER = `${$d2cae025305c9e56$var$CSS_DIAGRAM}-${$d2cae025305c9e56$var$CSS_CLUSTER}`;\nconst $d2cae025305c9e56$var$CSS_CLUSTER_ALT = \"cluster-alt\";\nconst $d2cae025305c9e56$var$CSS_DIAGRAM_CLUSTER_ALT = `${$d2cae025305c9e56$var$CSS_DIAGRAM}-${$d2cae025305c9e56$var$CSS_CLUSTER_ALT}`;\nconst $d2cae025305c9e56$var$PARENT = \"parent\";\nconst $d2cae025305c9e56$var$NOTE = \"note\";\nconst $d2cae025305c9e56$var$DOMID_STATE = \"state\";\nconst $d2cae025305c9e56$var$DOMID_TYPE_SPACER = \"----\";\nconst $d2cae025305c9e56$var$NOTE_ID = `${$d2cae025305c9e56$var$DOMID_TYPE_SPACER}${$d2cae025305c9e56$var$NOTE}`;\nconst $d2cae025305c9e56$var$PARENT_ID = `${$d2cae025305c9e56$var$DOMID_TYPE_SPACER}${$d2cae025305c9e56$var$PARENT}`;\nconst $d2cae025305c9e56$var$G_EDGE_STYLE = \"fill:none\";\nconst $d2cae025305c9e56$var$G_EDGE_ARROWHEADSTYLE = \"fill: #333\";\nconst $d2cae025305c9e56$var$G_EDGE_LABELPOS = \"c\";\nconst $d2cae025305c9e56$var$G_EDGE_LABELTYPE = \"text\";\nconst $d2cae025305c9e56$var$G_EDGE_THICKNESS = \"normal\";\nlet $d2cae025305c9e56$var$nodeDb = {};\nlet $d2cae025305c9e56$var$graphItemCount = 0;\nconst $d2cae025305c9e56$var$setConf = function(cnf) {\n    const keys = Object.keys(cnf);\n    for (const key of keys)cnf[key];\n};\nconst $d2cae025305c9e56$var$getClasses = function(text, diagramObj) {\n    diagramObj.db.extract(diagramObj.db.getRootDocV2());\n    return diagramObj.db.getClasses();\n};\nfunction $d2cae025305c9e56$var$getClassesFromDbInfo(dbInfoItem) {\n    if (dbInfoItem === void 0 || dbInfoItem === null) return \"\";\n    else {\n        if (dbInfoItem.classes) return dbInfoItem.classes.join(\" \");\n        else return \"\";\n    }\n}\nfunction $d2cae025305c9e56$var$stateDomId(itemId = \"\", counter = 0, type = \"\", typeSpacer = $d2cae025305c9e56$var$DOMID_TYPE_SPACER) {\n    const typeStr = type !== null && type.length > 0 ? `${typeSpacer}${type}` : \"\";\n    return `${$d2cae025305c9e56$var$DOMID_STATE}-${itemId}${typeStr}-${counter}`;\n}\nconst $d2cae025305c9e56$var$setupNode = (g, parent, parsedItem, diagramStates, diagramDb, altFlag)=>{\n    const itemId = parsedItem.id;\n    const classStr = $d2cae025305c9e56$var$getClassesFromDbInfo(diagramStates[itemId]);\n    if (itemId !== \"root\") {\n        let shape = $d2cae025305c9e56$var$SHAPE_STATE;\n        if (parsedItem.start === true) shape = $d2cae025305c9e56$var$SHAPE_START;\n        if (parsedItem.start === false) shape = $d2cae025305c9e56$var$SHAPE_END;\n        if (parsedItem.type !== (0, $3ltxT.D)) shape = parsedItem.type;\n        if (!$d2cae025305c9e56$var$nodeDb[itemId]) $d2cae025305c9e56$var$nodeDb[itemId] = {\n            id: itemId,\n            shape: shape,\n            description: (0, $4jcZX.e).sanitizeText(itemId, (0, $4jcZX.c)()),\n            classes: `${classStr} ${$d2cae025305c9e56$var$CSS_DIAGRAM_STATE}`\n        };\n        const newNode = $d2cae025305c9e56$var$nodeDb[itemId];\n        if (parsedItem.description) {\n            if (Array.isArray(newNode.description)) {\n                newNode.shape = $d2cae025305c9e56$var$SHAPE_STATE_WITH_DESC;\n                newNode.description.push(parsedItem.description);\n            } else if (newNode.description.length > 0) {\n                newNode.shape = $d2cae025305c9e56$var$SHAPE_STATE_WITH_DESC;\n                if (newNode.description === itemId) newNode.description = [\n                    parsedItem.description\n                ];\n                else newNode.description = [\n                    newNode.description,\n                    parsedItem.description\n                ];\n            } else {\n                newNode.shape = $d2cae025305c9e56$var$SHAPE_STATE;\n                newNode.description = parsedItem.description;\n            }\n            newNode.description = (0, $4jcZX.e).sanitizeTextOrArray(newNode.description, (0, $4jcZX.c)());\n        }\n        if (newNode.description.length === 1 && newNode.shape === $d2cae025305c9e56$var$SHAPE_STATE_WITH_DESC) newNode.shape = $d2cae025305c9e56$var$SHAPE_STATE;\n        if (!newNode.type && parsedItem.doc) {\n            (0, $4jcZX.l).info(\"Setting cluster for \", itemId, $d2cae025305c9e56$var$getDir(parsedItem));\n            newNode.type = \"group\";\n            newNode.dir = $d2cae025305c9e56$var$getDir(parsedItem);\n            newNode.shape = parsedItem.type === (0, $3ltxT.a) ? $d2cae025305c9e56$var$SHAPE_DIVIDER : $d2cae025305c9e56$var$SHAPE_GROUP;\n            newNode.classes = newNode.classes + \" \" + $d2cae025305c9e56$var$CSS_DIAGRAM_CLUSTER + \" \" + (altFlag ? $d2cae025305c9e56$var$CSS_DIAGRAM_CLUSTER_ALT : \"\");\n        }\n        const nodeData = {\n            labelStyle: \"\",\n            shape: newNode.shape,\n            labelText: newNode.description,\n            // typeof newNode.description === 'object'\n            //   ? newNode.description[0]\n            //   : newNode.description,\n            classes: newNode.classes,\n            style: \"\",\n            //styles.style,\n            id: itemId,\n            dir: newNode.dir,\n            domId: $d2cae025305c9e56$var$stateDomId(itemId, $d2cae025305c9e56$var$graphItemCount),\n            type: newNode.type,\n            padding: 15\n        };\n        nodeData.centerLabel = true;\n        if (parsedItem.note) {\n            const noteData = {\n                labelStyle: \"\",\n                shape: $d2cae025305c9e56$var$SHAPE_NOTE,\n                labelText: parsedItem.note.text,\n                classes: $d2cae025305c9e56$var$CSS_DIAGRAM_NOTE,\n                // useHtmlLabels: false,\n                style: \"\",\n                // styles.style,\n                id: itemId + $d2cae025305c9e56$var$NOTE_ID + \"-\" + $d2cae025305c9e56$var$graphItemCount,\n                domId: $d2cae025305c9e56$var$stateDomId(itemId, $d2cae025305c9e56$var$graphItemCount, $d2cae025305c9e56$var$NOTE),\n                type: newNode.type,\n                padding: 15\n            };\n            const groupData = {\n                labelStyle: \"\",\n                shape: $d2cae025305c9e56$var$SHAPE_NOTEGROUP,\n                labelText: parsedItem.note.text,\n                classes: newNode.classes,\n                style: \"\",\n                // styles.style,\n                id: itemId + $d2cae025305c9e56$var$PARENT_ID,\n                domId: $d2cae025305c9e56$var$stateDomId(itemId, $d2cae025305c9e56$var$graphItemCount, $d2cae025305c9e56$var$PARENT),\n                type: \"group\",\n                padding: 0\n            };\n            $d2cae025305c9e56$var$graphItemCount++;\n            const parentNodeId = itemId + $d2cae025305c9e56$var$PARENT_ID;\n            g.setNode(parentNodeId, groupData);\n            g.setNode(noteData.id, noteData);\n            g.setNode(itemId, nodeData);\n            g.setParent(itemId, parentNodeId);\n            g.setParent(noteData.id, parentNodeId);\n            let from = itemId;\n            let to = noteData.id;\n            if (parsedItem.note.position === \"left of\") {\n                from = noteData.id;\n                to = itemId;\n            }\n            g.setEdge(from, to, {\n                arrowhead: \"none\",\n                arrowType: \"\",\n                style: $d2cae025305c9e56$var$G_EDGE_STYLE,\n                labelStyle: \"\",\n                classes: $d2cae025305c9e56$var$CSS_EDGE_NOTE_EDGE,\n                arrowheadStyle: $d2cae025305c9e56$var$G_EDGE_ARROWHEADSTYLE,\n                labelpos: $d2cae025305c9e56$var$G_EDGE_LABELPOS,\n                labelType: $d2cae025305c9e56$var$G_EDGE_LABELTYPE,\n                thickness: $d2cae025305c9e56$var$G_EDGE_THICKNESS\n            });\n        } else g.setNode(itemId, nodeData);\n    }\n    if (parent && parent.id !== \"root\") {\n        (0, $4jcZX.l).trace(\"Setting node \", itemId, \" to be child of its parent \", parent.id);\n        g.setParent(itemId, parent.id);\n    }\n    if (parsedItem.doc) {\n        (0, $4jcZX.l).trace(\"Adding nodes children \");\n        $d2cae025305c9e56$var$setupDoc(g, parsedItem, parsedItem.doc, diagramStates, diagramDb, !altFlag);\n    }\n};\nconst $d2cae025305c9e56$var$setupDoc = (g, parentParsedItem, doc, diagramStates, diagramDb, altFlag)=>{\n    (0, $4jcZX.l).trace(\"items\", doc);\n    doc.forEach((item)=>{\n        switch(item.stmt){\n            case 0, $3ltxT.b:\n                $d2cae025305c9e56$var$setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag);\n                break;\n            case 0, $3ltxT.D:\n                $d2cae025305c9e56$var$setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag);\n                break;\n            case 0, $3ltxT.S:\n                {\n                    $d2cae025305c9e56$var$setupNode(g, parentParsedItem, item.state1, diagramStates, diagramDb, altFlag);\n                    $d2cae025305c9e56$var$setupNode(g, parentParsedItem, item.state2, diagramStates, diagramDb, altFlag);\n                    const edgeData = {\n                        id: \"edge\" + $d2cae025305c9e56$var$graphItemCount,\n                        arrowhead: \"normal\",\n                        arrowTypeEnd: \"arrow_barb\",\n                        style: $d2cae025305c9e56$var$G_EDGE_STYLE,\n                        labelStyle: \"\",\n                        label: (0, $4jcZX.e).sanitizeText(item.description, (0, $4jcZX.c)()),\n                        arrowheadStyle: $d2cae025305c9e56$var$G_EDGE_ARROWHEADSTYLE,\n                        labelpos: $d2cae025305c9e56$var$G_EDGE_LABELPOS,\n                        labelType: $d2cae025305c9e56$var$G_EDGE_LABELTYPE,\n                        thickness: $d2cae025305c9e56$var$G_EDGE_THICKNESS,\n                        classes: $d2cae025305c9e56$var$CSS_EDGE\n                    };\n                    g.setEdge(item.state1.id, item.state2.id, edgeData, $d2cae025305c9e56$var$graphItemCount);\n                    $d2cae025305c9e56$var$graphItemCount++;\n                }\n                break;\n        }\n    });\n};\nconst $d2cae025305c9e56$var$getDir = (parsedItem, defaultDir = (0, $3ltxT.c))=>{\n    let dir = defaultDir;\n    if (parsedItem.doc) for(let i = 0; i < parsedItem.doc.length; i++){\n        const parsedItemDoc = parsedItem.doc[i];\n        if (parsedItemDoc.stmt === \"dir\") dir = parsedItemDoc.value;\n    }\n    return dir;\n};\nconst $d2cae025305c9e56$var$draw = async function(text, id, _version, diag) {\n    (0, $4jcZX.l).info(\"Drawing state diagram (v2)\", id);\n    $d2cae025305c9e56$var$nodeDb = {};\n    diag.db.getDirection();\n    const { securityLevel: securityLevel, state: conf } = (0, $4jcZX.c)();\n    const nodeSpacing = conf.nodeSpacing || 50;\n    const rankSpacing = conf.rankSpacing || 50;\n    (0, $4jcZX.l).info(diag.db.getRootDocV2());\n    diag.db.extract(diag.db.getRootDocV2());\n    (0, $4jcZX.l).info(diag.db.getRootDocV2());\n    const diagramStates = diag.db.getStates();\n    const g = new $4LkSm.Graph({\n        multigraph: true,\n        compound: true\n    }).setGraph({\n        rankdir: $d2cae025305c9e56$var$getDir(diag.db.getRootDocV2()),\n        nodesep: nodeSpacing,\n        ranksep: rankSpacing,\n        marginx: 8,\n        marginy: 8\n    }).setDefaultEdgeLabel(function() {\n        return {};\n    });\n    $d2cae025305c9e56$var$setupNode(g, void 0, diag.db.getRootDocV2(), diagramStates, diag.db, true);\n    let sandboxElement;\n    if (securityLevel === \"sandbox\") sandboxElement = (0, $2YFJl.select)(\"#i\" + id);\n    const root = securityLevel === \"sandbox\" ? (0, $2YFJl.select)(sandboxElement.nodes()[0].contentDocument.body) : (0, $2YFJl.select)(\"body\");\n    const svg = root.select(`[id=\"${id}\"]`);\n    const element = root.select(\"#\" + id + \" g\");\n    await (0, $4FlE0.r)(element, g, [\n        \"barb\"\n    ], $d2cae025305c9e56$var$CSS_DIAGRAM, id);\n    const padding = 8;\n    (0, $4jcZX.u).insertTitle(svg, \"statediagramTitleText\", conf.titleTopMargin, diag.db.getDiagramTitle());\n    const bounds = svg.node().getBBox();\n    const width = bounds.width + padding * 2;\n    const height = bounds.height + padding * 2;\n    svg.attr(\"class\", $d2cae025305c9e56$var$CSS_DIAGRAM);\n    const svgBounds = svg.node().getBBox();\n    (0, $4jcZX.i)(svg, height, width, conf.useMaxWidth);\n    const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;\n    (0, $4jcZX.l).debug(`viewBox ${vBox}`);\n    svg.attr(\"viewBox\", vBox);\n    const labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n    for (const label of labels){\n        const dim = label.getBBox();\n        const rect = document.createElementNS(\"http://www.w3.org/2000/svg\", $d2cae025305c9e56$var$SHAPE_STATE);\n        rect.setAttribute(\"rx\", 0);\n        rect.setAttribute(\"ry\", 0);\n        rect.setAttribute(\"width\", dim.width);\n        rect.setAttribute(\"height\", dim.height);\n        label.insertBefore(rect, label.firstChild);\n    }\n};\nconst $d2cae025305c9e56$var$renderer = {\n    setConf: $d2cae025305c9e56$var$setConf,\n    getClasses: $d2cae025305c9e56$var$getClasses,\n    draw: $d2cae025305c9e56$var$draw\n};\nconst $d2cae025305c9e56$export$6118d022d940d562 = {\n    parser: $3ltxT.p,\n    db: $3ltxT.d,\n    renderer: $d2cae025305c9e56$var$renderer,\n    styles: $3ltxT.s,\n    init: (cnf)=>{\n        if (!cnf.state) cnf.state = {};\n        cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n        (0, $3ltxT.d).clear();\n    }\n};\n\n});\n\nparcelRegister(\"hNIl0\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $cf5967d89366f433$export$2e2bcd8739ae039);\n\nvar $gbpSA = parcelRequire(\"gbpSA\");\n/** Used to compose bitmasks for cloning. */ var $cf5967d89366f433$var$CLONE_SYMBOLS_FLAG = 4;\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */ function $cf5967d89366f433$var$clone(value) {\n    return (0, $gbpSA.default)(value, $cf5967d89366f433$var$CLONE_SYMBOLS_FLAG);\n}\nvar $cf5967d89366f433$export$2e2bcd8739ae039 = $cf5967d89366f433$var$clone;\n\n});\n\n\n//# sourceMappingURL=stateDiagram-v2-1992cada.08fa5e24.js.map\n","import { D as DEFAULT_STATE_TYPE, a as DIVIDER_TYPE, S as STMT_RELATION, b as STMT_STATE, c as DEFAULT_NESTED_DOC_DIR, p as parser, d as db, s as styles } from \"./styles-0784dbeb.js\";\nimport * as graphlib from \"dagre-d3-es/src/graphlib/index.js\";\nimport { select } from \"d3\";\nimport { l as log, c as getConfig, u as utils, i as configureSvgSize, e as common } from \"./mermaid-6dc72991.js\";\nimport { r as render } from \"./index-01f381cb.js\";\nimport \"ts-dedent\";\nimport \"dayjs\";\nimport \"@braintree/sanitize-url\";\nimport \"dompurify\";\nimport \"khroma\";\nimport \"lodash-es/memoize.js\";\nimport \"lodash-es/merge.js\";\nimport \"stylis\";\nimport \"lodash-es/isEmpty.js\";\nimport \"dagre-d3-es/src/dagre/index.js\";\nimport \"dagre-d3-es/src/graphlib/json.js\";\nimport \"./edges-066a5561.js\";\nimport \"./createText-ca0c5216.js\";\nimport \"mdast-util-from-markdown\";\nconst SHAPE_STATE = \"rect\";\nconst SHAPE_STATE_WITH_DESC = \"rectWithTitle\";\nconst SHAPE_START = \"start\";\nconst SHAPE_END = \"end\";\nconst SHAPE_DIVIDER = \"divider\";\nconst SHAPE_GROUP = \"roundedWithTitle\";\nconst SHAPE_NOTE = \"note\";\nconst SHAPE_NOTEGROUP = \"noteGroup\";\nconst CSS_DIAGRAM = \"statediagram\";\nconst CSS_STATE = \"state\";\nconst CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-${CSS_STATE}`;\nconst CSS_EDGE = \"transition\";\nconst CSS_NOTE = \"note\";\nconst CSS_NOTE_EDGE = \"note-edge\";\nconst CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} ${CSS_NOTE_EDGE}`;\nconst CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`;\nconst CSS_CLUSTER = \"cluster\";\nconst CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-${CSS_CLUSTER}`;\nconst CSS_CLUSTER_ALT = \"cluster-alt\";\nconst CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-${CSS_CLUSTER_ALT}`;\nconst PARENT = \"parent\";\nconst NOTE = \"note\";\nconst DOMID_STATE = \"state\";\nconst DOMID_TYPE_SPACER = \"----\";\nconst NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`;\nconst PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`;\nconst G_EDGE_STYLE = \"fill:none\";\nconst G_EDGE_ARROWHEADSTYLE = \"fill: #333\";\nconst G_EDGE_LABELPOS = \"c\";\nconst G_EDGE_LABELTYPE = \"text\";\nconst G_EDGE_THICKNESS = \"normal\";\nlet nodeDb = {};\nlet graphItemCount = 0;\nconst setConf = function(cnf) {\n  const keys = Object.keys(cnf);\n  for (const key of keys) {\n    cnf[key];\n  }\n};\nconst getClasses = function(text, diagramObj) {\n  diagramObj.db.extract(diagramObj.db.getRootDocV2());\n  return diagramObj.db.getClasses();\n};\nfunction getClassesFromDbInfo(dbInfoItem) {\n  if (dbInfoItem === void 0 || dbInfoItem === null) {\n    return \"\";\n  } else {\n    if (dbInfoItem.classes) {\n      return dbInfoItem.classes.join(\" \");\n    } else {\n      return \"\";\n    }\n  }\n}\nfunction stateDomId(itemId = \"\", counter = 0, type = \"\", typeSpacer = DOMID_TYPE_SPACER) {\n  const typeStr = type !== null && type.length > 0 ? `${typeSpacer}${type}` : \"\";\n  return `${DOMID_STATE}-${itemId}${typeStr}-${counter}`;\n}\nconst setupNode = (g, parent, parsedItem, diagramStates, diagramDb, altFlag) => {\n  const itemId = parsedItem.id;\n  const classStr = getClassesFromDbInfo(diagramStates[itemId]);\n  if (itemId !== \"root\") {\n    let shape = SHAPE_STATE;\n    if (parsedItem.start === true) {\n      shape = SHAPE_START;\n    }\n    if (parsedItem.start === false) {\n      shape = SHAPE_END;\n    }\n    if (parsedItem.type !== DEFAULT_STATE_TYPE) {\n      shape = parsedItem.type;\n    }\n    if (!nodeDb[itemId]) {\n      nodeDb[itemId] = {\n        id: itemId,\n        shape,\n        description: common.sanitizeText(itemId, getConfig()),\n        classes: `${classStr} ${CSS_DIAGRAM_STATE}`\n      };\n    }\n    const newNode = nodeDb[itemId];\n    if (parsedItem.description) {\n      if (Array.isArray(newNode.description)) {\n        newNode.shape = SHAPE_STATE_WITH_DESC;\n        newNode.description.push(parsedItem.description);\n      } else {\n        if (newNode.description.length > 0) {\n          newNode.shape = SHAPE_STATE_WITH_DESC;\n          if (newNode.description === itemId) {\n            newNode.description = [parsedItem.description];\n          } else {\n            newNode.description = [newNode.description, parsedItem.description];\n          }\n        } else {\n          newNode.shape = SHAPE_STATE;\n          newNode.description = parsedItem.description;\n        }\n      }\n      newNode.description = common.sanitizeTextOrArray(newNode.description, getConfig());\n    }\n    if (newNode.description.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) {\n      newNode.shape = SHAPE_STATE;\n    }\n    if (!newNode.type && parsedItem.doc) {\n      log.info(\"Setting cluster for \", itemId, getDir(parsedItem));\n      newNode.type = \"group\";\n      newNode.dir = getDir(parsedItem);\n      newNode.shape = parsedItem.type === DIVIDER_TYPE ? SHAPE_DIVIDER : SHAPE_GROUP;\n      newNode.classes = newNode.classes + \" \" + CSS_DIAGRAM_CLUSTER + \" \" + (altFlag ? CSS_DIAGRAM_CLUSTER_ALT : \"\");\n    }\n    const nodeData = {\n      labelStyle: \"\",\n      shape: newNode.shape,\n      labelText: newNode.description,\n      // typeof newNode.description === 'object'\n      //   ? newNode.description[0]\n      //   : newNode.description,\n      classes: newNode.classes,\n      style: \"\",\n      //styles.style,\n      id: itemId,\n      dir: newNode.dir,\n      domId: stateDomId(itemId, graphItemCount),\n      type: newNode.type,\n      padding: 15\n      //getConfig().flowchart.padding\n    };\n    nodeData.centerLabel = true;\n    if (parsedItem.note) {\n      const noteData = {\n        labelStyle: \"\",\n        shape: SHAPE_NOTE,\n        labelText: parsedItem.note.text,\n        classes: CSS_DIAGRAM_NOTE,\n        // useHtmlLabels: false,\n        style: \"\",\n        // styles.style,\n        id: itemId + NOTE_ID + \"-\" + graphItemCount,\n        domId: stateDomId(itemId, graphItemCount, NOTE),\n        type: newNode.type,\n        padding: 15\n        //getConfig().flowchart.padding\n      };\n      const groupData = {\n        labelStyle: \"\",\n        shape: SHAPE_NOTEGROUP,\n        labelText: parsedItem.note.text,\n        classes: newNode.classes,\n        style: \"\",\n        // styles.style,\n        id: itemId + PARENT_ID,\n        domId: stateDomId(itemId, graphItemCount, PARENT),\n        type: \"group\",\n        padding: 0\n        //getConfig().flowchart.padding\n      };\n      graphItemCount++;\n      const parentNodeId = itemId + PARENT_ID;\n      g.setNode(parentNodeId, groupData);\n      g.setNode(noteData.id, noteData);\n      g.setNode(itemId, nodeData);\n      g.setParent(itemId, parentNodeId);\n      g.setParent(noteData.id, parentNodeId);\n      let from = itemId;\n      let to = noteData.id;\n      if (parsedItem.note.position === \"left of\") {\n        from = noteData.id;\n        to = itemId;\n      }\n      g.setEdge(from, to, {\n        arrowhead: \"none\",\n        arrowType: \"\",\n        style: G_EDGE_STYLE,\n        labelStyle: \"\",\n        classes: CSS_EDGE_NOTE_EDGE,\n        arrowheadStyle: G_EDGE_ARROWHEADSTYLE,\n        labelpos: G_EDGE_LABELPOS,\n        labelType: G_EDGE_LABELTYPE,\n        thickness: G_EDGE_THICKNESS\n      });\n    } else {\n      g.setNode(itemId, nodeData);\n    }\n  }\n  if (parent && parent.id !== \"root\") {\n    log.trace(\"Setting node \", itemId, \" to be child of its parent \", parent.id);\n    g.setParent(itemId, parent.id);\n  }\n  if (parsedItem.doc) {\n    log.trace(\"Adding nodes children \");\n    setupDoc(g, parsedItem, parsedItem.doc, diagramStates, diagramDb, !altFlag);\n  }\n};\nconst setupDoc = (g, parentParsedItem, doc, diagramStates, diagramDb, altFlag) => {\n  log.trace(\"items\", doc);\n  doc.forEach((item) => {\n    switch (item.stmt) {\n      case STMT_STATE:\n        setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag);\n        break;\n      case DEFAULT_STATE_TYPE:\n        setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag);\n        break;\n      case STMT_RELATION:\n        {\n          setupNode(g, parentParsedItem, item.state1, diagramStates, diagramDb, altFlag);\n          setupNode(g, parentParsedItem, item.state2, diagramStates, diagramDb, altFlag);\n          const edgeData = {\n            id: \"edge\" + graphItemCount,\n            arrowhead: \"normal\",\n            arrowTypeEnd: \"arrow_barb\",\n            style: G_EDGE_STYLE,\n            labelStyle: \"\",\n            label: common.sanitizeText(item.description, getConfig()),\n            arrowheadStyle: G_EDGE_ARROWHEADSTYLE,\n            labelpos: G_EDGE_LABELPOS,\n            labelType: G_EDGE_LABELTYPE,\n            thickness: G_EDGE_THICKNESS,\n            classes: CSS_EDGE\n          };\n          g.setEdge(item.state1.id, item.state2.id, edgeData, graphItemCount);\n          graphItemCount++;\n        }\n        break;\n    }\n  });\n};\nconst getDir = (parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => {\n  let dir = defaultDir;\n  if (parsedItem.doc) {\n    for (let i = 0; i < parsedItem.doc.length; i++) {\n      const parsedItemDoc = parsedItem.doc[i];\n      if (parsedItemDoc.stmt === \"dir\") {\n        dir = parsedItemDoc.value;\n      }\n    }\n  }\n  return dir;\n};\nconst draw = async function(text, id, _version, diag) {\n  log.info(\"Drawing state diagram (v2)\", id);\n  nodeDb = {};\n  diag.db.getDirection();\n  const { securityLevel, state: conf } = getConfig();\n  const nodeSpacing = conf.nodeSpacing || 50;\n  const rankSpacing = conf.rankSpacing || 50;\n  log.info(diag.db.getRootDocV2());\n  diag.db.extract(diag.db.getRootDocV2());\n  log.info(diag.db.getRootDocV2());\n  const diagramStates = diag.db.getStates();\n  const g = new graphlib.Graph({\n    multigraph: true,\n    compound: true\n  }).setGraph({\n    rankdir: getDir(diag.db.getRootDocV2()),\n    nodesep: nodeSpacing,\n    ranksep: rankSpacing,\n    marginx: 8,\n    marginy: 8\n  }).setDefaultEdgeLabel(function() {\n    return {};\n  });\n  setupNode(g, void 0, diag.db.getRootDocV2(), diagramStates, diag.db, true);\n  let sandboxElement;\n  if (securityLevel === \"sandbox\") {\n    sandboxElement = select(\"#i\" + id);\n  }\n  const root = securityLevel === \"sandbox\" ? select(sandboxElement.nodes()[0].contentDocument.body) : select(\"body\");\n  const svg = root.select(`[id=\"${id}\"]`);\n  const element = root.select(\"#\" + id + \" g\");\n  await render(element, g, [\"barb\"], CSS_DIAGRAM, id);\n  const padding = 8;\n  utils.insertTitle(svg, \"statediagramTitleText\", conf.titleTopMargin, diag.db.getDiagramTitle());\n  const bounds = svg.node().getBBox();\n  const width = bounds.width + padding * 2;\n  const height = bounds.height + padding * 2;\n  svg.attr(\"class\", CSS_DIAGRAM);\n  const svgBounds = svg.node().getBBox();\n  configureSvgSize(svg, height, width, conf.useMaxWidth);\n  const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;\n  log.debug(`viewBox ${vBox}`);\n  svg.attr(\"viewBox\", vBox);\n  const labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n  for (const label of labels) {\n    const dim = label.getBBox();\n    const rect = document.createElementNS(\"http://www.w3.org/2000/svg\", SHAPE_STATE);\n    rect.setAttribute(\"rx\", 0);\n    rect.setAttribute(\"ry\", 0);\n    rect.setAttribute(\"width\", dim.width);\n    rect.setAttribute(\"height\", dim.height);\n    label.insertBefore(rect, label.firstChild);\n  }\n};\nconst renderer = {\n  setConf,\n  getClasses,\n  draw\n};\nconst diagram = {\n  parser,\n  db,\n  renderer,\n  styles,\n  init: (cnf) => {\n    if (!cnf.state) {\n      cnf.state = {};\n    }\n    cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n    db.clear();\n  }\n};\nexport {\n  diagram\n};\n","import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n  return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nexport default clone;\n"],"names":["$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","parcelRequire","$parcel$global","globalThis","parcelRegister","register","module","exports","$d2cae025305c9e56$export$6118d022d940d562","$3ltxT","$4LkSm","$2YFJl","$4jcZX","$4FlE0","$d2cae025305c9e56$var$SHAPE_STATE","$d2cae025305c9e56$var$SHAPE_STATE_WITH_DESC","$d2cae025305c9e56$var$CSS_DIAGRAM","$d2cae025305c9e56$var$CSS_DIAGRAM_STATE","$d2cae025305c9e56$var$CSS_EDGE","$d2cae025305c9e56$var$CSS_EDGE_NOTE_EDGE","$d2cae025305c9e56$var$CSS_DIAGRAM_NOTE","$d2cae025305c9e56$var$CSS_DIAGRAM_CLUSTER","$d2cae025305c9e56$var$CSS_DIAGRAM_CLUSTER_ALT","$d2cae025305c9e56$var$PARENT","$d2cae025305c9e56$var$NOTE","$d2cae025305c9e56$var$DOMID_TYPE_SPACER","$d2cae025305c9e56$var$NOTE_ID","$d2cae025305c9e56$var$PARENT_ID","$d2cae025305c9e56$var$G_EDGE_STYLE","$d2cae025305c9e56$var$G_EDGE_ARROWHEADSTYLE","$d2cae025305c9e56$var$G_EDGE_LABELTYPE","$d2cae025305c9e56$var$G_EDGE_THICKNESS","$d2cae025305c9e56$var$nodeDb","$d2cae025305c9e56$var$graphItemCount","$d2cae025305c9e56$var$stateDomId","itemId","counter","type","typeSpacer","typeStr","length","$d2cae025305c9e56$var$setupNode","g","parent","parsedItem","diagramStates","diagramDb","altFlag","dbInfoItem","id","classStr","classes","join","shape","start","D","description","sanitizeText","c","newNode","Array","isArray","push","sanitizeTextOrArray","doc","l","info","$d2cae025305c9e56$var$getDir","dir","a","nodeData","labelStyle","labelText","style","domId","padding","centerLabel","note","noteData","text","groupData","parentNodeId","setNode","setParent","from","to","position","setEdge","arrowhead","arrowType","arrowheadStyle","labelpos","labelType","thickness","trace","$d2cae025305c9e56$var$setupDoc","parentParsedItem","forEach","item","stmt","b","S","state1","state2","edgeData","arrowTypeEnd","label","defaultDir","i","parsedItemDoc","value","$d2cae025305c9e56$var$draw","_version","diag","sandboxElement","db","getDirection","securityLevel","state","conf","nodeSpacing","rankSpacing","getRootDocV2","extract","getStates","Graph","multigraph","compound","setGraph","rankdir","nodesep","ranksep","marginx","marginy","setDefaultEdgeLabel","select","root","nodes","contentDocument","body","svg","element","r","u","insertTitle","titleTopMargin","getDiagramTitle","bounds","node","getBBox","width","height","attr","svgBounds","useMaxWidth","vBox","x","y","debug","document","querySelectorAll","dim","rect","createElementNS","setAttribute","insertBefore","firstChild","parser","p","d","renderer","setConf","cnf","key","keys","getClasses","diagramObj","draw","styles","init","arrowMarkerAbsolute","clear","$cf5967d89366f433$export$2e2bcd8739ae039","$gbpSA","default"],"version":3,"file":"stateDiagram-v2-1992cada.08fa5e24.js.map"}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy