@blueking/bkflow-canvas-editor 1.1.0-beta.8 → 1.2.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,553 +1,605 @@
1
- import h from "bkui-vue/lib/message";
2
- import L, { AxiosHeaders as k } from "axios";
3
- const P = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M13,12%20L3,12%20C2.72385763,12%202.5,12.2238576%202.5,12.5%20C2.5,12.7761424%202.72385763,13%203,13%20L13,13%20C13.2761424,13%2013.5,12.7761424%2013.5,12.5%20C13.5,12.2238576%2013.2761424,12%2013,12%20Z%20M5,6.5%20L4,6.5%20C3.72385763,6.5%203.5,6.72385763%203.5,7%20L3.5,10.5%20C3.5,10.7761424%203.72385763,11%204,11%20L5,11%20C5.27614237,11%205.5,10.7761424%205.5,10.5%20L5.5,7%20C5.5,6.72385763%205.27614237,6.5%205,6.5%20Z%20M8.5,3.5%20L7.5,3.5%20C7.22385763,3.5%207,3.72385763%207,4%20L7,10.5%20C7,10.7761424%207.22385763,11%207.5,11%20L8.5,11%20C8.77614237,11%209,10.7761424%209,10.5%20L9,4%20C9,3.72385763%208.77614237,3.5%208.5,3.5%20Z%20M12,5%20L11,5%20C10.7238576,5%2010.5,5.22385763%2010.5,5.5%20L10.5,10.5%20C10.5,10.7761424%2010.7238576,11%2011,11%20L12,11%20C12.2761424,11%2012.5,10.7761424%2012.5,10.5%20L12.5,5.5%20C12.5,5.22385763%2012.2761424,5%2012,5%20Z'%20fill='%23F8A54F'%20fill-rule='evenodd'/%3e%3c/svg%3e", D = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='19loczb8h__f71x3hmpea'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.5,2.5%20C6.17779929,2.5%204.26643215,4.28054945%204.02558864,6.56651687%20L4.026,6.558%20L4.03,6.54%20L3.99928094,6.75189877%20C3.76394842,8.11436335%203.07389664,8.46527789%203.00547979,8.87325046%20L3,8.93829715%20C3,9.39912427%204.33397403,9.2134945%204.33397403,9.69904945%20L4.33397403,10.9924271%20C4.33401331,11.5290486%204.757596,11.9699791%205.29378397,11.9915459%20C5.90300757,12.0163699%206.26264111,12.0687043%206.37268552,12.1485262%20C6.45725813,12.2098718%206.51932943,12.4266274%206.55889942,12.7987929%20L6.57276328,12.9456332%20C6.61875295,13.4959998%207.10219523,13.904878%207.65256183,13.8588884%20C7.70929358,13.8541478%207.76551689,13.8445713%207.82061902,13.8302632%20L10.1746185,13.2277878%20C10.5547586,13.1298644%2010.8424468,12.818586%2010.9101698,12.431922%20C11.0509156,11.6378879%2011.2333254,10.9899099%2011.4579782,10.4880363%20C12.402959,9.65300356%2013,8.42466038%2013,7.05516145%20C13,4.53941525%2010.9852814,2.5%208.5,2.5%20Z%20M8.9876109,3.8125%20C9.12361371,3.8219246%209.2572817,3.84136285%209.38686376,3.87081473%20L9.51119251,4.49813988%20C9.7435063,4.58296131%209.9565579,4.70842634%2010.1410081,4.86687748%20L10.7410548,4.6624814%20C10.8461213,4.77852183%2010.9412649,4.90339782%2011.0247344,5.03652034%20L11.1333032,5.22560144%20C11.2050986,5.36461434%2011.2658038,5.51128472%2011.3125,5.66384549%20L10.8356146,6.08677455%20C10.8560442,6.20399306%2010.8665509,6.32474578%2010.8665509,6.4484437%20C10.8665509,6.57390873%2010.8554605,6.69642857%2010.8344472,6.81541419%20L11.3101652,7.23775422%20C11.1934246,7.61473834%2010.9949656,7.95579117%2010.7358014,8.2391183%20L10.135171,8.03413318%20C9.95188828,8.19022817%209.74117149,8.31392609%209.51177621,8.39815848%20L9.38744747,9.02607267%20C9.20182991,9.06789435%209.00920792,9.09027778%208.81133259,9.09027778%20C8.61579208,9.09027778%208.4249212,9.06848338%208.24163845,9.02725074%20L8.11730971,8.40051463%20C7.88616332,8.31628224%207.67369542,8.19199529%207.48924527,8.03531126%20L6.88803117,8.24029638%20C6.79055277,8.13368056%206.70182991,8.0188182%206.6224463,7.89747644%20L6.47068352,7.63240947%20C6.408811,7.50753348%206.35569402,7.37676711%206.31366741,7.24128844%20L6.78938536,6.81894841%20C6.76778835,6.69878472%206.75669799,6.57449777%206.75669799,6.44785466%20C6.75669799,6.32297867%206.76778835,6.20045883%206.78880166,6.08147321%20L6.3125,5.65913318%20C6.3504407,5.53661334%206.39713694,5.41821677%206.45142132,5.30394345%20L6.64696183,4.96230159%20C6.719341,4.8562748%206.79814091,4.75496032%206.88452895,4.66071429%20L7.48457565,4.8656994%20C7.67077691,4.70665923%207.88499591,4.58060516%208.11906082,4.49578373%20L8.24338956,3.86904762%20C8.37122052,3.84077381%208.50197,3.82133557%208.63622169,3.8125%20Z%20M8.8119163,5.50598338%20C8.29592283,5.50598338%207.87799148,5.92773437%207.87799148,6.4484437%20C7.87799148,6.96915303%208.29592283,7.39090402%208.8119163,7.39090402%20C9.32790976,7.39090402%209.74584112,6.96915303%209.74584112,6.4484437%20C9.74584112,5.92773437%209.32790976,5.50598338%208.8119163,5.50598338%20Z%20M8.8119163,5.88296751%20C9.12139176,5.88296751%209.37227119,6.13613982%209.37227119,6.4484437%20C9.37227119,6.76074758%209.12139176,7.01391989%208.8119163,7.01391989%20C8.50244084,7.01391989%208.25156141,6.76074758%208.25156141,6.4484437%20C8.25156141,6.13613982%208.50244084,5.88296751%208.8119163,5.88296751%20Z'%20fill='url(%2319loczb8h__f71x3hmpea)'%20fill-rule='evenodd'/%3e%3c/svg%3e", y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.03846154,2.5%20C7.295,2.5%206.6923077,3.10269231%206.6923077,3.84615384%20L6.6923077,4.42307693%20L4.38461538,4.42307693%20C4.17230769,4.42307693%204,4.59538461%204,4.8076923%20L4,6.92307693%20L4.57692308,6.92307693%20C5.32038461,6.92307693%205.92307693,7.52576923%205.92307693,8.26923077%20C5.92307693,9.0126923%205.32038461,9.61538461%204.57692308,9.61538461%20L4,9.61538461%20L4,12.1153846%20C4,12.3276923%204.17230769,12.5%204.38461538,12.5%20L6.6923077,12.5%20L6.6923077,11.9230769%20C6.6923077,11.1796154%207.295,10.5769231%208.03846154,10.5769231%20C8.78192307,10.5769231%209.38461539,11.1796154%209.38461539,11.9230769%20L9.38461539,12.5%20L11.6923077,12.5%20C11.9046154,12.5%2012.0769231,12.3276923%2012.0769231,12.1153846%20L12.0769231,9.61538461%20L12.6538462,9.61538461%20C13.3973077,9.61538461%2014,9.0126923%2014,8.26923077%20C14,7.52576923%2013.3973077,6.92307693%2012.6538462,6.92307693%20L12.0769231,6.92307693%20L12.0769231,4.8076923%20C12.0769231,4.59538461%2011.9046154,4.42307693%2011.6923077,4.42307693%20L9.38461539,4.42307693%20L9.38461539,3.84615384%20C9.38461539,3.10269231%208.78192307,2.5%208.03846154,2.5%20Z'%20fill='%235AB88E'%20fill-rule='evenodd'/%3e%3c/svg%3e", T = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='vgdxp7v4l__zvhmfdo4ha'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.44875881,3.88645164%20C7.88887563,4.38553286%207.31548649,5.06473362%206.78138741,5.85400744%20C6.4216379,5.88402737%206.07416654,5.92655559%205.74142896,5.98159211%20C5.68126606,5.77270348%205.6321535,5.570069%205.59409127,5.37619034%20C5.50937211,4.9434031%205.48727146,4.57065572%205.52901714,4.29797476%20C5.55848467,4.10784858%205.61741973,3.97275892%205.6935442,3.92772904%20C5.81878123,3.85393006%206.26447771,3.90646492%207.05027868,4.63319723%20L7.64454064,3.96650477%20C7.22094482,3.57499494%206.82067746,3.29856148%206.45356107,3.14470937%20C6.13432943,3.01087055%205.66653229,2.90329916%205.25153116,3.14721103%20C4.84512474,3.38611959%204.42398453,3.99777552%204.72725459,5.55130656%20C4.76531682,5.74893772%204.81442938,5.95282302%204.87336445,6.16421332%20C4.66586389,6.21799902%204.46818584,6.27678802%204.2815581,6.34183119%20C2.80940913,6.85216989%202.5,7.528869%202.5,8.0066861%20C2.5,8.49826234%202.82905415,8.85850142%203.10654011,9.07364421%20C3.42454394,9.32130857%203.86532916,9.53770219%204.41661765,9.71532006%20L4.68428111,8.85725059%20C3.65660079,8.5257806%203.38525389,8.1555349%203.38525389,8.0066861%20C3.38525389,7.91787716%203.46997306,7.79654664%203.61731074,7.67646695%20C3.82849474,7.50385239%204.15754889,7.33749199%204.56641096,7.19489735%20C4.75058305,7.13110501%204.9470333,7.07356682%205.15330604,7.02228279%20C5.27240401,7.34374613%205.41114699,7.67271446%205.56585156,8.00543527%20C5.34975629,8.47074408%205.16558418,8.93230041%205.01824651,9.37384344%20C4.76040556,10.1518598%204.62534603,10.8610805%204.62780166,11.4227032%20C4.63025729,11.9092761%204.74076054,12.5522028%205.25521461,12.8549037%20C5.43570327,12.9612243%205.62478661,13%205.80895872,13%20C6.05083808,13%206.2804393,12.9312044%206.46338358,12.8549037%20C6.8329556,12.6998008%207.23567859,12.4196148%207.66050223,12.0243525%20L7.06501244,11.3589109%20C6.27184459,12.0956498%205.82369249,12.1494355%205.69722765,12.0743857%20C5.60882504,12.0218508%205.51428337,11.8229689%205.51182774,11.4176999%20C5.50937211,10.9536419%205.62847006,10.3457385%205.85561565,9.66028354%20C5.92437324,9.45264574%206.00172552,9.24125546%206.08890031,9.02611266%20C6.10363407,9.05112927%206.11714004,9.07614586%206.13187381,9.1024133%20C6.59967093,9.92671036%207.13254221,10.6947201%207.67400818,11.321386%20C8.20687945,11.9380452%208.74220636,12.4121098%209.22105382,12.691045%20C9.49240072,12.8499004%209.84601114,13%2010.2008494,13%20C10.3874771,13%2010.5753327,12.9587226%2010.7533657,12.8536529%20C11.2678198,12.550952%2011.378323,11.9067745%2011.3807786,11.4202015%20C11.3832343,10.8585788%2011.2481747,10.1493581%2010.9903338,9.37009095%20C10.8589577,8.97232696%2010.6956584,8.55705136%2010.5065751,8.13802326%20L9.70235691,8.5170248%20C9.87916211,8.9072838%2010.0301832,9.29128866%2010.1517368,9.66028354%20C10.3788824,10.3457385%2010.4979804,10.9536419%2010.4955247,11.4189507%20C10.4942969,11.8242197%2010.3985274,12.0243525%2010.3101248,12.0756365%20C10.2217222,12.1281714%2010.0043991,12.1119106%209.65938341,11.910527%20C9.2640273,11.6803742%208.80605269,11.2713527%208.33702774,10.7272417%20C7.833624,10.1443548%207.33513152,9.42762914%206.89680191,8.65336529%20C6.77402052,8.43697167%206.658606,8.22182889%206.55055837,8.00543527%20C6.65983383,7.78654%206.77647615,7.56889555%206.89925754,7.35250195%20C7.02081114,7.13735916%207.14604815,6.92847053%207.27496864,6.72583605%20C7.51316455,6.71332774%207.7550439,6.70707359%208.00060669,6.70707359%20C9.30454518,6.70707359%2010.5249923,6.88093898%2011.4348024,7.19614818%20C11.8448923,7.33749199%2012.1727187,7.50385239%2012.3839027,7.67771778%20C12.5312403,7.7990483%2012.6159595,7.91912799%2012.6159595,8.00793694%20C12.6159595,8.10425085%2012.5189622,8.23433719%2012.3495239,8.36567435%20C12.111328,8.54954639%2011.7442116,8.72341178%2011.2886926,8.86850806%20L11.5526726,9.72782838%20C12.1125558,9.55021049%2012.5607079,9.33256604%2012.883623,9.08365086%20C13.1647924,8.86725724%2013.5,8.50451651%2013.5,8.00793694%20C13.5012134,7.528869%2013.1918043,6.85216989%2011.7196553,6.34183119%20C10.7202147,5.99535125%209.39908685,5.80522507%208.00060669,5.80522507%20L7.91097628,5.80522507%20C8.2805483,5.31740132%208.66117063,4.89587157%209.03197046,4.56440157%20C9.35734117,4.27420898%209.66306686,4.06782201%209.91599654,3.9677556%20C10.0928018,3.89770911%2010.2376838,3.88394998%2010.3138083,3.92772904%20C10.3960718,3.97651141%2010.4586903,4.12786186%2010.4844744,4.34425547%20C10.5213088,4.64945802%2010.4844744,5.06348279%2010.3776546,5.54129991%20L11.23958,5.7401819%20C11.3697283,5.15354257%2011.411474,4.64695636%2011.3611336,4.23418242%20C11.3181601,3.87519417%2011.1781893,3.39612623%2010.7545935,3.14721103%20C10.3481871,2.90830248%209.61886555,2.84200848%208.44875881,3.88645164%20Z%20M8.42307307,6.91304349%20C7.83892612,6.91304349%207.36538145,7.39969049%207.36538145,8%20C7.36538145,8.60030951%207.83892612,9.08695653%208.42307307,9.08695653%20C9.00722001,9.08695653%209.48076468,8.60030951%209.48076468,8%20C9.48076468,7.39969049%209.00722001,6.91304349%208.42307307,6.91304349%20Z'%20fill='url(%23vgdxp7v4l__zvhmfdo4ha)'%20fill-rule='evenodd'/%3e%3c/svg%3e", x = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='7doce0e6d__r8m44v5xza'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M11,3.5%20L5,3.5%20C3.8954305,3.5%203,4.3954305%203,5.5%20L3,9.5%20C3,10.6045695%203.8954305,11.5%205,11.5%20L9.536,11.5%20L12.0312272,13.0147852%20L11.4996566,11.5%20L11.0252355,11.4998441%20C12.1181756,11.4863297%2013,10.5961454%2013,9.5%20L13,5.5%20C13,4.3954305%2012.1045695,3.5%2011,3.5%20Z%20M8,9%20C8.27614237,9%208.5,9.22385763%208.5,9.5%20C8.5,9.77614237%208.27614237,10%208,10%20L5,10%20C4.72385763,10%204.5,9.77614237%204.5,9.5%20C4.5,9.22385763%204.72385763,9%205,9%20Z%20M11,7%20C11.2761424,7%2011.5,7.22385763%2011.5,7.5%20C11.5,7.77614237%2011.2761424,8%2011,8%20L5,8%20C4.72385763,8%204.5,7.77614237%204.5,7.5%20C4.5,7.22385763%204.72385763,7%205,7%20Z%20M11,5%20C11.2761424,5%2011.5,5.22385763%2011.5,5.5%20C11.5,5.77614237%2011.2761424,6%2011,6%20L5,6%20C4.72385763,6%204.5,5.77614237%204.5,5.5%20C4.5,5.22385763%204.72385763,5%205,5%20Z'%20fill='url(%237doce0e6d__r8m44v5xza)'%20fill-rule='evenodd'/%3e%3c/svg%3e", F = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='32px'%20height='32px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIcon/Node/知识库%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='2.20648492%25'%20y1='2.12255434%25'%20x2='100%25'%20y2='96.1961861%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%234DB9E3'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23BA70EF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Icon/Node/知识库'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M28,2%20C29.1045695,2%2030,2.8954305%2030,4%20L30,28%20C30,29.1045695%2029.1045695,30%2028,30%20L4,30%20C2.8954305,30%202,29.1045695%202,28%20L2,4%20C2,2.8954305%202.8954305,2%204,2%20L28,2%20Z%20M17.3479972,6%20L14.1475857,6%20C13.7208642,6%2013.3652629,6.35778176%2013.3652629,6.78711986%20L13.3652629,25.2128801%20C13.3652629,25.6422183%2013.7208642,26%2014.1475857,26%20L17.3479972,26%20C17.7747188,26%2018.1303201,25.6422183%2018.1303201,25.2128801%20L18.1303201,6.78711986%20C18.1658802,6.35778176%2017.8102789,6%2017.3479972,6%20Z%20M10.9827343,8.64758499%20L7.78232282,8.64758499%20C7.35560129,8.64758499%207,9.00536675%207,9.43470484%20L7,25.2128801%20C7,25.6422183%207.35560129,26%207.78232282,26%20L10.9827343,26%20C11.4094559,26%2011.7650571,25.6422183%2011.7650571,25.2128801%20L11.7650571,9.43470484%20C11.7650571,9.00536673%2011.4094559,8.64758499%2010.9827343,8.64758499%20Z%20M22.1841746,8.25402505%20L22.0419342,8.25402505%20L18.9126429,8.86225404%20C18.4859213,8.93381039%2018.2014403,9.36314849%2018.2725606,9.7924866%20L21.2951715,25.3202147%20C21.3662917,25.7137746%2021.6863328,25.9642218%2022.0774943,25.9642218%20L22.2197348,25.9642218%20L25.349026,25.3559928%20C25.7757476,25.2486584%2026.0602286,24.8193202%2025.9891084,24.3899821%20L23.0020576,8.89803221%20C22.8953773,8.50447228%2022.575336,8.25402505%2022.1841746,8.25402505%20Z%20M10.0937311,10.4364937%20C10.4848925,10.4364937%2010.8049337,10.7584973%2010.8049337,11.1520572%20C10.8049337,11.5456172%2010.4848925,11.8676208%2010.0937311,11.8676208%20L8.67132601,11.8676208%20C8.28016461,11.8676208%207.96012346,11.5456172%207.96012346,11.1520572%20C7.96012346,10.7584973%208.28016461,10.4364937%208.67132601,10.4364937%20L10.0937311,10.4364937%20Z%20M22.4686557,10.4722719%20C22.539776,10.8658319%2022.2908551,11.2593918%2021.8996937,11.3309481%20L20.4772885,11.6171735%20L20.335048,11.6171735%20C20.0150069,11.6171735%2019.6949657,11.3667263%2019.6238455,11.0447227%20C19.5527252,10.6511628%2019.8016461,10.2576029%2020.1928074,10.1860465%20L21.6152126,9.89982112%20C22.006374,9.82826478%2022.3975355,10.078712%2022.4686557,10.4722719%20Z%20M16.4945542,7.82468694%20C16.8857156,7.82468694%2017.2057567,8.14669052%2017.2057567,8.54025046%20C17.2057567,8.9338104%2016.8857156,9.25581397%2016.4945542,9.25581397%20L15.072149,9.25581397%20C14.6809876,9.25581397%2014.3609465,8.93381039%2014.3609465,8.54025046%20C14.3609465,8.14669054%2014.6809876,7.82468694%2015.072149,7.82468694%20L16.4945542,7.82468694%20Z'%20id='形状结合备份'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", m = y, b = {
4
- bkflow: y,
5
- data: P,
6
- agent: D,
7
- model: T,
8
- output: x,
9
- knowledgebase: F
10
- }, $ = {
1
+ import x from "bkui-vue/lib/message";
2
+ import v, { AxiosHeaders as I } from "axios";
3
+ import { provide as S, inject as M } from "vue";
4
+ const E = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M13,12%20L3,12%20C2.72385763,12%202.5,12.2238576%202.5,12.5%20C2.5,12.7761424%202.72385763,13%203,13%20L13,13%20C13.2761424,13%2013.5,12.7761424%2013.5,12.5%20C13.5,12.2238576%2013.2761424,12%2013,12%20Z%20M5,6.5%20L4,6.5%20C3.72385763,6.5%203.5,6.72385763%203.5,7%20L3.5,10.5%20C3.5,10.7761424%203.72385763,11%204,11%20L5,11%20C5.27614237,11%205.5,10.7761424%205.5,10.5%20L5.5,7%20C5.5,6.72385763%205.27614237,6.5%205,6.5%20Z%20M8.5,3.5%20L7.5,3.5%20C7.22385763,3.5%207,3.72385763%207,4%20L7,10.5%20C7,10.7761424%207.22385763,11%207.5,11%20L8.5,11%20C8.77614237,11%209,10.7761424%209,10.5%20L9,4%20C9,3.72385763%208.77614237,3.5%208.5,3.5%20Z%20M12,5%20L11,5%20C10.7238576,5%2010.5,5.22385763%2010.5,5.5%20L10.5,10.5%20C10.5,10.7761424%2010.7238576,11%2011,11%20L12,11%20C12.2761424,11%2012.5,10.7761424%2012.5,10.5%20L12.5,5.5%20C12.5,5.22385763%2012.2761424,5%2012,5%20Z'%20fill='%23F8A54F'%20fill-rule='evenodd'/%3e%3c/svg%3e", B = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='19loczb8h__f71x3hmpea'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.5,2.5%20C6.17779929,2.5%204.26643215,4.28054945%204.02558864,6.56651687%20L4.026,6.558%20L4.03,6.54%20L3.99928094,6.75189877%20C3.76394842,8.11436335%203.07389664,8.46527789%203.00547979,8.87325046%20L3,8.93829715%20C3,9.39912427%204.33397403,9.2134945%204.33397403,9.69904945%20L4.33397403,10.9924271%20C4.33401331,11.5290486%204.757596,11.9699791%205.29378397,11.9915459%20C5.90300757,12.0163699%206.26264111,12.0687043%206.37268552,12.1485262%20C6.45725813,12.2098718%206.51932943,12.4266274%206.55889942,12.7987929%20L6.57276328,12.9456332%20C6.61875295,13.4959998%207.10219523,13.904878%207.65256183,13.8588884%20C7.70929358,13.8541478%207.76551689,13.8445713%207.82061902,13.8302632%20L10.1746185,13.2277878%20C10.5547586,13.1298644%2010.8424468,12.818586%2010.9101698,12.431922%20C11.0509156,11.6378879%2011.2333254,10.9899099%2011.4579782,10.4880363%20C12.402959,9.65300356%2013,8.42466038%2013,7.05516145%20C13,4.53941525%2010.9852814,2.5%208.5,2.5%20Z%20M8.9876109,3.8125%20C9.12361371,3.8219246%209.2572817,3.84136285%209.38686376,3.87081473%20L9.51119251,4.49813988%20C9.7435063,4.58296131%209.9565579,4.70842634%2010.1410081,4.86687748%20L10.7410548,4.6624814%20C10.8461213,4.77852183%2010.9412649,4.90339782%2011.0247344,5.03652034%20L11.1333032,5.22560144%20C11.2050986,5.36461434%2011.2658038,5.51128472%2011.3125,5.66384549%20L10.8356146,6.08677455%20C10.8560442,6.20399306%2010.8665509,6.32474578%2010.8665509,6.4484437%20C10.8665509,6.57390873%2010.8554605,6.69642857%2010.8344472,6.81541419%20L11.3101652,7.23775422%20C11.1934246,7.61473834%2010.9949656,7.95579117%2010.7358014,8.2391183%20L10.135171,8.03413318%20C9.95188828,8.19022817%209.74117149,8.31392609%209.51177621,8.39815848%20L9.38744747,9.02607267%20C9.20182991,9.06789435%209.00920792,9.09027778%208.81133259,9.09027778%20C8.61579208,9.09027778%208.4249212,9.06848338%208.24163845,9.02725074%20L8.11730971,8.40051463%20C7.88616332,8.31628224%207.67369542,8.19199529%207.48924527,8.03531126%20L6.88803117,8.24029638%20C6.79055277,8.13368056%206.70182991,8.0188182%206.6224463,7.89747644%20L6.47068352,7.63240947%20C6.408811,7.50753348%206.35569402,7.37676711%206.31366741,7.24128844%20L6.78938536,6.81894841%20C6.76778835,6.69878472%206.75669799,6.57449777%206.75669799,6.44785466%20C6.75669799,6.32297867%206.76778835,6.20045883%206.78880166,6.08147321%20L6.3125,5.65913318%20C6.3504407,5.53661334%206.39713694,5.41821677%206.45142132,5.30394345%20L6.64696183,4.96230159%20C6.719341,4.8562748%206.79814091,4.75496032%206.88452895,4.66071429%20L7.48457565,4.8656994%20C7.67077691,4.70665923%207.88499591,4.58060516%208.11906082,4.49578373%20L8.24338956,3.86904762%20C8.37122052,3.84077381%208.50197,3.82133557%208.63622169,3.8125%20Z%20M8.8119163,5.50598338%20C8.29592283,5.50598338%207.87799148,5.92773437%207.87799148,6.4484437%20C7.87799148,6.96915303%208.29592283,7.39090402%208.8119163,7.39090402%20C9.32790976,7.39090402%209.74584112,6.96915303%209.74584112,6.4484437%20C9.74584112,5.92773437%209.32790976,5.50598338%208.8119163,5.50598338%20Z%20M8.8119163,5.88296751%20C9.12139176,5.88296751%209.37227119,6.13613982%209.37227119,6.4484437%20C9.37227119,6.76074758%209.12139176,7.01391989%208.8119163,7.01391989%20C8.50244084,7.01391989%208.25156141,6.76074758%208.25156141,6.4484437%20C8.25156141,6.13613982%208.50244084,5.88296751%208.8119163,5.88296751%20Z'%20fill='url(%2319loczb8h__f71x3hmpea)'%20fill-rule='evenodd'/%3e%3c/svg%3e", T = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.03846154,2.5%20C7.295,2.5%206.6923077,3.10269231%206.6923077,3.84615384%20L6.6923077,4.42307693%20L4.38461538,4.42307693%20C4.17230769,4.42307693%204,4.59538461%204,4.8076923%20L4,6.92307693%20L4.57692308,6.92307693%20C5.32038461,6.92307693%205.92307693,7.52576923%205.92307693,8.26923077%20C5.92307693,9.0126923%205.32038461,9.61538461%204.57692308,9.61538461%20L4,9.61538461%20L4,12.1153846%20C4,12.3276923%204.17230769,12.5%204.38461538,12.5%20L6.6923077,12.5%20L6.6923077,11.9230769%20C6.6923077,11.1796154%207.295,10.5769231%208.03846154,10.5769231%20C8.78192307,10.5769231%209.38461539,11.1796154%209.38461539,11.9230769%20L9.38461539,12.5%20L11.6923077,12.5%20C11.9046154,12.5%2012.0769231,12.3276923%2012.0769231,12.1153846%20L12.0769231,9.61538461%20L12.6538462,9.61538461%20C13.3973077,9.61538461%2014,9.0126923%2014,8.26923077%20C14,7.52576923%2013.3973077,6.92307693%2012.6538462,6.92307693%20L12.0769231,6.92307693%20L12.0769231,4.8076923%20C12.0769231,4.59538461%2011.9046154,4.42307693%2011.6923077,4.42307693%20L9.38461539,4.42307693%20L9.38461539,3.84615384%20C9.38461539,3.10269231%208.78192307,2.5%208.03846154,2.5%20Z'%20fill='%235AB88E'%20fill-rule='evenodd'/%3e%3c/svg%3e", A = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='vgdxp7v4l__zvhmfdo4ha'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.44875881,3.88645164%20C7.88887563,4.38553286%207.31548649,5.06473362%206.78138741,5.85400744%20C6.4216379,5.88402737%206.07416654,5.92655559%205.74142896,5.98159211%20C5.68126606,5.77270348%205.6321535,5.570069%205.59409127,5.37619034%20C5.50937211,4.9434031%205.48727146,4.57065572%205.52901714,4.29797476%20C5.55848467,4.10784858%205.61741973,3.97275892%205.6935442,3.92772904%20C5.81878123,3.85393006%206.26447771,3.90646492%207.05027868,4.63319723%20L7.64454064,3.96650477%20C7.22094482,3.57499494%206.82067746,3.29856148%206.45356107,3.14470937%20C6.13432943,3.01087055%205.66653229,2.90329916%205.25153116,3.14721103%20C4.84512474,3.38611959%204.42398453,3.99777552%204.72725459,5.55130656%20C4.76531682,5.74893772%204.81442938,5.95282302%204.87336445,6.16421332%20C4.66586389,6.21799902%204.46818584,6.27678802%204.2815581,6.34183119%20C2.80940913,6.85216989%202.5,7.528869%202.5,8.0066861%20C2.5,8.49826234%202.82905415,8.85850142%203.10654011,9.07364421%20C3.42454394,9.32130857%203.86532916,9.53770219%204.41661765,9.71532006%20L4.68428111,8.85725059%20C3.65660079,8.5257806%203.38525389,8.1555349%203.38525389,8.0066861%20C3.38525389,7.91787716%203.46997306,7.79654664%203.61731074,7.67646695%20C3.82849474,7.50385239%204.15754889,7.33749199%204.56641096,7.19489735%20C4.75058305,7.13110501%204.9470333,7.07356682%205.15330604,7.02228279%20C5.27240401,7.34374613%205.41114699,7.67271446%205.56585156,8.00543527%20C5.34975629,8.47074408%205.16558418,8.93230041%205.01824651,9.37384344%20C4.76040556,10.1518598%204.62534603,10.8610805%204.62780166,11.4227032%20C4.63025729,11.9092761%204.74076054,12.5522028%205.25521461,12.8549037%20C5.43570327,12.9612243%205.62478661,13%205.80895872,13%20C6.05083808,13%206.2804393,12.9312044%206.46338358,12.8549037%20C6.8329556,12.6998008%207.23567859,12.4196148%207.66050223,12.0243525%20L7.06501244,11.3589109%20C6.27184459,12.0956498%205.82369249,12.1494355%205.69722765,12.0743857%20C5.60882504,12.0218508%205.51428337,11.8229689%205.51182774,11.4176999%20C5.50937211,10.9536419%205.62847006,10.3457385%205.85561565,9.66028354%20C5.92437324,9.45264574%206.00172552,9.24125546%206.08890031,9.02611266%20C6.10363407,9.05112927%206.11714004,9.07614586%206.13187381,9.1024133%20C6.59967093,9.92671036%207.13254221,10.6947201%207.67400818,11.321386%20C8.20687945,11.9380452%208.74220636,12.4121098%209.22105382,12.691045%20C9.49240072,12.8499004%209.84601114,13%2010.2008494,13%20C10.3874771,13%2010.5753327,12.9587226%2010.7533657,12.8536529%20C11.2678198,12.550952%2011.378323,11.9067745%2011.3807786,11.4202015%20C11.3832343,10.8585788%2011.2481747,10.1493581%2010.9903338,9.37009095%20C10.8589577,8.97232696%2010.6956584,8.55705136%2010.5065751,8.13802326%20L9.70235691,8.5170248%20C9.87916211,8.9072838%2010.0301832,9.29128866%2010.1517368,9.66028354%20C10.3788824,10.3457385%2010.4979804,10.9536419%2010.4955247,11.4189507%20C10.4942969,11.8242197%2010.3985274,12.0243525%2010.3101248,12.0756365%20C10.2217222,12.1281714%2010.0043991,12.1119106%209.65938341,11.910527%20C9.2640273,11.6803742%208.80605269,11.2713527%208.33702774,10.7272417%20C7.833624,10.1443548%207.33513152,9.42762914%206.89680191,8.65336529%20C6.77402052,8.43697167%206.658606,8.22182889%206.55055837,8.00543527%20C6.65983383,7.78654%206.77647615,7.56889555%206.89925754,7.35250195%20C7.02081114,7.13735916%207.14604815,6.92847053%207.27496864,6.72583605%20C7.51316455,6.71332774%207.7550439,6.70707359%208.00060669,6.70707359%20C9.30454518,6.70707359%2010.5249923,6.88093898%2011.4348024,7.19614818%20C11.8448923,7.33749199%2012.1727187,7.50385239%2012.3839027,7.67771778%20C12.5312403,7.7990483%2012.6159595,7.91912799%2012.6159595,8.00793694%20C12.6159595,8.10425085%2012.5189622,8.23433719%2012.3495239,8.36567435%20C12.111328,8.54954639%2011.7442116,8.72341178%2011.2886926,8.86850806%20L11.5526726,9.72782838%20C12.1125558,9.55021049%2012.5607079,9.33256604%2012.883623,9.08365086%20C13.1647924,8.86725724%2013.5,8.50451651%2013.5,8.00793694%20C13.5012134,7.528869%2013.1918043,6.85216989%2011.7196553,6.34183119%20C10.7202147,5.99535125%209.39908685,5.80522507%208.00060669,5.80522507%20L7.91097628,5.80522507%20C8.2805483,5.31740132%208.66117063,4.89587157%209.03197046,4.56440157%20C9.35734117,4.27420898%209.66306686,4.06782201%209.91599654,3.9677556%20C10.0928018,3.89770911%2010.2376838,3.88394998%2010.3138083,3.92772904%20C10.3960718,3.97651141%2010.4586903,4.12786186%2010.4844744,4.34425547%20C10.5213088,4.64945802%2010.4844744,5.06348279%2010.3776546,5.54129991%20L11.23958,5.7401819%20C11.3697283,5.15354257%2011.411474,4.64695636%2011.3611336,4.23418242%20C11.3181601,3.87519417%2011.1781893,3.39612623%2010.7545935,3.14721103%20C10.3481871,2.90830248%209.61886555,2.84200848%208.44875881,3.88645164%20Z%20M8.42307307,6.91304349%20C7.83892612,6.91304349%207.36538145,7.39969049%207.36538145,8%20C7.36538145,8.60030951%207.83892612,9.08695653%208.42307307,9.08695653%20C9.00722001,9.08695653%209.48076468,8.60030951%209.48076468,8%20C9.48076468,7.39969049%209.00722001,6.91304349%208.42307307,6.91304349%20Z'%20fill='url(%23vgdxp7v4l__zvhmfdo4ha)'%20fill-rule='evenodd'/%3e%3c/svg%3e", N = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='7doce0e6d__r8m44v5xza'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M11,3.5%20L5,3.5%20C3.8954305,3.5%203,4.3954305%203,5.5%20L3,9.5%20C3,10.6045695%203.8954305,11.5%205,11.5%20L9.536,11.5%20L12.0312272,13.0147852%20L11.4996566,11.5%20L11.0252355,11.4998441%20C12.1181756,11.4863297%2013,10.5961454%2013,9.5%20L13,5.5%20C13,4.3954305%2012.1045695,3.5%2011,3.5%20Z%20M8,9%20C8.27614237,9%208.5,9.22385763%208.5,9.5%20C8.5,9.77614237%208.27614237,10%208,10%20L5,10%20C4.72385763,10%204.5,9.77614237%204.5,9.5%20C4.5,9.22385763%204.72385763,9%205,9%20Z%20M11,7%20C11.2761424,7%2011.5,7.22385763%2011.5,7.5%20C11.5,7.77614237%2011.2761424,8%2011,8%20L5,8%20C4.72385763,8%204.5,7.77614237%204.5,7.5%20C4.5,7.22385763%204.72385763,7%205,7%20Z%20M11,5%20C11.2761424,5%2011.5,5.22385763%2011.5,5.5%20C11.5,5.77614237%2011.2761424,6%2011,6%20L5,6%20C4.72385763,6%204.5,5.77614237%204.5,5.5%20C4.5,5.22385763%204.72385763,5%205,5%20Z'%20fill='url(%237doce0e6d__r8m44v5xza)'%20fill-rule='evenodd'/%3e%3c/svg%3e", O = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='32px'%20height='32px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIcon/Node/知识库%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='2.20648492%25'%20y1='2.12255434%25'%20x2='100%25'%20y2='96.1961861%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%234DB9E3'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23BA70EF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Icon/Node/知识库'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M28,2%20C29.1045695,2%2030,2.8954305%2030,4%20L30,28%20C30,29.1045695%2029.1045695,30%2028,30%20L4,30%20C2.8954305,30%202,29.1045695%202,28%20L2,4%20C2,2.8954305%202.8954305,2%204,2%20L28,2%20Z%20M17.3479972,6%20L14.1475857,6%20C13.7208642,6%2013.3652629,6.35778176%2013.3652629,6.78711986%20L13.3652629,25.2128801%20C13.3652629,25.6422183%2013.7208642,26%2014.1475857,26%20L17.3479972,26%20C17.7747188,26%2018.1303201,25.6422183%2018.1303201,25.2128801%20L18.1303201,6.78711986%20C18.1658802,6.35778176%2017.8102789,6%2017.3479972,6%20Z%20M10.9827343,8.64758499%20L7.78232282,8.64758499%20C7.35560129,8.64758499%207,9.00536675%207,9.43470484%20L7,25.2128801%20C7,25.6422183%207.35560129,26%207.78232282,26%20L10.9827343,26%20C11.4094559,26%2011.7650571,25.6422183%2011.7650571,25.2128801%20L11.7650571,9.43470484%20C11.7650571,9.00536673%2011.4094559,8.64758499%2010.9827343,8.64758499%20Z%20M22.1841746,8.25402505%20L22.0419342,8.25402505%20L18.9126429,8.86225404%20C18.4859213,8.93381039%2018.2014403,9.36314849%2018.2725606,9.7924866%20L21.2951715,25.3202147%20C21.3662917,25.7137746%2021.6863328,25.9642218%2022.0774943,25.9642218%20L22.2197348,25.9642218%20L25.349026,25.3559928%20C25.7757476,25.2486584%2026.0602286,24.8193202%2025.9891084,24.3899821%20L23.0020576,8.89803221%20C22.8953773,8.50447228%2022.575336,8.25402505%2022.1841746,8.25402505%20Z%20M10.0937311,10.4364937%20C10.4848925,10.4364937%2010.8049337,10.7584973%2010.8049337,11.1520572%20C10.8049337,11.5456172%2010.4848925,11.8676208%2010.0937311,11.8676208%20L8.67132601,11.8676208%20C8.28016461,11.8676208%207.96012346,11.5456172%207.96012346,11.1520572%20C7.96012346,10.7584973%208.28016461,10.4364937%208.67132601,10.4364937%20L10.0937311,10.4364937%20Z%20M22.4686557,10.4722719%20C22.539776,10.8658319%2022.2908551,11.2593918%2021.8996937,11.3309481%20L20.4772885,11.6171735%20L20.335048,11.6171735%20C20.0150069,11.6171735%2019.6949657,11.3667263%2019.6238455,11.0447227%20C19.5527252,10.6511628%2019.8016461,10.2576029%2020.1928074,10.1860465%20L21.6152126,9.89982112%20C22.006374,9.82826478%2022.3975355,10.078712%2022.4686557,10.4722719%20Z%20M16.4945542,7.82468694%20C16.8857156,7.82468694%2017.2057567,8.14669052%2017.2057567,8.54025046%20C17.2057567,8.9338104%2016.8857156,9.25581397%2016.4945542,9.25581397%20L15.072149,9.25581397%20C14.6809876,9.25581397%2014.3609465,8.93381039%2014.3609465,8.54025046%20C14.3609465,8.14669054%2014.6809876,7.82468694%2015.072149,7.82468694%20L16.4945542,7.82468694%20Z'%20id='形状结合备份'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", y = T, P = {
5
+ bkflow: T,
6
+ data: E,
7
+ agent: B,
8
+ model: A,
9
+ output: N,
10
+ knowledgebase: O
11
+ }, q = {
11
12
  bkflow: "bkflow-canvas-icon bkflow-canvas-plugin",
12
13
  data: "bkflow-canvas-icon bkflow-canvas-data",
13
14
  agent: "bkflow-canvas-icon bkflow-canvas-zhinengti",
14
15
  model: "bkflow-canvas-icon bkflow-canvas-model-filled",
15
16
  knowledgebase: "bkflow-canvas-icon bkflow-canvas-knowledgebase-filled"
16
- }, I = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1), E = (o = 8) => {
17
- let t = "";
18
- for (let r = 0; r < o - 1; r++)
19
- t += I();
20
- return t;
21
- }, _ = (o = 32) => {
22
- let t = "";
23
- const r = "abcdef0123456789";
24
- for (let u = 0; u < o; u++)
25
- t += r.charAt(Math.floor(Math.random() * r.length));
26
- return t;
27
- }, v = () => `00-${_(32)}-${_(16)}-01`;
28
- function M(o) {
29
- if (o.axiosInstance)
30
- return o.axiosInstance;
31
- const t = v(), r = {
32
- ...o.axiosConfig?.headers || {},
33
- traceparent: o.axiosConfig?.headers?.traceparent ?? t
34
- }, { headers: u, ...l } = o.axiosConfig || {}, i = {
35
- baseURL: o.baseURL || window.API_HOST,
36
- xsrfCookieName: o.xsrfCookieName || "bk-incident_csrftoken",
37
- xsrfHeaderName: "X-CSRFToken",
38
- withCredentials: !0,
39
- // 合并外部传入的其他配置(排除 headers)
40
- ...l,
41
- // 设置合并后的 headers(保留 traceparent 逻辑)
42
- headers: r
43
- }, a = L.create(i);
44
- return a.interceptors.response.use(
45
- (n) => {
46
- const { data: e } = n;
47
- return Object.prototype.toString.call(e) === "[object Object]" && e.result === !1 ? (e.message && !e.message.includes("1211011") && h({ theme: "error", message: e.message, ellipsisLine: 3 }), Promise.reject(e.message)) : n.data;
48
- },
49
- (n) => {
50
- const { response: e } = n;
51
- if (e) {
52
- let s = e.statusText;
53
- if (e.status === 401 || e.status === 404)
54
- return Promise.reject(n);
55
- e.data.err_msg ? s = e.data.err_msg : e.data.message && (s = e.data.message), h({ theme: "error", message: s, ellipsisLine: 3 });
17
+ }, C = "请求失败";
18
+ class d extends Error {
19
+ httpStatus;
20
+ code;
21
+ data;
22
+ cause;
23
+ constructor(e, s = {}) {
24
+ super(e || C), this.name = "ApiError", this.httpStatus = s.httpStatus, this.code = s.code, this.data = s.data, this.cause = s.cause;
25
+ }
26
+ }
27
+ const h = (a) => Object.prototype.toString.call(a) === "[object Object]", L = (a) => h(a) && typeof a.result == "boolean" && Object.prototype.hasOwnProperty.call(a, "data") && (Object.prototype.hasOwnProperty.call(a, "code") || Object.prototype.hasOwnProperty.call(a, "message")), w = (a) => typeof a == "string" ? a : h(a) ? typeof a.err_msg == "string" ? a.err_msg : typeof a.message == "string" ? a.message : typeof a.detail == "string" ? a.detail : h(a.detail) && typeof a.detail.detail == "string" ? a.detail.detail : "" : "";
28
+ function R(a) {
29
+ const e = h(a) && typeof a.status == "number" && Object.prototype.hasOwnProperty.call(a, "config") && Object.prototype.hasOwnProperty.call(a, "data"), s = e ? a.data : a;
30
+ if (!L(s)) return s;
31
+ if (s.result) return s.data;
32
+ throw new d(w(s) || C, {
33
+ code: s.code === void 0 || s.code === null ? void 0 : String(s.code),
34
+ httpStatus: e ? a.status : void 0,
35
+ data: s.data,
36
+ cause: a
37
+ });
38
+ }
39
+ function G(a) {
40
+ if (a instanceof d) return a;
41
+ if (v.isAxiosError(a)) {
42
+ const e = a.response?.data;
43
+ return L(e) && !e.result ? new d(w(e) || a.message || C, {
44
+ httpStatus: a.response?.status,
45
+ code: e.code === void 0 || e.code === null ? void 0 : String(e.code),
46
+ data: e.data,
47
+ cause: a
48
+ }) : new d(w(e) || a.response?.statusText || a.message || C, {
49
+ httpStatus: a.response?.status,
50
+ data: e,
51
+ cause: a
52
+ });
53
+ }
54
+ if (h(a) && h(a.response)) {
55
+ const e = a.response, s = e.data;
56
+ return L(s) && !s.result ? new d(w(s) || C, {
57
+ httpStatus: typeof e.status == "number" ? e.status : void 0,
58
+ code: s.code === void 0 || s.code === null ? void 0 : String(s.code),
59
+ data: s.data,
60
+ cause: a
61
+ }) : new d(
62
+ w(s) || (typeof e.statusText == "string" ? e.statusText : "") || C,
63
+ {
64
+ httpStatus: typeof e.status == "number" ? e.status : void 0,
65
+ data: s,
66
+ cause: a
56
67
  }
57
- return Promise.reject(n);
58
- }
59
- ), a;
68
+ );
69
+ }
70
+ return a instanceof Error ? new d(a.message, { cause: a }) : typeof a == "string" ? new d(a, { cause: a }) : new d(w(a) || C, { data: a, cause: a });
60
71
  }
61
- function N(o) {
62
- const t = o.axiosInstance, r = t?.defaults.headers ? k.from(t.defaults.headers).toJSON() : {}, u = o.axiosConfig?.headers ?? {}, { headers: l, ...i } = o.axiosConfig ?? {}, a = {
63
- baseURL: o.baseURL ?? t?.defaults.baseURL ?? window.API_HOST,
64
- xsrfCookieName: o.xsrfCookieName ?? t?.defaults.xsrfCookieName ?? "bk-incident_csrftoken",
65
- xsrfHeaderName: t?.defaults.xsrfHeaderName ?? "X-CSRFToken",
66
- withCredentials: t?.defaults.withCredentials ?? !0,
67
- ...i,
68
- headers: {
69
- ...r,
70
- ...u
72
+ const Z = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1), e2 = (a = 8) => {
73
+ let e = "";
74
+ for (let s = 0; s < a - 1; s++)
75
+ e += Z();
76
+ return e;
77
+ }, D = (a = 32) => {
78
+ let e = "";
79
+ const s = "abcdef0123456789";
80
+ for (let u = 0; u < a; u++)
81
+ e += s.charAt(Math.floor(Math.random() * s.length));
82
+ return e;
83
+ }, $ = () => `00-${D(32)}-${D(16)}-01`, V = (a) => a.httpStatus !== 401 && a.httpStatus !== 404 && !!a.message && !a.message.includes("1211011");
84
+ function U(a) {
85
+ const { headers: e, ...s } = a.axiosConfig || {}, u = {
86
+ baseURL: a.baseURL || (typeof window > "u" ? void 0 : window.API_HOST),
87
+ xsrfCookieName: a.xsrfCookieName || "bk-incident_csrftoken",
88
+ xsrfHeaderName: "X-CSRFToken",
89
+ withCredentials: !0,
90
+ ...s,
91
+ headers: a.axiosConfig?.headers
92
+ }, i = a.axiosInstance ?? v.create(u), c = (r = {}) => {
93
+ const t = { ...r }, o = I.from(t.headers);
94
+ return o.has("traceparent") || o.set("traceparent", $()), { ...t, headers: o };
95
+ };
96
+ async function n(r, t = {}) {
97
+ try {
98
+ return R(await r());
99
+ } catch (o) {
100
+ const l = G(o);
101
+ throw t.errorHandling !== "delegate" && V(l) && x({ theme: "error", message: l.message, ellipsisLine: 3 }), l;
71
102
  }
72
- }, n = L.create(a);
73
- return n.interceptors.request.use((e) => (e.headers = k.from(e.headers), e.headers.has("traceparent") || e.headers.set("traceparent", v()), e)), n.interceptors.response.use(
74
- // 成功:解全站信封。result===false 视为业务错误并 reject;否则返回载荷 data。
75
- (e) => {
76
- const s = e.data;
77
- return s && typeof s == "object" && "result" in s ? s.result === !1 ? Promise.reject({
78
- response: {
79
- status: e.status,
80
- statusText: e.statusText,
81
- data: s
82
- }
83
- }) : s.data : s;
84
- },
85
- // 失败:不弹 toast,直接 reject,错误呈现交给业务侧。
86
- (e) => Promise.reject(e)
87
- ), n;
88
- }
89
- const d = "/bkflow/template";
90
- function B(o, t) {
91
- const { scope_type: r, scope_value: u, space_id: l } = t, i = (a) => ({
92
- template_id: Number(a),
93
- space_id: l,
94
- scope_type: r,
95
- scope_value: u
96
- });
103
+ }
97
104
  return {
98
- fetchDebugContext(a) {
99
- return o.get(`${d}/debug_context/`, {
100
- params: i(a)
101
- });
102
- },
103
- fetchDebugInputSchema(a) {
104
- return o.get(`${d}/debug_input_schema/`, {
105
- params: i(a)
106
- });
105
+ request(r) {
106
+ return n(() => i.request(c(r)), r);
107
107
  },
108
- fetchDebugHistory(a) {
109
- return o.get(`${d}/debug_history/`, {
110
- params: i(a)
111
- });
108
+ get(r, t = {}) {
109
+ return n(() => i.get(r, c(t)), t);
112
110
  },
113
- fetchDebugResetImpact(a) {
114
- return o.post(`${d}/debug_reset_impact/`, {
115
- ...i(a)
116
- });
111
+ delete(r, t = {}) {
112
+ return n(() => i.delete(r, c(t)), t);
117
113
  },
118
- updateDebugContextVariable(a) {
119
- return o.post(`${d}/debug_context_var/`, {
120
- ...i(a.templateId),
121
- key: a.key,
122
- value: a.value
123
- });
114
+ post(r, t, o = {}) {
115
+ return n(() => i.post(r, t, c(o)), o);
124
116
  },
125
- updateNodeDebugMock(a) {
126
- const n = {
127
- ...i(a.templateId),
128
- node_id: a.nodeId,
129
- enable: a.enable
130
- };
131
- return a.mockResult !== void 0 && (n.mock_result = a.mockResult), a.mockOutputs !== void 0 && (n.mock_outputs = a.mockOutputs), a.mockError !== void 0 && (n.mock_error = a.mockError), o.post(`${d}/debug_node_mock/`, n);
117
+ put(r, t, o = {}) {
118
+ return n(() => i.put(r, t, c(o)), o);
132
119
  },
133
- runNodeDebugStep(a) {
134
- const n = {
135
- ...i(a.templateId),
136
- node_id: a.nodeId,
137
- mode: a.mode
138
- };
139
- return a.inputOverrides !== void 0 && (n.input_overrides = a.inputOverrides), a.mockResult !== void 0 && (n.mock_result = a.mockResult), a.mockOutputs !== void 0 && (n.mock_outputs = a.mockOutputs), a.mockError !== void 0 && (n.mock_error = a.mockError), o.post(`${d}/debug_step_run/`, n);
120
+ patch(r, t, o = {}) {
121
+ return n(() => i.patch(r, t, c(o)), o);
122
+ }
123
+ };
124
+ }
125
+ const p = "/bkflow/template", g = { errorHandling: "delegate" };
126
+ function j(a, e) {
127
+ const { scope_type: s, scope_value: u, space_id: i } = e, c = (n) => ({
128
+ template_id: Number(n),
129
+ space_id: i,
130
+ scope_type: s,
131
+ scope_value: u
132
+ });
133
+ return {
134
+ fetchDebugContext(n) {
135
+ return a.get(`${p}/debug_context/`, {
136
+ ...g,
137
+ params: c(n)
138
+ });
140
139
  },
141
- runGlobalDebug(a) {
142
- return o.post(`${d}/debug_global_run/`, {
143
- ...i(a.templateId),
144
- inputs: a.inputs
140
+ fetchDebugInputSchema(n) {
141
+ return a.get(`${p}/debug_input_schema/`, {
142
+ ...g,
143
+ params: c(n)
145
144
  });
146
145
  },
147
- terminateDebug(a) {
148
- const n = {
149
- ...i(a.templateId)
146
+ fetchDebugResetImpact(n) {
147
+ return a.post(
148
+ `${p}/debug_reset_impact/`,
149
+ { ...c(n) },
150
+ g
151
+ );
152
+ },
153
+ updateNodeDebugMock(n) {
154
+ const r = {
155
+ ...c(n.templateId),
156
+ node_id: n.nodeId,
157
+ enable: n.enable
150
158
  };
151
- return a.nodeId !== void 0 && (n.node_id = a.nodeId), o.post(`${d}/debug_terminate/`, n);
159
+ return n.mockResult !== void 0 && (r.mock_result = n.mockResult), n.mockOutputs !== void 0 && (r.mock_outputs = n.mockOutputs), n.mockError !== void 0 && (r.mock_error = n.mockError), a.post(`${p}/debug_node_mock/`, r, g);
152
160
  },
153
- resetDebugResult(a) {
154
- const n = {
155
- ...i(a.templateId)
161
+ runNodeDebugStep(n) {
162
+ const r = {
163
+ ...c(n.templateId),
164
+ node_id: n.nodeId,
165
+ mode: n.mode
156
166
  };
157
- return a.nodeIds !== void 0 && (n.node_ids = a.nodeIds), o.post(`${d}/debug_reset/`, n);
167
+ return n.inputOverrides !== void 0 && (r.input_overrides = n.inputOverrides), n.mockResult !== void 0 && (r.mock_result = n.mockResult), n.mockOutputs !== void 0 && (r.mock_outputs = n.mockOutputs), n.mockError !== void 0 && (r.mock_error = n.mockError), a.post(`${p}/debug_step_run/`, r, g);
168
+ },
169
+ runGlobalDebug(n) {
170
+ return a.post(
171
+ `${p}/debug_global_run/`,
172
+ { ...c(n.templateId), inputs: n.inputs },
173
+ g
174
+ );
175
+ },
176
+ terminateDebug(n) {
177
+ const r = { ...c(n.templateId) };
178
+ return n.nodeId !== void 0 && (r.node_id = n.nodeId), a.post(`${p}/debug_terminate/`, r, g);
179
+ },
180
+ resetDebugResult(n) {
181
+ const r = { ...c(n.templateId) };
182
+ return n.nodeIds !== void 0 && (r.node_ids = n.nodeIds), a.post(`${p}/debug_reset/`, r, g);
158
183
  }
159
184
  };
160
185
  }
161
- const S = 0, A = (o = []) => [
186
+ const z = 0, H = ["dmn_plugin", "subprocess_plugin"], K = (a = []) => [
162
187
  {
163
188
  code_name: "INNER",
164
- id: S,
189
+ id: z,
165
190
  name: "内置",
166
191
  priority: 1
167
192
  },
168
- ...o
193
+ ...a
169
194
  ];
170
- function R(o) {
171
- const t = M(o), { scopeData: r } = o, u = B(N(o), r), l = (e) => ({ ...e, ...r }), i = async () => (await t.get("/bkflow/plugin/tags/", {
172
- params: { ...r }
173
- })).data, a = async () => [
174
- ...(await t.get("/metas/category/list_categories/", {
175
- params: r
176
- })).data.map((s) => ({
177
- ...s,
178
- iconUrl: b[s.name] ?? m
195
+ function W(a) {
196
+ const e = U(a), { scopeData: s } = a, u = j(e, s), i = (t) => ({ ...t, ...s }), c = async () => await e.get("/bkflow/plugin/tags/", {
197
+ params: { ...s }
198
+ }), n = async () => [
199
+ ...(await e.get("/metas/category/list_categories/", {
200
+ params: s
201
+ })).map((o) => ({
202
+ ...o,
203
+ iconUrl: P[o.name] ?? y
179
204
  })),
180
205
  {
181
206
  id: "bkflow",
182
207
  name: "bkflow",
183
208
  alias: "插件",
184
209
  properties: {},
185
- iconUrl: b.bkflow ?? m
210
+ iconUrl: P.bkflow ?? y
186
211
  }
187
- ], n = async (e) => (await t.post("/metas/plugin/list_plugins/", l({ category: e }))).data.apis;
212
+ ], r = async (t) => (await e.post(
213
+ "/metas/plugin/list_plugins/",
214
+ i({ category: t })
215
+ )).apis;
188
216
  return {
189
217
  ...u,
190
218
  /**
191
219
  * 获取流程详情
192
220
  */
193
- async fetchFlowDetail(e) {
194
- return (await t.get(`/bkflow/template/${e}/fetch_template/`, {
195
- params: r
196
- })).data;
221
+ async fetchFlowDetail(t) {
222
+ return await e.get(`/bkflow/template/${t}/fetch_template/`, {
223
+ params: s
224
+ });
197
225
  },
198
226
  /**
199
227
  * 获取流程某个版本下的详情
200
228
  */
201
- async fetchFlowDetailByVersion(e, s) {
202
- return (await t.post(`/bkflow/template/${e}/preview_task_tree/`, {
203
- ...r,
229
+ async fetchFlowDetailByVersion(t, o) {
230
+ return await e.post(`/bkflow/template/${t}/preview_task_tree/`, {
231
+ ...s,
204
232
  is_all_nodes: !0,
205
- version: s
206
- })).data;
233
+ version: o
234
+ });
207
235
  },
208
236
  /**
209
237
  * 获取流程草稿详情
210
238
  * @param id 流程id
211
239
  * @returns 流程草稿详情
212
240
  */
213
- async fetchFlowDraftDetail(e) {
214
- return (await t.get(`/bkflow/template/${e}/get_draft_template/`, {
215
- params: r
216
- })).data;
241
+ async fetchFlowDraftDetail(t) {
242
+ return await e.get(`/bkflow/template/${t}/get_draft_template/`, {
243
+ params: s
244
+ });
217
245
  },
218
246
  /**
219
247
  * 获取空间下流程相关配置
220
248
  */
221
- async fetchSpaceFlowConfig(e) {
222
- return (await t.get(`/bkflow/template/${e}/get_space_related_configs/`, {
223
- params: r
224
- })).data;
249
+ async fetchSpaceFlowConfig(t) {
250
+ return await e.get(`/bkflow/template/${t}/get_space_related_configs/`, {
251
+ params: s
252
+ });
225
253
  },
226
254
  /**
227
255
  * 获取系统变量
228
256
  */
229
- async fetchSystemVariables(e) {
230
- const s = await t.get("/bkflow/variable/system_variables/", {
231
- params: { template_id: e, ...r }
257
+ async fetchSystemVariables(t) {
258
+ const o = await e.get("/bkflow/variable/system_variables/", {
259
+ params: { template_id: t, ...s }
232
260
  });
233
- return Object.values(s.data);
261
+ return Object.values(o);
234
262
  },
235
263
  /**
236
264
  * 保存流程
237
265
  */
238
- async saveFlow(e, s) {
239
- await t.put(`/bkflow/template/${e}/update_template/`, l(s));
266
+ async saveFlow(t, o) {
267
+ await e.put(`/bkflow/template/${t}/update_template/`, i(o));
240
268
  },
241
269
  /**
242
270
  * 获取内置变量详情
243
271
  */
244
- async fetchInnerVariableDetail(e) {
245
- return (await t.get(`/bkflow/variable/${e}/variable_class_detail/`, {
246
- params: { ...r }
247
- })).data;
272
+ async fetchInnerVariableDetail(t) {
273
+ return await e.get(`/bkflow/variable/${t}/variable_class_detail/`, {
274
+ params: { ...s }
275
+ });
248
276
  },
249
277
  /**
250
278
  * 获取bkflow内置插件列表
251
279
  */
252
280
  async fetchBkFlowInnerPluginList() {
253
- return (await t.get("/bkflow/inner_plugin/plugins/", {
254
- params: { ...r }
255
- })).data.filter((c) => c.code !== "dmn_plugin");
281
+ return (await e.get("/bkflow/inner_plugin/plugins/", {
282
+ params: { ...s }
283
+ })).filter((o) => !H.includes(o.code));
256
284
  },
257
285
  /**
258
286
  * 获取bkflow内置插件详情
259
287
  */
260
- async fetchBkFlowInnerPluginDetail(e, s) {
261
- return (await t.get(`/bkflow/inner_plugin/${e}/plugin_detail/`, {
262
- params: { version: s, ...r }
263
- })).data;
288
+ async fetchBkFlowInnerPluginDetail(t, o) {
289
+ return await e.get(`/bkflow/inner_plugin/${t}/plugin_detail/`, {
290
+ params: { version: o, ...s }
291
+ });
264
292
  },
265
293
  /**
266
294
  * 获取bkflow第三方插件tags
267
295
  */
268
296
  async fetchBkFlowThirdPartyPluginTags() {
269
- return i();
297
+ return c();
270
298
  },
271
299
  /**
272
300
  * 获取bkflow第三方插件tag下的插件列表
273
301
  */
274
- async fetchBkFlowThirdPartyPluginList(e) {
275
- return (await t.get("/bkflow/plugin/list_plugin/", {
276
- params: { tag: e, ...r }
277
- })).data;
302
+ async fetchBkFlowThirdPartyPluginList(t) {
303
+ return await e.get(
304
+ "/bkflow/plugin/list_plugin/",
305
+ {
306
+ params: { tag: t, ...s }
307
+ }
308
+ );
278
309
  },
279
310
  /**
280
311
  * 搜索bkflow第三方插件
281
312
  */
282
- async searchBkFlowThirdPartyPlugins(e) {
283
- return (await t.get("/bkflow/plugin/list_plugin/", {
284
- params: { offset: 0, limit: 200, search_term: e, ...r }
285
- })).data;
313
+ async searchBkFlowThirdPartyPlugins(t) {
314
+ return await e.get(
315
+ "/bkflow/plugin/list_plugin/",
316
+ {
317
+ params: { offset: 0, limit: 200, search_term: t, ...s }
318
+ }
319
+ );
286
320
  },
287
321
  /**
288
322
  * 获取bkflow第三方插件元数据
289
323
  */
290
- async fetchBkFlowThirdPartyPluginMeta(e) {
291
- return (await t.get("/bkflow/plugin/meta/", {
292
- params: { plugin_code: e, ...r }
293
- })).data;
324
+ async fetchBkFlowThirdPartyPluginMeta(t) {
325
+ return await e.get("/bkflow/plugin/meta/", {
326
+ params: { plugin_code: t, ...s }
327
+ });
294
328
  },
295
329
  /**
296
330
  * 获取bkflow第三方插件对应SaaS应用的app详情
297
331
  */
298
- async fetchBkFlowThirdPartyPluginAppDetail(e, s) {
299
- return (await t.get("/bkflow/plugin/get_plugin_app_detail/", {
300
- params: { plugin_code: e, plugin_version: s, ...r }
301
- })).data;
332
+ async fetchBkFlowThirdPartyPluginAppDetail(t, o) {
333
+ return await e.get("/bkflow/plugin/get_plugin_app_detail/", {
334
+ params: { plugin_code: t, plugin_version: o, ...s }
335
+ });
302
336
  },
303
337
  /**
304
338
  * 获取bkflow第三方插件详情
305
339
  */
306
- async fetchBkFlowThirdPartyPluginDetail(e, s) {
307
- return (await t.get("/bkflow/plugin/plugin_detail/", {
308
- params: { plugin_code: e, plugin_version: s, with_app_detail: !0, ...r }
309
- })).data;
340
+ async fetchBkFlowThirdPartyPluginDetail(t, o) {
341
+ return await e.get("/bkflow/plugin/plugin_detail/", {
342
+ params: { plugin_code: t, plugin_version: o, with_app_detail: !0, ...s }
343
+ });
310
344
  },
311
345
  /**
312
346
  * 获取应用内API插件分类列表
313
347
  */
314
348
  async fetchPluginGroupList() {
315
- return a();
349
+ return n();
316
350
  },
317
351
  /**
318
352
  * 获取应用内指定API插件分类下的插件列表
319
353
  */
320
- async fetchCategoryPlugins(e) {
321
- return n(e);
354
+ async fetchCategoryPlugins(t) {
355
+ return r(t);
322
356
  },
323
357
  /**
324
358
  * 获取应用内API分类下的插件详情
325
359
  */
326
- async fetchPluginDetail(e) {
327
- return (await t.get("/metas/plugin/get_plugin/", {
328
- params: { plugin_id: e, ...r }
329
- })).data;
360
+ async fetchPluginDetail(t) {
361
+ return await e.get("/metas/plugin/get_plugin/", {
362
+ params: { plugin_id: t, ...s }
363
+ });
330
364
  },
331
365
  /**
332
366
  * 获取所有插件分组列表以及分组下的列表详情
333
367
  */
334
368
  async fetchAllPluginGroups() {
335
- const e = o.enableThirdPlugin !== !1, [s, c] = await Promise.all([
336
- a(),
337
- e ? i() : Promise.resolve([])
338
- ]), g = s.map(async (f) => {
369
+ const t = a.enableThirdPlugin !== !1, [o, l] = await Promise.all([
370
+ n(),
371
+ t ? c() : Promise.resolve([])
372
+ ]), k = o.map(async (f) => {
339
373
  if (f.name === "bkflow")
340
374
  return {
341
375
  ...f,
342
- children: A(e ? c : [])
376
+ children: K(t ? l : [])
343
377
  };
344
- const C = await n(f.name);
378
+ const m = await r(f.name);
345
379
  return {
346
380
  ...f,
347
- children: C.map(
348
- (w) => ({
349
- ...w,
381
+ children: m.map(
382
+ (_) => ({
383
+ ..._,
350
384
  category_id: f.id
351
385
  })
352
386
  )
353
387
  };
354
388
  });
355
- return await Promise.all(g);
389
+ return await Promise.all(k);
356
390
  },
357
391
  /**
358
392
  * 获取插件请求指令数据
359
393
  */
360
- async fetchApplyInstructionData(e) {
361
- return (await t.post("/metas/plugin/apply_instruction/", l(e))).data;
394
+ async fetchApplyInstructionData(t) {
395
+ return await e.post("/metas/plugin/apply_instruction/", i(t));
362
396
  },
363
397
  /**
364
398
  * 获取变量引用详情
365
399
  */
366
- async fetchVariableRef(e) {
367
- return { data: (await t.post("/bkflow/template/analysis_constants_ref/", l(e))).data };
400
+ async fetchVariableRef(t) {
401
+ return { data: await e.post(
402
+ "/bkflow/template/analysis_constants_ref/",
403
+ i(t)
404
+ ) };
368
405
  },
369
406
  /**
370
407
  * 获取流程变量类型
371
408
  */
372
409
  async fetchCustomVariableTypes() {
373
- return { data: (await t.get("/bkflow/variable/variable_class_list/", {
374
- params: r
375
- })).data };
410
+ return { data: await e.get("/bkflow/variable/variable_class_list/", {
411
+ params: s
412
+ }) };
376
413
  },
377
414
  /**
378
415
  * 获取流程操作记录
379
416
  */
380
- async fetchFlowOperateRecord(e) {
381
- return { data: (await t.get(`/bkflow/template/${e}/operation_record/`, {
382
- params: r
383
- })).data };
417
+ async fetchFlowOperateRecord(t) {
418
+ return { data: await e.get(`/bkflow/template/${t}/operation_record/`, {
419
+ params: s
420
+ }) };
384
421
  },
385
422
  /**
386
423
  * 创建流程任务
387
424
  */
388
- async createFlowTask(e) {
389
- return { data: (await t.post("/bkflow/template/create_task/", l(e))).data };
425
+ async createFlowTask(t) {
426
+ return { data: await e.post(
427
+ "/bkflow/template/create_task/",
428
+ i(t)
429
+ ) };
390
430
  },
391
431
  /**
392
432
  * 获取流程任务详情
393
433
  */
394
- async getFlowTaskDetail(e) {
395
- return (await t.get("/bkflow/template/get_task_detail/", {
396
- params: { task_id: e.task_id, ...r }
397
- })).data;
434
+ async getFlowTaskDetail(t) {
435
+ return await e.get("/bkflow/template/get_task_detail/", {
436
+ params: { task_id: t.task_id, ...s }
437
+ });
398
438
  },
399
439
  /**
400
440
  * 执行流程任务
401
441
  */
402
- async executeFlowTask(e) {
403
- await t.post("/bkflow/template/operate_task/", l({ ...e, action: "start" }));
442
+ async executeFlowTask(t) {
443
+ await e.post("/bkflow/template/operate_task/", i({ ...t, action: "start" }));
404
444
  },
405
445
  /**
406
446
  * 强制终止流程任务
407
447
  */
408
- async revokeFlowTask(e) {
409
- await t.post("/bkflow/template/operate_task/", l({ ...e, action: "revoke" }));
448
+ async revokeFlowTask(t) {
449
+ await e.post("/bkflow/template/operate_task/", i({ ...t, action: "revoke" }));
410
450
  },
411
451
  /**
412
452
  * 获取控制配置列表
413
453
  */
414
454
  async fetchControlConfig() {
415
- return (await t.get("/bkflow/space_config/get_control_config/", {
416
- params: r
417
- })).data;
455
+ return await e.get("/bkflow/space_config/get_control_config/", {
456
+ params: s
457
+ });
418
458
  },
419
459
  /**
420
460
  * 检查空间配置项的值
421
461
  */
422
- async checkSpaceConfig(e, s) {
423
- return (await t.get(`/bkflow/space_config/${e}/check_space_config/`, {
424
- params: { ...r, ...s }
425
- })).data;
462
+ async checkSpaceConfig(t, o) {
463
+ return await e.get(`/bkflow/space_config/${t}/check_space_config/`, {
464
+ params: { ...s, ...o }
465
+ });
426
466
  },
427
467
  /**
428
468
  * 自动排版(画布美化)
429
469
  */
430
- async drawPipeline(e) {
431
- return (await t.post("/bkflow/template/draw_pipeline/", l(e))).data;
432
- },
433
- async createMockDebugTask(e) {
434
- const { template_id: s, ...c } = e;
435
- return { data: (await t.post(`/bkflow/template/${s}/create_mock_task/`, l(c))).data };
436
- },
437
- async stopMockDebugTask(e) {
470
+ async drawPipeline(t) {
471
+ return await e.post(
472
+ "/bkflow/template/draw_pipeline/",
473
+ i(t)
474
+ );
475
+ },
476
+ async createMockDebugTask(t) {
477
+ const { template_id: o, ...l } = t;
478
+ return { data: await e.post(
479
+ `/bkflow/template/${o}/create_mock_task/`,
480
+ i(l)
481
+ ) };
482
+ },
483
+ async stopMockDebugTask(t) {
438
484
  throw new Error("TODO(mock-debug-api): replace with final mock debug stop API.");
439
485
  },
440
- async fetchTaskState(e) {
441
- return (await t.get("/bkflow/template/get_task_states/", {
442
- params: { task_id: e.task_id, ...r }
443
- })).data;
486
+ async fetchTaskState(t) {
487
+ return await e.get("/bkflow/template/get_task_states/", {
488
+ params: { task_id: t.task_id, ...s }
489
+ });
444
490
  },
445
- async fetchTaskNodeDetail(e) {
446
- return (await t.get("/bkflow/task/get_task_node_detail/", {
491
+ async fetchTaskNodeDetail(t) {
492
+ return await e.get("/bkflow/task/get_task_node_detail/", {
447
493
  params: {
448
- task_id: e.task_id,
449
- node_id: e.node_id,
450
- ...r
494
+ task_id: t.task_id,
495
+ node_id: t.node_id,
496
+ ...t.component_code ? { component_code: t.component_code } : {},
497
+ ...s
451
498
  }
452
- })).data;
499
+ });
453
500
  },
454
- async fetchTaskNodeSnapshot(e) {
455
- return (await t.get("/bkflow/task/get_node_snapshot_config/", {
501
+ async fetchTaskNodeSnapshot(t) {
502
+ return await e.get("/bkflow/task/get_node_snapshot_config/", {
456
503
  params: {
457
- task_id: e.task_id,
458
- node_id: e.node_id,
459
- ...r
504
+ task_id: t.task_id,
505
+ node_id: t.node_id,
506
+ ...s
460
507
  }
461
- })).data;
508
+ });
462
509
  },
463
- async fetchTaskNodeLog(e) {
464
- return (await t.get("/bkflow/task/get_task_node_log/", {
510
+ async fetchTaskNodeLog(t) {
511
+ return await e.get("/bkflow/task/get_task_node_log/", {
465
512
  params: {
466
- task_id: e.task_id,
467
- node_id: e.node_id,
468
- version: e.version,
469
- ...r
513
+ task_id: t.task_id,
514
+ node_id: t.node_id,
515
+ version: t.version,
516
+ ...s
470
517
  }
471
- })).data;
518
+ });
472
519
  },
473
- async operateTaskNode(e) {
474
- const s = {
520
+ async operateTaskNode(t) {
521
+ const o = {
475
522
  retry: "retry",
476
523
  skip: "skip",
477
524
  forceFail: "forced_fail",
478
525
  resume: "callback",
479
526
  gatewaySkip: "skip_exg"
480
- }, { task_id: c, node_id: g, action: p, data: f, operation: C } = e, w = C ?? s[p] ?? p;
481
- return (await t.post(
482
- `/bkflow/task/${c}/node/${g}/operate_node/${w}/`,
483
- l(f ?? {})
484
- )).data;
527
+ }, { task_id: l, node_id: k, action: b, data: f, operation: m } = t, _ = m ?? o[b] ?? b;
528
+ return await e.post(
529
+ `/bkflow/task/${l}/node/${k}/operate_node/${_}/`,
530
+ i(f ?? {})
531
+ );
485
532
  }
486
533
  };
487
534
  }
488
- function U(o) {
489
- const t = R(o);
535
+ function t2(a) {
536
+ const e = W(a);
490
537
  return {
491
- fetchFlowDetail: t.fetchFlowDetail,
492
- fetchFlowDraftDetail: t.fetchFlowDraftDetail,
493
- fetchFlowDetailByVersion: t.fetchFlowDetailByVersion,
494
- fetchSpaceFlowConfig: t.fetchSpaceFlowConfig,
495
- fetchSystemVariables: t.fetchSystemVariables,
496
- fetchUserApi: o.fetchUserApi,
497
- scopeData: o.scopeData,
498
- fetchVariableRef: t.fetchVariableRef,
499
- fetchCustomVariableTypes: t.fetchCustomVariableTypes,
500
- fetchFlowOperateRecord: t.fetchFlowOperateRecord,
501
- createFlowTask: t.createFlowTask,
502
- executeFlowTask: t.executeFlowTask,
503
- revokeFlowTask: t.revokeFlowTask,
504
- saveFlow: t.saveFlow,
505
- fetchBkFlowInnerPluginList: t.fetchBkFlowInnerPluginList,
506
- fetchInnerVariableDetail: t.fetchInnerVariableDetail,
507
- fetchBkFlowInnerPluginDetail: t.fetchBkFlowInnerPluginDetail,
508
- fetchBkFlowThirdPartyPluginList: t.fetchBkFlowThirdPartyPluginList,
509
- searchBkFlowThirdPartyPlugins: t.searchBkFlowThirdPartyPlugins,
510
- fetchBkFlowThirdPartyPluginTags: t.fetchBkFlowThirdPartyPluginTags,
511
- fetchBkFlowThirdPartyPluginMeta: t.fetchBkFlowThirdPartyPluginMeta,
512
- fetchBkFlowThirdPartyPluginDetail: t.fetchBkFlowThirdPartyPluginDetail,
513
- fetchBkFlowThirdPartyPluginAppDetail: t.fetchBkFlowThirdPartyPluginAppDetail,
514
- fetchPluginGroupList: t.fetchPluginGroupList,
515
- fetchCategoryPlugins: t.fetchCategoryPlugins,
516
- fetchPluginDetail: t.fetchPluginDetail,
517
- fetchApplyInstructionData: t.fetchApplyInstructionData,
518
- fetchAllPluginGroups: t.fetchAllPluginGroups,
519
- enableThirdPlugin: o.enableThirdPlugin,
520
- fetchControlConfig: t.fetchControlConfig,
521
- checkSpaceConfig: t.checkSpaceConfig,
522
- drawPipeline: t.drawPipeline,
523
- createMockDebugTask: t.createMockDebugTask,
524
- stopMockDebugTask: t.stopMockDebugTask,
525
- fetchTaskState: t.fetchTaskState,
526
- fetchTaskNodeDetail: t.fetchTaskNodeDetail,
527
- fetchTaskNodeSnapshot: t.fetchTaskNodeSnapshot,
528
- fetchTaskNodeLog: t.fetchTaskNodeLog,
529
- operateTaskNode: t.operateTaskNode,
530
- getFlowTaskDetail: t.getFlowTaskDetail,
531
- // 调试 API(独立 Axios 实例)
532
- fetchDebugContext: t.fetchDebugContext,
533
- fetchDebugInputSchema: t.fetchDebugInputSchema,
534
- fetchDebugHistory: t.fetchDebugHistory,
535
- fetchDebugResetImpact: t.fetchDebugResetImpact,
536
- updateDebugContextVariable: t.updateDebugContextVariable,
537
- updateNodeDebugMock: t.updateNodeDebugMock,
538
- runNodeDebugStep: t.runNodeDebugStep,
539
- runGlobalDebug: t.runGlobalDebug,
540
- terminateDebug: t.terminateDebug,
541
- resetDebugResult: t.resetDebugResult
538
+ fetchFlowDetail: e.fetchFlowDetail,
539
+ fetchFlowDraftDetail: e.fetchFlowDraftDetail,
540
+ fetchFlowDetailByVersion: e.fetchFlowDetailByVersion,
541
+ fetchSpaceFlowConfig: e.fetchSpaceFlowConfig,
542
+ fetchSystemVariables: e.fetchSystemVariables,
543
+ fetchUserApi: a.fetchUserApi,
544
+ scopeData: a.scopeData,
545
+ fetchVariableRef: e.fetchVariableRef,
546
+ fetchCustomVariableTypes: e.fetchCustomVariableTypes,
547
+ fetchFlowOperateRecord: e.fetchFlowOperateRecord,
548
+ createFlowTask: e.createFlowTask,
549
+ executeFlowTask: e.executeFlowTask,
550
+ revokeFlowTask: e.revokeFlowTask,
551
+ saveFlow: e.saveFlow,
552
+ fetchBkFlowInnerPluginList: e.fetchBkFlowInnerPluginList,
553
+ fetchInnerVariableDetail: e.fetchInnerVariableDetail,
554
+ fetchBkFlowInnerPluginDetail: e.fetchBkFlowInnerPluginDetail,
555
+ fetchBkFlowThirdPartyPluginList: e.fetchBkFlowThirdPartyPluginList,
556
+ searchBkFlowThirdPartyPlugins: e.searchBkFlowThirdPartyPlugins,
557
+ fetchBkFlowThirdPartyPluginTags: e.fetchBkFlowThirdPartyPluginTags,
558
+ fetchBkFlowThirdPartyPluginMeta: e.fetchBkFlowThirdPartyPluginMeta,
559
+ fetchBkFlowThirdPartyPluginDetail: e.fetchBkFlowThirdPartyPluginDetail,
560
+ fetchBkFlowThirdPartyPluginAppDetail: e.fetchBkFlowThirdPartyPluginAppDetail,
561
+ fetchPluginGroupList: e.fetchPluginGroupList,
562
+ fetchCategoryPlugins: e.fetchCategoryPlugins,
563
+ fetchPluginDetail: e.fetchPluginDetail,
564
+ fetchApplyInstructionData: e.fetchApplyInstructionData,
565
+ fetchAllPluginGroups: e.fetchAllPluginGroups,
566
+ enableThirdPlugin: a.enableThirdPlugin,
567
+ fetchControlConfig: e.fetchControlConfig,
568
+ checkSpaceConfig: e.checkSpaceConfig,
569
+ drawPipeline: e.drawPipeline,
570
+ createMockDebugTask: e.createMockDebugTask,
571
+ stopMockDebugTask: e.stopMockDebugTask,
572
+ fetchTaskState: e.fetchTaskState,
573
+ fetchTaskNodeDetail: e.fetchTaskNodeDetail,
574
+ fetchTaskNodeSnapshot: e.fetchTaskNodeSnapshot,
575
+ fetchTaskNodeLog: e.fetchTaskNodeLog,
576
+ operateTaskNode: e.operateTaskNode,
577
+ getFlowTaskDetail: e.getFlowTaskDetail,
578
+ // 调试 API(复用统一客户端,错误呈现由调试控制器接管)
579
+ fetchDebugContext: e.fetchDebugContext,
580
+ fetchDebugInputSchema: e.fetchDebugInputSchema,
581
+ fetchDebugResetImpact: e.fetchDebugResetImpact,
582
+ updateNodeDebugMock: e.updateNodeDebugMock,
583
+ runNodeDebugStep: e.runNodeDebugStep,
584
+ runGlobalDebug: e.runGlobalDebug,
585
+ terminateDebug: e.terminateDebug,
586
+ resetDebugResult: e.resetDebugResult
542
587
  };
543
588
  }
589
+ const F = /* @__PURE__ */ Symbol("variableInputCreateVariable"), a2 = (a) => {
590
+ S(F, a);
591
+ }, s2 = () => M(F, null);
544
592
  export {
545
- S as B,
546
- b as P,
547
- $ as a,
548
- A as b,
549
- m as c,
550
- E as g,
551
- I as r,
552
- U as u
593
+ d as A,
594
+ z as B,
595
+ P,
596
+ s2 as a,
597
+ K as b,
598
+ q as c,
599
+ y as d,
600
+ e2 as g,
601
+ G as n,
602
+ a2 as p,
603
+ Z as r,
604
+ t2 as u
553
605
  };