diff --git a/Makefile b/Makefile index 42de08e8..d8a84629 100644 --- a/Makefile +++ b/Makefile @@ -130,7 +130,8 @@ bindata: cp -r ui .tmp/data/public cp -r xgen .tmp/data/ cp -r yao .tmp/data/ - cp -r builder .tmp/data/ + cp -r sui/libsui .tmp/data/ + find .tmp/data -name ".DS_Store" -type f -delete go-bindata -fs -pkg data -o data/bindata.go -prefix ".tmp/data/" .tmp/data/... rm -rf .tmp/data rm -rf .tmp/yao-init diff --git a/builder/foo.js b/builder/foo.js deleted file mode 100644 index 3ed681fc..00000000 --- a/builder/foo.js +++ /dev/null @@ -1,3 +0,0 @@ -function foo() { - return "foo"; -} diff --git a/builder/index.html b/builder/index.html deleted file mode 100644 index 91f3399e..00000000 --- a/builder/index.html +++ /dev/null @@ -1 +0,0 @@ -
Yao Builder
diff --git a/data/bindata.go b/data/bindata.go index 633d7434..82c13d05 100644 --- a/data/bindata.go +++ b/data/bindata.go @@ -1,7 +1,5 @@ // Code generated for package data by go-bindata DO NOT EDIT. (@generated) // sources: -// .tmp/data/builder/foo.js -// .tmp/data/builder/index.html // .tmp/data/init/README.md // .tmp/data/init/aigcs/translate.ai.yml // .tmp/data/init/apis/aigc.http.yao @@ -35,6 +33,9 @@ // .tmp/data/init/studio/hello.js // .tmp/data/init/tables/admin/user.tab.yao // .tmp/data/init/tables/demo/pet.tab.yao +// .tmp/data/libsui/index.ts +// .tmp/data/libsui/utils.ts +// .tmp/data/libsui/yao.ts // .tmp/data/public/index.html // .tmp/data/ui/index.html // .tmp/data/xgen/setup/index.html @@ -221,46 +222,6 @@ func AssetFile() http.FileSystem { return &assetOperator{} } -var _builderFooJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\x2b\xcd\x4b\x2e\xc9\xcc\xcf\x53\x48\xcb\xcf\xd7\xd0\x54\xa8\xe6\x52\x50\x28\x4a\x2d\x29\x2d\xca\x53\x50\x4a\xcb\xcf\x57\xb2\xe6\xaa\xe5\x02\x04\x00\x00\xff\xff\x46\x27\x32\xed\x23\x00\x00\x00") - -func builderFooJsBytes() ([]byte, error) { - return bindataRead( - _builderFooJs, - "builder/foo.js", - ) -} - -func builderFooJs() (*asset, error) { - bytes, err := builderFooJsBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "builder/foo.js", size: 35, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _builderIndexHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb2\x49\xc9\x2c\xb3\x8b\x4c\xcc\x57\x70\x2a\xcd\xcc\x49\x49\x2d\xb2\xd1\x07\x09\x70\x01\x02\x00\x00\xff\xff\x9f\xc2\x84\x71\x17\x00\x00\x00") - -func builderIndexHtmlBytes() ([]byte, error) { - return bindataRead( - _builderIndexHtml, - "builder/index.html", - ) -} - -func builderIndexHtml() (*asset, error) { - bytes, err := builderIndexHtmlBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "builder/index.html", size: 23, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - var _initReadmeMd = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x96\xef\x6f\xdb\x44\x18\xc7\xdf\xdf\x5f\x71\x72\xdf\x80\x98\x93\x75\x63\x8d\x36\xc9\x12\x86\x98\x62\xb6\xd9\x55\x1c\x2a\x22\x84\x72\x69\x62\x5a\xab\x69\xec\xce\xe9\xd4\x21\xbf\x28\x43\xac\x68\xa8\x4d\x26\x4a\x16\x58\x87\x96\xfd\x00\x23\x68\x5d\xa4\x0a\x46\x5a\x91\x3f\x86\x9c\xed\xfc\x17\xe8\xce\x4e\x62\x93\xa4\xa4\xbd\xbc\x70\x72\xcf\x3d\xf7\x79\x9e\xbb\xe7\xfb\xc4\x33\x30\xc7\xcb\x10\xb7\xf7\xbc\x3d\x1b\x00\xb7\xb1\xed\xb6\x5e\xdc\x80\x9f\xac\x54\xab\x86\x79\x23\x99\xbc\x57\xd0\x0b\x86\x61\x26\x8a\xfa\x5a\xb2\xa4\x17\x3f\x7d\x63\x82\xe1\x4d\x00\x66\x66\x60\xef\xa4\xe9\x1f\xbe\xf4\x0e\x5b\x5e\xfd\x01\x7e\xd4\xf4\x8f\x7f\xc2\xb5\x3f\x01\xb0\x20\x1d\xe1\x23\x3a\x2c\x60\x41\x96\x65\x59\x18\x3c\xa2\x83\xda\x82\x1d\xa0\x05\xd1\xa6\x56\xa8\x2c\xbf\xa3\xad\xaf\x16\x08\x12\x51\x2b\x76\x1e\x78\xcf\xbe\x20\x56\x7e\xf6\xca\xd5\xb7\xaf\xcd\x19\x6f\xa1\xfe\xbe\x24\x1c\x6f\xd7\xc1\xcf\xbf\xc4\xb5\x66\x6f\xbb\x46\xa2\x08\xbe\xe1\xfa\x8e\xf7\xf3\x51\x24\x06\xe8\x3b\xc7\x6e\x73\x77\x34\xba\x73\x0c\x0b\x7a\x2f\xdb\xdd\xbf\xbf\x19\x6f\x04\xa3\xe9\x8d\x4b\xf9\xbc\xe3\x8c\x2d\x28\x33\xc7\xcb\x79\x41\x5a\x8c\x85\xe9\xee\xef\xe0\x87\x2d\xd7\x6e\xe1\xd3\x1a\x44\x25\xf5\xae\x5a\xd6\x8d\x35\xb5\x52\x45\xd0\xfd\xba\x01\x91\x71\x47\x2f\x6d\x14\xab\x9a\x5e\x41\x67\xa6\x1b\x77\xfd\x4f\xb2\x04\xfc\x81\xac\x64\x47\xc1\xde\x93\x47\xb8\xfe\x1b\xde\x3f\xc2\x4f\xb7\x20\xba\x9c\xa0\x9f\xb3\x48\x63\xc8\xb3\x57\x52\xd4\x6f\x16\x8d\x1e\x33\x21\x2f\xc8\x99\x89\x64\xef\x57\x07\xd7\x5e\x04\x75\xda\x7d\xdd\x86\xe8\xda\xe5\xeb\xd7\xa7\xe6\x5b\x64\xfd\xdc\xdc\xb8\xf5\x7d\x78\xfa\xdd\x7c\x3a\x23\x2e\x0a\x99\x3e\xfc\xbb\x23\x77\xe7\x10\xb7\xbf\xed\xfd\xf2\x3b\x7e\x68\x43\x64\xae\x97\xb5\xaa\x7a\x35\x3c\xee\xb5\x7b\xe6\x7a\x79\x0a\xbe\x15\x71\x9c\x4c\x5e\xc8\x88\xb7\xf9\x4c\x2e\x4a\x76\x1b\xdb\xdd\x93\x3f\xfc\xce\x76\xc8\x4f\x2b\xd2\xb4\xd9\x0e\xd1\xc9\x82\x61\x24\x4b\x4b\x44\xf4\x89\xd2\x12\x1a\x41\xdf\xe2\xa5\xf9\xa8\x83\xef\x1c\xf8\xf6\x16\x44\x6a\x85\xdd\x30\xd1\x25\xf4\xf9\x0a\x5b\x5c\x39\xcf\x2d\x53\x2a\xf1\x1a\x57\x85\x03\xaa\x3c\x1f\x73\x70\x1f\xbf\xc2\x9d\xc7\x41\xc2\x61\x85\x5d\x64\x58\x10\x25\x92\x65\x7d\xd9\x24\x59\x97\xb5\x62\x81\x88\x21\x51\xd6\x97\x51\x94\x9c\xbf\x2d\xa7\x85\x71\x64\xf7\xd9\x29\x95\x56\x56\xf8\x38\x1b\x5e\xf2\x87\x8a\x2c\x4d\x95\xbd\x35\x79\x6d\x1f\xad\x08\x8a\x22\xca\x52\x5e\xc9\xca\x19\x01\x5a\xb0\x7b\xfa\x83\xef\x3c\xc5\x07\x4d\x7c\xdf\x76\x1b\x7f\x51\xf4\x67\x5a\x59\x45\x94\x7c\x47\x2d\x69\xe6\xb4\x68\xea\x36\x05\xfa\x7d\xf1\x96\x00\x07\xe8\xd8\x79\x5f\x14\xdd\x2f\xb0\x84\xa9\x9a\x66\xa4\xf7\x0c\xd0\xd9\x8f\xd2\xe2\x40\xd9\x16\x54\xaa\x1b\x25\x4d\x87\xfc\x82\xd8\x57\xf7\xa8\xae\x53\xa9\xff\xa7\x5b\x93\x17\x12\xb4\xbc\x20\x48\xbc\x98\xbf\x29\xe4\x86\x0e\xc1\x1c\x45\xdf\x14\x72\x97\x20\xae\x39\x78\xdf\xf6\x3b\x3f\xba\xbb\xaf\xf0\xf7\x76\xf7\xf5\x81\xfb\xe4\xd8\xdd\x79\x3e\xf8\xb3\xf9\x67\xeb\x3e\xc4\x75\xc7\xdb\xb3\xa1\xa4\xea\xb4\x22\x78\x71\xfe\x3d\x88\x3b\x5f\xf5\x5a\x27\xc4\x4a\xc4\xbd\xca\x6e\x6e\x6e\x8e\xc6\x61\x01\x80\x12\x6a\xe5\x2e\x82\xc1\x39\x03\x80\x10\x5a\x2a\x98\x2b\x20\xd6\x6c\x38\x26\xec\x0e\x0c\x88\xb7\x02\x8e\x89\x6b\x37\xb0\x0b\xd2\x22\xc7\x44\x1a\x78\x30\x4b\x3a\x36\xc7\x84\x3d\x39\x98\x22\xc2\xe6\x18\x2a\xc4\x70\x42\x9e\xe7\x98\xf1\xf2\x18\x2c\xa0\xd2\xe0\x18\x22\x80\x60\x8e\x5c\x1b\xc7\x90\x4e\x1b\xfc\x8e\x16\xd2\x30\xc0\xfe\xdd\xc7\xd7\xd0\x3a\xe7\x18\x52\x57\xa1\x61\x58\x0a\x64\xcf\x54\x8a\x01\xc3\x6b\xe2\x18\x73\x95\x0d\xde\x05\x18\x72\x52\xe0\xdf\x00\x00\x00\xff\xff\x0f\x94\x4b\x64\xdf\x08\x00\x00") func initReadmeMdBytes() ([]byte, error) { @@ -276,7 +237,7 @@ func initReadmeMd() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/README.md", size: 2271, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/README.md", size: 2271, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -296,7 +257,7 @@ func initAigcsTranslateAiYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/aigcs/translate.ai.yml", size: 388, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/aigcs/translate.ai.yml", size: 388, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -316,7 +277,7 @@ func initApisAigcHttpYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/apis/aigc.http.yao", size: 564, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/apis/aigc.http.yao", size: 564, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -336,7 +297,7 @@ func initAppYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/app.yao", size: 603, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/app.yao", size: 603, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -356,7 +317,7 @@ func initChartsPetChartYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/charts/pet.chart.yao", size: 8250, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/charts/pet.chart.yao", size: 8250, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -376,7 +337,7 @@ func initConnectorsOpenaiGpt3_5TurboConnYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/connectors/openai/gpt-3_5-turbo.conn.yao", size: 177, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/connectors/openai/gpt-3_5-turbo.conn.yao", size: 177, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -396,7 +357,7 @@ func initConnectorsOpenaiTextEmbeddingAda002ConnYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/connectors/openai/text-embedding-ada-002.conn.yao", size: 189, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/connectors/openai/text-embedding-ada-002.conn.yao", size: 189, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -416,7 +377,7 @@ func initConnectorsOpenaiWhisper1ConnYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/connectors/openai/whisper-1.conn.yao", size: 163, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/connectors/openai/whisper-1.conn.yao", size: 163, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -436,7 +397,7 @@ func initDashboardsKanbanDashYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/dashboards/kanban.dash.yao", size: 2222, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/dashboards/kanban.dash.yao", size: 2222, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -456,7 +417,7 @@ func initFlowsAppMenuFlowYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/flows/app/menu.flow.yao", size: 1832, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/flows/app/menu.flow.yao", size: 1832, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -476,7 +437,7 @@ func initFlowsStatDataFlowYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/flows/stat/data.flow.yao", size: 1817, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/flows/stat/data.flow.yao", size: 1817, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -496,7 +457,7 @@ func initFormsAdminUserFormYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/forms/admin/user.form.yao", size: 97, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/forms/admin/user.form.yao", size: 97, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -516,7 +477,7 @@ func initFormsDemoPetFormYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/forms/demo/pet.form.yao", size: 6755, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/forms/demo/pet.form.yao", size: 6755, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -536,7 +497,7 @@ func initIconsAppIcns() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/icons/app.icns", size: 67465, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/icons/app.icns", size: 67465, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -556,7 +517,7 @@ func initIconsAppIco() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/icons/app.ico", size: 54993, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/icons/app.ico", size: 54993, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -576,7 +537,7 @@ func initIconsAppPng() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/icons/app.png", size: 34558, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/icons/app.png", size: 34558, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -596,7 +557,7 @@ func initLangsZhCnGlobalYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/langs/zh-cn/global.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/langs/zh-cn/global.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -616,7 +577,7 @@ func initLangsZhHkGlobalYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/langs/zh-hk/global.yml", size: 88, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/langs/zh-hk/global.yml", size: 88, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -636,7 +597,7 @@ func initLoginsAdminLoginYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/logins/admin.login.yao", size: 278, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/logins/admin.login.yao", size: 278, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -656,7 +617,7 @@ func initLoginsUserLoginYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/logins/user.login.yao", size: 278, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/logins/user.login.yao", size: 278, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -676,7 +637,7 @@ func initModelsAdminUserModYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/models/admin/user.mod.yao", size: 8052, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/models/admin/user.mod.yao", size: 8052, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -696,7 +657,7 @@ func initModelsPetModYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/models/pet.mod.yao", size: 1700, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/models/pet.mod.yao", size: 1700, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -716,7 +677,7 @@ func initNeoNeoYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/neo/neo.yml", size: 545, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/neo/neo.yml", size: 545, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -736,7 +697,7 @@ func initPublicDemoPetHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/public/demo/pet.html", size: 1376, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/public/demo/pet.html", size: 1376, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -756,7 +717,7 @@ func initPublicIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/public/index.html", size: 1404, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/public/index.html", size: 1404, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -776,7 +737,7 @@ func initScriptsDashJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/scripts/dash.js", size: 127, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/scripts/dash.js", size: 127, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -796,7 +757,7 @@ func initScriptsGuardJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/scripts/guard.js", size: 373, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/scripts/guard.js", size: 373, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -816,7 +777,7 @@ func initScriptsSetupJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/scripts/setup.js", size: 888, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/scripts/setup.js", size: 888, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -836,7 +797,7 @@ func initScriptsStatJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/scripts/stat.js", size: 1305, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/scripts/stat.js", size: 1305, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -856,7 +817,7 @@ func initServicesFooJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/services/foo.js", size: 122, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/services/foo.js", size: 122, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -876,7 +837,7 @@ func initStudioHelloJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/studio/hello.js", size: 101, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/studio/hello.js", size: 101, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -896,7 +857,7 @@ func initTablesAdminUserTabYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/tables/admin/user.tab.yao", size: 119, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/tables/admin/user.tab.yao", size: 119, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -916,7 +877,67 @@ func initTablesDemoPetTabYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/tables/demo/pet.tab.yao", size: 7111, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "init/tables/demo/pet.tab.yao", size: 7111, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _libsuiIndexTs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x5a\x6d\x73\xdb\x36\x12\xfe\xae\x5f\xb1\xe1\x78\x3c\x54\x2a\x53\x77\x5f\xa9\xd0\x6e\x2f\xc9\xa5\xbd\xcb\x25\x99\x3a\x9d\xfb\xe0\x6a\x64\x9a\x82\x25\xc6\x14\xa1\x02\xa0\x5d\x8d\xad\xff\x7e\xb3\x8b\x57\xbe\x48\xce\xa5\xe9\x4c\x63\x9a\x58\x3c\xd8\x5d\xec\xcb\x03\xd0\xb7\x4d\x5d\xa8\x92\xd7\x70\x72\x12\x4b\x56\xb1\x42\x71\x31\x86\xc7\x11\x40\xc5\x14\xb0\x6a\x93\xc2\xcf\x9f\xff\xf3\xfe\x6d\xc5\x36\xac\x56\xf0\x04\x75\x53\x55\x90\xd1\x8f\xd9\x08\xa0\xbc\x85\x58\xed\xb6\x8c\xdf\x82\x9d\x0e\x59\x96\x41\x24\x95\x28\xeb\x55\xa4\xb1\x00\x91\x20\x83\x25\x2f\x1a\xc4\x49\xfe\x68\x98\xd8\x5d\x9a\x09\x7e\x61\x44\xdc\x8f\x0c\xac\xc3\x2b\x6b\xa9\xf2\xba\xc0\x35\x02\x5d\xda\xc8\x56\xb8\x85\xc0\xaa\x8d\x95\x2a\x78\x2d\x15\x14\x35\x64\x38\x21\x59\x31\xf5\x93\x52\xa2\xbc\x69\x14\x8b\x23\x99\x16\x75\x44\x8b\xeb\x79\x45\x0d\xa7\xa7\x28\xfc\x22\x83\x28\xc2\x67\x63\xe2\x43\x59\x2f\xf9\xc3\x55\x51\xcf\xb5\x91\xd6\x7b\xce\x4c\xb7\x10\xdf\x6c\x79\x8d\x1e\xcb\xa0\x66\x0f\xc1\x44\x52\x6a\x66\x84\x05\x53\x8d\xa8\x49\x62\xb1\x90\x4d\xb9\x70\xf3\x50\x6c\xe2\x61\xcc\x8c\xfd\x48\xff\x6f\xe7\xd1\x26\xec\x47\x23\xb7\x8b\x1d\x94\x85\xe0\x9c\xa0\x52\x30\x5e\x9b\x40\x9d\x6f\x58\x0a\x7a\x7b\xb4\xda\x06\x0d\xfd\x52\x54\x5c\x32\xa9\xe2\xeb\x2b\xf9\xfb\xef\x69\x51\x67\x27\x8f\x28\xbf\x9f\x5f\x8f\x87\x16\x92\x2a\x57\x2c\xf6\x5a\x12\x9c\x5a\x97\x32\x59\xe7\xf5\xb2\x62\x42\x42\xe6\x8d\x48\x1e\x72\x55\xac\xe1\xe9\x09\x1e\xf7\x33\x2b\x78\xc9\xd0\x47\xb9\xdc\xd5\x05\x38\xf4\xf8\x8e\xed\x26\x70\x9f\x57\x0d\x9b\x80\xca\xc5\x8a\xa9\xf6\x46\x1a\x78\xc8\xda\xab\x5d\xdd\xb1\xdd\x5c\xbb\x4a\xcf\x42\x01\xfd\xf0\xf4\x14\x28\x82\x6e\xf1\xdb\x6d\xc1\xfc\x3e\x3b\xf8\xa3\x9b\x4c\xd6\x7f\xbc\xf9\x02\x99\x1b\xb0\xeb\xa6\xe6\xe7\xc4\xbd\x97\x8a\x6f\x3f\x09\xbe\xcd\x57\x39\x82\xa5\x81\xb1\xe3\x60\xba\x05\x48\x64\x3b\x42\x71\xa9\xb3\xad\x9f\x1f\x4d\x20\x52\xa2\x61\x91\x8b\x25\x80\xbd\x5d\x6d\x6f\xdf\xe5\x0f\x79\xe9\x9c\x15\x1b\x7f\x5a\xb5\xdd\x4c\x6d\x4d\x29\x2f\xdb\x2a\x3a\xdf\xb9\x05\x2e\xac\x72\xab\x67\x94\x1b\x6b\xcf\x91\x82\x6e\x76\x0a\xb7\x79\x25\x99\x5d\x15\x3d\xdf\x5b\x33\x74\x85\x0e\x4b\x2b\x4e\x49\x8d\xff\x61\x5d\xda\xe6\x42\xe7\x56\x7b\x4b\x13\xfd\xde\x84\xba\x9d\xf9\xb0\x2e\x2b\x06\xb1\x99\x73\x7a\x0a\x2f\xf4\xe3\x60\x11\x08\x15\x70\xab\x18\xf9\x41\xf4\x7d\x60\x8e\x9d\x10\x14\xba\x1b\xbe\xdc\x61\xec\xf9\x21\x4c\xda\x63\x66\xea\x9f\xd3\x29\xbc\x29\xe5\x96\x12\x46\xad\x99\xde\x34\x28\xd6\x79\xbd\x62\x50\x34\x52\xf1\x0d\xb0\x7b\x84\x54\xdc\x82\x3b\x67\xb4\xf6\x55\x4b\xe9\x32\xf4\x9a\x26\xbe\xc5\x37\x66\xdb\x52\x0d\x19\x4d\x02\x8d\x96\x4c\xe5\x65\x95\xc2\x23\xdc\xb1\x5d\x0a\x3e\x17\xd3\x76\x4a\xa6\x1d\xf7\x07\x01\xe8\x62\xcb\xb8\x6e\x69\x6c\xd1\x4b\x93\x4a\x61\x49\x1b\xaa\x2d\x18\x4f\xd2\x97\x70\xca\xf3\x77\x94\xd1\xad\x32\x61\x5d\x89\xfe\x7f\x81\xbd\xe0\xe9\xc9\x66\x71\xb7\xd0\xc3\x8b\x03\xe9\xdc\x2a\xa7\x7e\x17\xb4\xff\xee\x20\x83\x08\x95\x49\x23\xf8\x01\x9d\x31\x0b\x06\xef\x87\xfa\xc9\xdd\x38\x14\xf9\x22\xf9\x70\xd7\xc1\x81\xb3\x5c\x29\x71\x16\xa2\x87\xa9\xe3\x4b\x14\xca\x7a\x7d\x95\xd8\xf5\x02\x08\xfe\x75\xf9\xf1\x03\x86\xa8\x64\xf1\xbd\x73\xff\x1e\x0a\x0a\xa1\x98\xf5\x43\x2e\xb0\xd7\x5a\xac\xff\x35\xc3\xf7\x33\xbd\x35\xd6\xf9\xef\x4b\xd9\xf6\x7e\xbb\x24\xd3\x7e\x61\x29\xdc\xcf\xbe\xd7\x86\x10\xa4\xdd\x91\x60\x29\x74\x9a\x34\x3e\xcd\x2d\x98\x11\xbc\xe5\x02\x62\xac\x11\x25\x64\xf0\xb7\x19\x94\xf0\x4a\xcb\x27\x15\xab\x57\x6a\x3d\x83\xf2\x87\x1f\xba\x95\x1c\x05\xb0\x0b\xa1\xdc\x55\x39\x0f\x4b\x14\xbe\x4b\xb0\x07\x26\x52\xe5\x42\xc9\xff\x96\x6a\x1d\x9b\x78\x68\x55\x0b\x1f\x2d\x7e\x8a\x60\xdb\x2a\x2f\x98\x95\x9f\x40\x14\xd6\xeb\x6f\x88\x8f\x7e\x74\x0c\x47\x48\x3f\x4a\x28\x19\xd1\x9f\x57\x77\x73\xc8\xc2\x68\x21\x75\x29\xb1\x03\xdd\x0e\x85\x4e\x07\x26\x0c\xa1\xb0\x7c\x19\xf3\x54\x59\x37\x2c\x68\x50\xa3\x01\x08\xbf\xfc\x91\x58\x74\x91\x30\x58\x2a\x0e\xb2\x26\x5f\x39\xa8\x3e\x91\x97\x1d\xf3\x90\x8a\x0b\x66\x0a\xa3\xa5\x33\x5c\x30\x47\xd0\x48\xc8\x46\xb5\x17\xf2\x75\x29\x40\xc2\xe2\x1c\x74\x23\xb8\x68\xa1\x76\x48\x52\x4a\x39\xd2\x37\x83\xca\xe2\xc2\x76\x6b\xfa\x6d\x02\xcb\x5c\xe5\xff\x66\x3b\x39\xa1\x40\xd1\x4f\x86\x5b\x00\x1a\x35\xb1\xed\x5d\x1b\xab\x63\x0a\x27\xb9\x54\x1c\x60\x42\x2d\xf6\xde\xa2\x57\x76\xb9\xe4\x96\x8b\xb7\x79\xb1\x8e\x07\x8b\xad\x2b\x7f\xb8\x6d\x0e\xb9\x13\xbf\x08\xe5\xaa\x9a\xdd\x5b\x7c\x49\x2c\x0d\x32\x08\x36\xdd\x36\x0c\x6b\xe3\x77\x58\x1e\xa1\x8e\x2e\x1f\xc6\x2e\x3a\x42\xa3\x9d\x9e\x1a\x58\xe2\xfe\x61\xe8\x77\xf3\x29\xc4\x0a\x8b\x6f\x27\x93\x0e\xe5\x91\x36\x61\xc3\xa4\xcc\x57\x68\x04\x4b\xec\xf3\xd3\x13\xd0\x3f\xd1\x4f\x35\x30\x21\xb8\x00\x5e\x14\x8d\x10\x6c\x19\xcd\x3a\x00\xbc\x62\x09\x89\xc4\xd7\x57\x97\xbf\xfd\x32\x07\x6a\xb0\xf0\xb3\xe1\xaf\x6f\x71\x28\x85\x93\x47\x03\xbd\x87\x6b\xc7\xa7\xfb\x69\xb9\x0f\xb6\x02\x9f\x3d\x2f\xa6\x81\x81\xc0\xf4\xac\x01\x43\xd1\x30\xa3\x54\xc7\xa5\xed\x55\xb4\x9a\x1b\x0a\x69\xf1\x7e\xf0\x4c\xa1\xb3\xa0\xac\xcb\xf6\xc1\x25\x0c\x6f\x12\x79\x5b\x6d\x6c\x0f\x68\x9d\x26\x7f\xaa\xaa\x38\xa2\xe3\x0b\x89\xcd\x75\xc5\x75\x53\x5c\x64\xc5\xf6\xd5\x18\xb2\xf3\x81\x53\xa2\x19\xed\xb1\x44\x1a\x38\x43\xae\x48\x7b\x14\xcd\x74\x67\x42\xc2\x86\x59\x77\xc7\x76\x32\xc0\x22\x69\x99\xc2\xaf\xac\xe0\x62\xf9\x4a\x1f\xbb\x26\xe6\xf8\x75\x1e\xb4\x4b\x9f\xb8\x18\xff\xf6\x80\x76\x85\xc1\x75\x35\xef\xf2\x89\x83\x22\x43\xdd\xcf\x59\xe2\x5b\xe5\x70\x2f\xa4\x23\x73\x5f\xf8\xaa\x9c\xf7\x1b\xa0\x4e\xee\x56\x03\x74\xa5\x63\xdb\xc8\xf5\x51\x20\xd7\x16\x35\x0a\xb5\xc5\xf1\x10\xa1\xfe\x5a\x6d\x74\xae\xb7\xb4\x71\x95\xe4\xeb\xb5\xd1\x28\x7f\x5d\x1b\x99\xf2\xfa\x6c\x90\x1c\xb0\x5d\x18\x59\xc7\x74\xd1\x18\x1d\xc2\xa0\x83\xc9\xd6\x9c\x03\x38\x83\xad\xd4\x86\xe8\x3f\xca\x7a\x49\xe7\x09\x9a\xec\x43\x46\xeb\x87\x2a\x40\x59\x9b\x75\xba\xd5\xf6\x06\xe7\x66\x56\x09\x94\x6d\x11\x25\xcc\x9a\x0c\xa2\xc5\x62\x9b\xaf\x58\xd4\x37\xde\x1f\xd9\xcd\x65\x08\xe2\xcd\xbb\x6c\xc8\xf4\xe9\xd6\xf9\xa9\x2b\xe3\x1a\x9a\xf5\x40\xc7\x43\xe4\x93\xe5\x92\x4a\x21\x92\x56\x56\x33\x11\xa3\xbe\x13\xb3\x87\x41\xc6\xeb\xff\xbe\x4b\xff\x0d\x0a\x6a\x9b\xe4\xb5\x58\x90\x3b\xc7\xfa\x8b\xa2\x81\x3b\x22\x6b\xc6\xc0\x7d\x4c\x51\xef\xe7\xd7\xe3\xce\xe1\xdd\x3b\x17\x01\xdb\xae\x6d\x39\x16\x87\x83\xeb\x8f\x67\x5d\xfa\x4d\x0e\xfd\xae\xee\xdc\x87\x07\xc5\x03\xb7\x50\x96\xb6\x91\x0e\xfa\x42\xd0\x9c\x3c\x3a\x81\xf4\x15\x07\xc9\xe0\x36\xec\x19\x3e\x13\x9c\x8d\x2e\xfb\x78\xe6\xcc\x1c\x5c\x53\x76\xee\x74\x42\x3c\x2b\xdc\x81\x7d\xc7\x14\x32\x8b\x43\xaa\xb6\x59\xd0\xf0\x09\xa2\x43\x81\x9e\x27\x3a\x6d\x9a\x63\x82\x87\xc9\xe3\x24\xc7\x38\x4d\xd8\x53\xd8\x21\xda\xf3\x17\x49\xcf\xb7\x50\x9e\xeb\x09\x84\x57\xae\x5f\x7b\xfa\xb5\xc3\xed\x4d\x1e\xda\x8d\x67\x37\x3a\xdc\x86\x89\xf6\xa2\x6e\xdd\xe5\xed\xce\x78\x72\x60\xe3\xdf\x68\x0e\xdf\x3f\x6e\x1b\x05\xc3\x00\x89\xa3\x45\x70\xe9\x8b\x81\xa5\xd9\x89\x26\x17\xfa\xb0\x31\x7d\xf9\x72\x04\x2f\xe1\xf2\xb7\x5f\xe0\x57\x56\x2f\x99\xc0\xdf\x7e\xdc\xe6\x22\xdf\x84\x37\x47\xee\x1d\xe6\xf7\x08\x5e\x4e\x47\x9d\xbb\x59\x9d\x73\x82\x20\x62\xa2\x64\x66\x6e\x0a\xaf\xdd\xf9\xe7\xc9\x90\x13\x24\x7a\xe1\x85\x33\xfe\x4e\x71\xdf\x25\x44\x79\xbd\x3b\xc7\x41\xbe\xc5\x45\x2e\x52\xa3\xe3\x47\xfa\x75\x34\x4e\xe1\x93\xe0\x9b\x52\xb2\x57\x96\x39\x79\x36\x68\x4a\x68\x4c\xce\x31\x37\x0d\xc1\xfd\x3b\x36\x25\x7e\xf3\x85\x15\x2a\x82\x8b\x60\x20\x85\x93\x93\xe0\x54\x36\x02\x18\x43\x2e\xbd\x0d\x33\xfb\x15\x41\xe3\xb7\x2f\xee\x06\x03\xd1\x9b\x5f\x73\x05\xb7\xbc\xa9\x97\x18\x88\x6e\x8d\xfd\xb5\x89\x42\xb3\x83\xc6\xa4\x44\x30\xd4\x2e\x8e\x06\xe6\x47\xfe\x93\x88\xe1\x93\x9a\xf5\xba\x32\xde\xe7\xbe\xba\x55\xe8\xfd\x69\x5d\xdf\xfb\x2b\x19\xcb\xff\x8e\x5a\xf3\x81\x03\x33\x5f\x7d\x48\x15\x78\x28\xd5\x1a\x64\x07\xf9\x19\x93\xba\x20\x81\x3d\xd3\x29\x60\xd5\x5c\xb2\xdb\xbc\xa9\x94\xd9\x78\xe9\x42\x00\x32\xfb\xe0\xe2\x58\xff\x6e\x39\x92\x13\xf0\x2f\xb2\x0c\x9a\x7a\xc9\x6e\xcb\x9a\x2d\xe1\x02\x94\x68\x18\xa4\x1d\xa9\x00\x48\xae\xf9\xc3\x7b\x9e\x2f\xb1\x6f\x92\x11\x03\xef\x3b\x90\x74\x83\xed\x31\xbd\x64\x00\x8b\x7e\xfa\x94\xaf\x98\x4e\xe0\x10\xb8\x3d\x72\x1c\x3a\x94\x9d\x19\x7f\x7d\x12\x6c\x9b\x0b\x06\x15\x2d\x69\xbe\xd1\x55\x46\x53\xb8\x7e\x25\xb7\x79\x0d\x45\x95\x4b\x99\x45\xb2\x29\xcf\xf4\x56\x9d\xa1\x44\x59\xaf\xa2\xf3\xf7\xfa\x21\x49\x92\x57\x53\x94\x3d\xbf\xb6\x51\xd1\xb7\xfc\xf4\xb4\xe3\xb8\xf0\xa2\xd5\x64\xd9\xb0\xbf\xba\x9f\xfe\xc0\xab\x38\xe8\x36\xec\x15\x0c\x6d\x1f\x56\xe4\xf8\xd7\xbf\x63\xe0\x09\x6f\x14\x13\x38\x29\xbc\xd5\x65\xed\x43\xa0\x39\xff\xe1\x43\x52\xd6\xb5\x96\x87\xcc\xc0\x8e\x5b\xf1\x6a\xfd\x8f\x15\xcc\x78\x7f\x61\xae\x5a\x28\x21\x89\x88\xd8\xda\x1d\x07\x15\x38\xb0\x2c\xdc\x57\x6b\xc4\x74\x0a\x3f\x2a\x79\x56\xae\x6a\x2e\x18\xbd\xb1\xb0\x8f\x90\x24\xc9\x42\x1f\xb5\xf1\x89\x6a\x2f\x8d\xed\x3b\x85\x41\xa0\xb1\x8e\x5c\x27\x15\x2f\xe8\x83\x4a\xb2\xcd\xd5\x1a\x33\x75\xe6\x24\x1b\x51\x61\xb4\x4c\xf3\x6d\x39\x5d\x2c\x76\x39\x9f\xca\xa6\x9c\xde\xff\x7d\xaa\xc3\xe5\xe4\x91\xa0\xf6\xd7\x7e\xc6\x36\xdf\xa1\x3b\x48\x1f\x4d\xfb\x74\x0d\xef\x68\xa7\xf5\x9a\xd8\xbc\xdd\x7b\x80\x35\x43\x67\x4a\xf7\xa1\x2c\x7a\xcd\x6b\x85\xc7\xe8\xcf\xbb\x2d\x8b\x52\x88\xf2\xed\xb6\x2a\xb5\xc6\x53\x6c\x97\x91\xbe\x21\x78\xcd\xf9\x5d\xc9\x52\xcf\xe2\x0a\x7a\x31\x71\xcd\x72\x3a\x85\x0f\xb9\x2a\xef\x19\x6c\x39\xf1\x94\x3f\x1a\x26\xe9\x9b\x08\x7d\x34\x61\xe2\x9e\xf2\xc4\x73\x1a\x73\x94\xe1\xcb\x9d\x25\x34\xbe\x15\x1b\x33\x5b\xb7\xf7\x82\xc9\x2d\xaf\x25\x7a\x56\x7f\x4c\xbb\x65\xaa\x58\xc7\x8d\xa8\x26\xf0\x08\x1b\xa6\xd6\x7c\x99\x42\xf4\xe9\xe3\xe5\xe7\x68\x62\xed\x9c\xd0\x02\xa9\x5e\x66\xdf\xc2\x53\xec\x4f\xe5\xb0\x2c\x78\x82\x6f\xe3\x80\xa1\xbd\x18\x4e\xbd\x81\x32\x2b\x79\x75\xcf\x62\x9c\x3f\x9e\x75\xce\x7a\x58\x5d\xd1\x0b\xce\x04\x5a\xdb\xb8\xc6\x54\x65\x79\x24\x25\xec\x9a\xdd\xcc\x40\x18\x4b\x9c\x86\xae\x6c\xc6\xfe\x4a\x6f\xb8\x35\x74\x74\xee\x33\xc5\xe9\xd4\xea\xae\x99\xa0\xa1\x72\xdf\xa0\xeb\xc1\x9a\x48\xc0\xd1\xf9\x3f\xf3\xb2\x62\x4b\x74\x8a\x7e\x1f\xd6\xc5\x7e\x67\x8c\xba\xe2\xd1\x04\xd8\xb8\x7d\x83\x79\xa0\x11\xf6\x66\x9a\xc2\xb2\x1f\x8d\xd8\x9f\x5b\x2e\x14\x31\x97\x80\x42\xe8\x54\xc1\x16\xdf\xfa\x0b\x0c\x9c\xa5\x3f\xdc\x79\xd9\x4b\xfc\x5d\x0f\x70\xd1\x1e\xe0\x82\x06\xe8\xc3\xfb\x45\x8f\x74\xc5\xe6\xab\x5e\x5e\xef\xcc\x67\xe1\x8b\x14\x08\x8d\x9c\x7a\xcf\xcb\xe5\x39\x4e\x7f\xcd\xa9\x06\x2b\xd9\x87\x40\xde\x46\xfb\x7c\x45\xdf\x0a\xf5\xeb\x39\x41\xce\x46\x98\xa3\xa1\x75\x21\xa7\x33\x06\xea\xb3\xdf\x45\xdb\x46\x8c\x5e\xcb\x0b\x4a\x09\x32\xdf\xb0\x36\xfb\xf0\x1f\xa6\x7d\xb5\xbf\xe8\xfe\xa5\x8a\xd6\x05\x9e\xe0\x86\xf3\x8a\xe5\x75\x17\x96\x1a\x2e\xfd\xf9\x03\x25\xd9\x45\x7a\x48\x10\x79\x04\x3a\x31\xa8\xdc\x87\x85\x35\x6a\xd7\xf2\xf6\x5e\x19\xdb\x2f\x99\x4a\xe9\x04\xe1\xd8\x31\xf8\x0d\x71\x3b\xd0\x77\x63\x7b\x7f\x0d\xd8\xbb\x2e\x18\x01\xe8\xc7\xd9\xff\xb1\x18\x21\x61\x61\x1c\x40\xa3\x4d\x25\xa8\xbe\xc0\x31\xb8\x37\xd4\x2d\x62\x7a\x3d\x18\x3f\x5d\x0b\x43\x2f\xd9\x6f\xcd\xbd\x24\x68\xfd\xe1\x00\x56\xcf\xfd\x6c\xf4\xbf\x00\x00\x00\xff\xff\x8b\xc0\xff\xb4\xcf\x24\x00\x00") + +func libsuiIndexTsBytes() ([]byte, error) { + return bindataRead( + _libsuiIndexTs, + "libsui/index.ts", + ) +} + +func libsuiIndexTs() (*asset, error) { + bytes, err := libsuiIndexTsBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "libsui/index.ts", size: 9423, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _libsuiUtilsTs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xe4\x57\x4d\x6f\xe3\x36\x13\xbe\xfb\x57\x4c\x04\x63\x21\xe1\x75\x94\x3d\xcb\xab\xe4\x0d\x8a\x00\x45\xb1\xcd\xb6\x4d\x6f\x49\xe0\x55\xa4\xb1\xad\x9a\x22\x5d\x92\x72\x6b\xc4\xfe\xef\x05\x49\x51\x24\x6d\xcb\x09\x50\x60\x5b\xa0\x97\x28\x92\x67\x9e\x79\xe6\x8b\x33\x9c\xb7\xb4\x94\x35\xa3\x30\x7e\x90\x8c\x63\x8c\xa4\x49\xe0\x75\x04\x50\xcf\x21\xbe\xe8\xdf\x00\x38\xca\x96\x53\xa0\x2d\x21\xd3\x11\xc0\x7e\xd4\xc9\xc8\xed\x1a\xd9\x1c\x90\x34\x90\xe7\x39\x44\x42\xf2\x9a\x2e\x22\xab\xa6\xbf\x43\xc5\xca\xb6\x41\x2a\xd3\xdf\x5b\xe4\xdb\x07\x24\x58\x4a\xc6\x6f\x09\xd1\xf6\xa6\x5a\x52\x81\x21\x69\x52\x82\x74\x21\x97\x90\xe7\xf0\xd1\x82\x1c\x59\x57\xf6\x1d\x3a\x92\xe6\xf1\xe3\xb3\x61\x05\x70\x75\x05\xff\x97\xe2\xb2\x5e\x50\xc6\x71\xe4\x54\xf1\x0f\x98\xcd\x44\x5b\xcf\x44\xef\xe8\x74\xb4\x1f\x8d\x5c\x04\x7e\x56\xe4\x62\xd1\xb1\xcb\xc0\xb8\x92\x64\x30\x9b\xe9\x9f\x34\x9b\x00\x2e\xd4\x30\x78\x25\x29\x84\x08\x54\x0e\x11\x61\x07\x77\x04\x55\x3c\x20\x87\x28\x52\xc4\xd1\xbc\x8b\x0c\xee\x59\x85\x9f\x6b\x21\xbf\xcc\x3f\x75\x42\xd7\xb0\xd3\x8e\x43\xde\xfb\xdf\x89\x67\x3d\xce\x91\x44\xc9\xa8\x90\xbc\x55\x66\x8f\x3c\x72\xf6\x6d\x80\xbd\x44\x5a\xe1\x93\xd9\x04\x90\xcb\x5a\xa4\x4e\xa6\x17\x9f\xfa\xbf\x5b\x6f\xce\x66\xde\x8b\x9a\x51\xd5\x24\x7c\x75\x5b\x0a\xd7\x7e\x25\x84\x26\x20\x0f\x2d\x76\x75\xe0\x2a\x64\x0f\x48\x04\x86\xf4\x9d\x6e\xc8\xde\x68\x9c\xf3\x50\x57\x3d\x92\x26\x4e\x8e\x42\x1f\x74\x89\x6f\xc6\xd7\x13\x4a\xf1\x4c\x86\x07\x41\x44\x8f\x32\x1e\xc7\x7e\xd6\x2e\x7c\xa9\x37\xfb\x45\x57\x05\x70\xc6\x0e\x03\x97\x96\x84\x09\x14\x32\x8e\x1e\xc5\xd3\x53\x56\xd2\xe7\xc8\x6b\xcb\x0b\xa5\x71\x16\x5c\x3f\x0e\x3b\xaf\x97\x1c\x8f\x63\x8d\xe0\x42\x51\x94\xcb\xb8\x2c\x08\x79\x29\xca\x55\xa6\xfa\xbe\xab\xe7\xae\x6d\x26\x50\xd3\x0a\xff\xcc\x80\xb6\xcd\x0b\xf2\x04\xf2\x6b\xd8\xb0\xba\x1a\xf4\x5c\x1c\xb2\x3b\xca\x68\x5f\x54\x73\xc6\xef\x94\x79\x6b\xb4\xb3\xa5\x6d\x58\x0c\x4b\x2d\xf6\xdb\xdc\x06\xd9\x2a\x74\x26\xba\xa7\x33\xab\x3d\x34\x87\xcc\x20\x5f\xd8\xed\xa0\x6b\xb8\x20\x0d\x0b\x94\xb7\x52\xf2\xfa\xa5\x95\x08\x17\xaa\x03\xed\xf1\x14\xfd\x8d\xf8\x1f\x9e\x7d\x41\xcd\xf4\x94\x0b\x29\x79\xbc\xc2\xed\x37\x23\x3d\x50\xeb\x01\x9e\x26\xd4\x53\xac\x0a\x59\xfc\xfb\x28\x46\x8a\x56\x16\xc1\xff\x20\x20\xfb\x9b\x60\xf4\x9b\x93\x35\x1d\xbe\x39\x6c\xef\x90\xaf\x62\x16\xf0\xed\xc8\x6d\xde\x84\x97\xdd\x48\xf3\x44\x7e\x78\xf8\x72\x9f\xae\x0b\x2e\x30\xde\xd8\x9e\x80\xb2\x90\xe5\x12\x62\x74\x80\x8a\x18\x23\x98\x22\xe7\x8c\xc7\x5f\xef\xd4\x03\x94\x9a\x1a\x48\x0a\x03\xe6\x8c\x2b\x42\x30\x7e\x5d\xe1\x76\x9f\xc1\xf8\x15\xf7\x5f\xfb\xe9\x70\x92\x90\x8e\xf3\xb2\x10\xdf\xa9\x99\x1b\xeb\xc9\x7b\x5f\x34\x98\x0c\x1f\xa4\x37\xa9\x96\x52\xe7\x6f\x5a\x32\x2a\x8b\x9a\xfa\x8a\x7d\xf2\xd6\x9c\xad\xff\xa1\xe4\xad\xd4\x56\xa0\xec\xdb\x14\x4d\xdf\x9d\xd9\x55\xe2\xcb\xaa\x34\xbf\x5d\x08\x97\xaa\xef\x2f\x7d\x7b\x89\x99\xfd\x92\xb7\x18\xb9\xea\xd0\x68\x1f\x3e\x80\x57\x24\x7e\x35\x9c\xab\x87\xd3\x15\xf1\xde\x9a\x50\xd4\x06\x8a\xe2\x44\x24\xfb\xc1\xef\x57\xc0\xa6\xcf\x2b\xc7\x86\x6d\x70\xa0\x5e\x4c\xd8\xf4\x67\x54\xcb\xcb\x2d\xe7\xc5\x36\xad\x85\x7e\xfa\xe2\x37\xd0\xbf\x40\xe6\xfe\x4f\xc5\x9a\xd4\x32\x8e\xc0\x0e\xcf\x0e\xca\xcd\x9c\x32\x1c\x33\x7d\x4a\xcb\x94\xe3\x9a\x14\x25\xc6\x57\x8f\x4f\xf4\x89\x3f\x89\xe7\xab\xc5\x04\xa2\x28\xd8\x8e\x36\x26\x31\x51\x12\x0c\x39\x18\x2c\x70\xe3\xac\x6b\xcb\x60\x54\x69\x2d\x77\xf8\x57\xd5\x7f\x24\x28\x45\x55\xbd\x2b\x22\x4b\xd9\x90\x58\xfd\xb9\x39\x71\x13\xd8\xd9\x55\xda\x9d\x0e\x4a\x54\x53\x69\x69\x85\xf3\x9a\x62\x75\xd4\xef\x21\xa5\x9a\x52\xe4\xdf\xff\xfa\xe3\x67\x75\x94\x44\x91\x7f\x10\x1c\xae\xc2\xc9\xc9\x05\xd6\x43\xc8\x35\xdd\x81\xa9\x65\x5c\x0a\xae\x3a\xbf\x20\xad\x90\xc7\x25\x6b\xd6\x13\x60\x6b\xf5\x51\x7b\x67\xbe\x6b\x6b\xdd\xae\xa8\xee\x14\x7a\x7d\x38\xa5\x32\x75\x17\x22\x1e\x5c\x7e\x02\x9c\x66\xed\x5d\x4c\x8c\xe6\xc0\x4d\x25\x00\xef\x7c\xd6\x1e\x77\x20\xea\x31\x75\x5f\x7b\x2c\xf3\x8f\xbd\x01\x16\x62\x4b\x4b\xe8\xf8\xd2\xa2\xc1\x89\x5e\x1c\x92\x0c\x7e\xe2\xac\xa9\x05\x7e\x32\xc9\xb3\x35\x37\xb8\x37\x99\x9d\x89\x1b\xa0\x9e\xc7\x04\x1c\xe6\xc4\x27\x92\xd8\x40\xff\x15\x00\x00\xff\xff\x9a\x9e\x29\xb7\x55\x0f\x00\x00") + +func libsuiUtilsTsBytes() ([]byte, error) { + return bindataRead( + _libsuiUtilsTs, + "libsui/utils.ts", + ) +} + +func libsuiUtilsTs() (*asset, error) { + bytes, err := libsuiUtilsTsBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "libsui/utils.ts", size: 3925, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _libsuiYaoTs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x57\x5f\x6f\x1b\xc7\x11\x7f\xe7\xa7\x18\x1f\x84\xe0\x8e\x3e\x1f\xe9\xb6\x68\x51\x32\x17\xc7\x95\xdc\xc0\xae\x1b\xa9\x26\x55\x20\x10\x84\x68\x79\x37\xd4\xad\x74\xb7\x7b\xd9\xdd\x93\xc4\x50\x7c\x6e\x90\xa7\xbe\xf7\xa1\xe8\x27\xe8\x7b\xdc\x8f\x53\xf5\x73\x14\xb3\x7b\xff\x28\x32\xb1\x83\x00\x86\x75\xbb\x33\xf3\xdb\xf9\xf3\x9b\xd9\xe5\x68\x38\x1c\xc0\x10\xbe\x7a\x79\x0c\x27\x95\x42\x78\xc3\x6e\xd8\x2c\x51\xbc\x34\x30\x3b\xfa\x13\x89\x3e\x67\x95\xc9\xa4\x82\x3f\xb3\xbb\x4f\x0b\x76\xf7\x39\xff\xe6\x9a\x45\x89\x2c\x3e\xb3\xc2\x82\x71\x61\x18\x17\xa8\x20\x33\xa6\xd4\x93\xd1\x68\xc5\x24\x2b\x4b\x4d\x3a\x03\x18\x8e\x06\x83\xe6\x0c\x26\xe1\x78\x71\x85\x89\xb1\x96\x25\x53\xac\x80\xf5\x70\x03\x99\xd4\xc6\x6a\x2e\x2b\x91\x18\x2e\x05\xa9\xfa\xb4\x1b\xc0\x7a\x00\x60\x32\xae\x23\x5a\x42\x0c\x17\x07\xb4\x03\xd6\x06\xee\xef\xe1\x96\x8b\x54\xde\x46\xb9\x4c\x18\x59\x46\xa5\x92\x46\x26\x32\x87\xa7\xe0\x8d\x46\x1e\x3c\xdd\xd1\x70\xa7\xc1\x66\xc4\x4a\x7e\x31\x6d\xe0\xbf\xa9\x50\xad\x20\x86\xf5\x86\xb6\x04\xde\xc2\xe9\xbb\xb7\x33\x64\x2a\xc9\x4e\xc8\x51\xed\x3f\xc6\xd1\x56\x18\x44\x4b\xa9\x5e\xb1\x24\xf3\xfd\x6b\x5c\x85\x70\xc3\xf2\x0a\x03\x88\x3f\x03\xe7\x67\x07\x7e\x76\x8d\xab\x73\x88\x9d\x06\x1d\xb2\x09\xa6\x83\x4d\x9b\x9d\x2f\xd0\xc0\xcb\x93\xd7\x8f\x52\x53\x32\x93\xed\x6c\x91\x3b\x36\x5f\x5f\x31\xe9\x02\x36\xab\x12\x23\x42\x88\x81\xe9\x95\x48\xa0\xcd\xa4\x4f\x08\x61\x6d\x14\x42\x86\x2c\x45\xa5\x5d\x5e\x15\x9a\x4a\x09\xe7\xe2\x1f\xd1\x24\x99\xef\x7d\xf1\x6a\xee\x85\xb0\x6d\x23\xaa\x3c\xef\x2c\xa7\x83\xcd\xb4\x75\xfa\x84\xaa\xf0\x51\x5e\xa7\xcc\xb0\x1f\x0b\x64\x8b\x0b\xee\x98\x3d\xe1\x9d\x38\x02\xec\x8f\x8f\xe0\x3f\x3e\xca\x93\xe3\xd9\x6e\x98\x0e\x62\x6f\x98\x47\xf2\x56\xe4\x92\xa5\xbf\xb0\x40\x2d\xcc\x87\xaa\xa4\xd9\x0d\x2e\x79\x8e\x8f\x22\x31\x6a\x55\xb3\x2a\x91\x42\x1b\x58\xe4\x72\x41\x58\xb7\x8c\x9b\x9f\x57\xc5\x10\x8c\xaa\x30\x98\x0e\x2c\xda\x0d\x53\x20\x6d\x63\x9e\xaa\x1c\xe2\xa6\x63\x4e\xdf\xbd\x8d\x12\x85\xcc\xa0\xeb\xda\xd3\x77\x6f\x7d\x3a\x32\x98\x5a\xab\x1c\x0d\x30\x91\xd0\x68\x88\x21\x95\x49\x55\xa0\x30\xb5\xc1\xab\x1c\x69\xe5\x7b\xcc\xab\xb5\x5b\x85\x85\x4c\x57\x11\x2b\x4b\x14\xe9\x61\xc6\xf3\xd4\x77\x18\xb5\x9a\x5b\x44\x99\xc2\x25\xc4\x9d\x53\x5b\xc2\xb4\x4b\x63\x93\xa8\x2d\x79\x92\xf3\xe4\xda\xaf\x01\x7b\xb1\x28\xbc\x91\xd7\xbd\x58\x5a\x74\xab\xba\x81\x84\x99\x24\x03\x1f\x95\x0a\xea\x34\xb3\x1c\x95\xf1\xbd\xff\x7d\xf7\xf7\x87\xef\xff\xf9\xf0\xdd\x3f\x1e\xde\xff\xf0\xf0\xef\xff\x3c\xfc\xed\x87\xff\xbe\x7f\xff\xf0\xfd\xbf\x9e\xb8\xe0\x36\x7d\xaa\xd8\x0a\xec\xe1\x49\x81\x26\x93\xe9\xcf\x20\xcf\x07\x9a\xe7\xc7\xfb\xc4\x79\xb0\x4b\xb1\x01\xd4\x4e\x84\x03\x70\xdc\xb0\x7f\x2d\x3b\x06\xe0\xe8\x3f\x80\x96\x21\x03\x00\xae\xa9\xdc\x03\x97\x0d\xa7\x09\x71\xf3\x71\x7f\x5f\xcf\xca\xda\x00\xe2\xf6\xab\x15\x11\x26\x91\x83\xfe\xdc\xdf\x5b\x0a\xd2\x36\xf1\xad\xb2\x4c\xbb\x38\x58\xb7\xc3\x7d\x73\xb0\x26\xaf\x36\x17\x8d\x8a\x9d\x9a\x33\xa3\xb8\xb8\x84\xd8\xf1\x7b\x86\x8a\xb3\x9c\x7f\x8b\xbe\xf3\xc2\xe6\x9f\x2f\xc1\xef\xeb\x3e\x89\xc1\xf3\x9a\x12\xba\x73\x2a\x95\x47\x5c\x24\x79\x95\xa2\xf6\xbd\x17\x5e\x00\x2f\xe8\xec\x4a\xe5\x9b\x4f\x0e\xd6\x3d\xe3\xcd\x05\x4c\x1a\xc9\x8b\x47\x12\x57\xeb\x41\xd3\x7d\x46\x5e\xa3\x68\x1c\x9b\xd3\xc2\x6f\xdd\x71\xb2\x2d\x47\xea\xe4\x9c\x79\xee\x3a\xe5\xdf\xda\x5b\xc4\xa3\x1b\xe1\xe2\x0f\xc8\x14\x2a\x38\x58\x5b\xbb\xde\x49\x84\xf5\xa4\xb5\x3c\x94\xc2\xa0\x30\xcf\xe6\xab\x12\xbd\xf3\x1d\xe0\x6d\x31\xc4\xe0\xb1\xb2\xcc\xb9\xbb\xae\x46\x57\x5a\x0a\xaf\x05\xb6\x2d\x5f\x92\x40\x4f\x80\x09\x7b\xf3\x59\x34\x47\x91\x49\x8f\x2a\x00\x85\x4c\x71\x02\x5e\x22\x95\xf6\x42\x18\x8d\x40\xc8\x67\xb4\x08\x61\xe8\xfe\x68\x56\xe0\x33\xa9\xf8\x25\x17\x6e\x3c\xb1\x24\x23\x0b\xd2\xa3\x4f\x67\x35\x4c\x71\xc9\xaa\xdc\x84\xd0\xec\x87\xa0\x90\x3a\x39\x84\xa5\x54\x09\x36\x9b\x52\xe4\xab\x67\x7c\xe9\x96\xa9\x43\x54\x98\xa2\x30\x9c\xe5\x7a\x02\x5e\xef\x3c\x07\x5d\xd7\x36\x84\x61\x4f\x14\x82\x2c\xb8\xe9\xe7\x68\xd2\x67\x37\xdd\x0c\x29\x57\x98\x98\x09\x78\x4b\x99\xe7\xf2\xd6\x81\x15\x4c\x54\x2c\x0f\x61\xe8\x36\x43\x40\xa5\xa4\xa2\xcc\x4d\x9b\x9a\x58\x46\x3f\x89\x2d\xa3\x9b\x3a\xd4\xe9\x3c\xf3\x68\xc2\xd9\xfc\xbf\x99\x1d\x7f\x19\x69\xcb\x1e\xbe\x5c\x59\xa3\xe0\x11\x89\x14\xea\xb2\x1d\xe1\x4b\x3b\xbd\x2b\x95\x87\x0d\x98\x55\xaf\xe9\xb6\x2a\x11\x62\x6b\x10\xd5\x51\x44\x97\x68\xfc\xed\xb2\x07\xd4\x67\x9e\xd7\xf2\x90\x06\x42\x47\xfc\x1d\x3e\x04\x8d\xf3\xdd\xd5\xd2\x9c\x57\xf7\xae\xf3\xcc\x9e\x4a\x16\xcd\x58\x6d\xaf\x55\x52\x73\x5b\xfb\x06\x68\xab\xb6\x86\xc4\x92\xc8\x02\x69\xc3\x4c\xa5\x43\x28\x50\x6b\x76\x49\x44\xc1\xa2\x34\xab\x5a\xd7\x83\x4d\x0d\x68\xa7\x32\xe6\x1a\x6d\x2c\x6e\x1a\x35\xc8\x35\xae\xc5\xa3\x7d\xbf\x1e\xe2\xad\xfa\xa3\xd0\x0d\xde\x99\x51\x66\x8a\xdc\xa5\x68\x9f\xb4\xcc\x19\xef\xa5\xa4\x7f\x02\xc9\xeb\x13\x06\xfb\x25\xbd\x2b\xc0\xce\x82\x5f\xf8\x54\x98\xd7\xc3\xa5\x1b\xdf\xce\x2d\xea\xdb\x66\xf0\x68\xd4\x9a\x4b\x31\x33\x52\xb1\x4b\x24\x32\xbc\x36\x58\xf8\x9e\x95\xef\x30\xc1\x19\xf5\x27\x52\xff\x61\x74\x28\xe5\x35\x47\xdf\xfb\xfa\x6b\x73\xdd\x37\xed\x85\x6b\x11\xb6\x02\xa5\x07\xa7\x33\x7c\x14\x56\x62\x37\xbf\x64\x85\x13\x38\x80\x7d\x61\x3a\xeb\xad\x38\x3b\xdb\x2e\x62\xc1\x0a\x52\xea\x44\xf4\xba\x8f\xbd\xe6\xa2\x48\x91\xc8\x95\xb6\x60\x6e\x7d\xfa\xee\xf5\xa1\x2c\x4a\x29\xe8\x21\xd2\xbd\x4f\xac\x52\xd0\x98\xba\xe5\x4b\xa5\xd8\xaa\x35\xac\x81\x22\x5d\xe6\xdc\xf8\xde\xd4\x73\xef\xa4\xa5\x54\xe0\x93\x0d\x87\x18\xc6\x53\xe0\xf0\x69\xdf\x3c\xca\x51\x5c\x9a\x6c\x0a\xfc\xe9\xd3\x26\xc3\xdd\x09\xad\xf7\x56\xf7\x8c\x9f\x47\x46\xf1\xa2\xe9\x26\x2a\x90\x13\x47\x5c\xa4\x78\x77\xbc\xf4\x85\x4d\x40\x1c\xc7\x30\xde\x69\xa6\x5a\x55\x57\x0b\x37\x5c\xac\x72\x7d\x7e\xd8\x48\xdd\x32\xe8\xb5\x52\x57\x4a\x77\x11\x53\x25\xb7\xcb\x31\x43\xf3\x93\x15\x69\xc0\xff\x4a\x3f\x61\x42\xc0\xbb\x92\x2b\x3c\x62\xab\xfa\x7d\xda\xad\x21\xee\x2f\xee\xef\xe1\xd7\xe3\xb6\x58\x10\xdb\x9f\x57\x47\xcc\xa0\x8b\x3f\x8d\x34\x9a\x39\x2f\xd0\x4f\x89\xc4\xf6\x2b\x80\xa7\x7d\x84\x21\xfc\xea\x37\x30\x84\xdf\x8e\x9b\xff\x9e\x8f\xc7\xe3\xb6\x88\x4e\x91\x0e\xf5\xea\xcf\x98\x7e\xf8\xa5\x91\x91\xa7\xf3\x43\x77\x7d\xd7\x47\x6d\xd3\xc0\xbd\x40\xba\xf8\x36\x71\xb3\xb2\x11\x6e\xa6\x07\xeb\x1a\x70\x33\xa5\xee\x8d\x47\x17\xfb\xd2\x76\x84\x39\x1a\xfc\x08\x2e\x7f\xf0\xf8\x69\x13\x4b\x3c\xcf\xaa\x10\xc6\xcf\xe1\x0d\x13\xf0\xfc\xf7\xbf\x1b\xc3\x78\x3c\xb1\xff\xe0\x74\x7e\x38\x05\xe7\xcd\xf4\x62\xab\x1f\xdb\xd7\x11\xcc\x25\xfc\xc5\xfe\xa0\x75\xc1\x3f\x6a\x4f\xb9\xb8\xfa\x40\x5f\x76\x48\xfd\x70\xe4\xe2\xca\xc5\xe1\x6e\x08\x6d\xd4\x04\x1c\x03\xcf\xe8\xba\x3b\x3b\x9f\x36\x6d\xe2\x14\x4a\xe0\x82\x0e\x0b\x5a\x92\xcb\xc5\x55\x94\x31\x7d\x7c\x2b\x4e\x94\x2c\x51\x99\x95\x5f\x06\x1d\xbf\xb5\x51\x51\x59\xe9\xcc\x47\xb1\xd3\xc1\x65\xe0\x9a\x9e\x88\xb1\x2b\x95\x8b\xab\xb3\xf2\x3c\xe8\xd1\xbd\xa6\x3a\x41\x5e\x49\x2e\x7c\xef\x13\xcf\x8d\xe9\xff\x07\x00\x00\xff\xff\x35\xb9\xf4\xc2\xf2\x10\x00\x00") + +func libsuiYaoTsBytes() ([]byte, error) { + return bindataRead( + _libsuiYaoTs, + "libsui/yao.ts", + ) +} + +func libsuiYaoTs() (*asset, error) { + bytes, err := libsuiYaoTsBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "libsui/yao.ts", size: 4338, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -936,7 +957,7 @@ func publicIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "public/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "public/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -956,7 +977,7 @@ func uiIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "ui/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "ui/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -976,7 +997,7 @@ func xgenSetupIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/setup/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "xgen/setup/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -996,7 +1017,7 @@ func xgenV09IndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/v0.9/index.html", size: 14, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "xgen/v0.9/index.html", size: 14, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1016,7 +1037,7 @@ func xgenV10IndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/v1.0/index.html", size: 50, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "xgen/v1.0/index.html", size: 50, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1036,7 +1057,7 @@ func xgenV10Layouts__indexAsyncJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/v1.0/layouts__index.async.js", size: 71, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "xgen/v1.0/layouts__index.async.js", size: 71, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1056,7 +1077,7 @@ func xgenV10UmiJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/v1.0/umi.js", size: 71, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "xgen/v1.0/umi.js", size: 71, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1076,7 +1097,7 @@ func yaoApisImportHttpJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/apis/import.http.json", size: 1696, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/apis/import.http.json", size: 1696, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1096,7 +1117,7 @@ func yaoApisStorageHttpJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/apis/storage.http.json", size: 1046, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/apis/storage.http.json", size: 1046, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1116,7 +1137,7 @@ func yaoDataIcons404Png() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/icons/404.png", size: 9342, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/data/icons/404.png", size: 9342, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1136,7 +1157,7 @@ func yaoDataIconsIconIcns() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/icons/icon.icns", size: 67465, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/data/icons/icon.icns", size: 67465, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1156,7 +1177,7 @@ func yaoDataIconsIconIco() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/icons/icon.ico", size: 54993, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/data/icons/icon.ico", size: 54993, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1176,7 +1197,7 @@ func yaoDataIconsIconPng() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/icons/icon.png", size: 34558, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/data/icons/icon.png", size: 34558, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1196,12 +1217,12 @@ func yaoDataIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/index.html", size: 282, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/data/index.html", size: 282, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _yaoFieldsModelTransJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5b\x4f\x6f\xdb\x36\x14\xbf\xfb\x53\x10\x5c\x0e\x1b\xe0\x1a\xc5\x0e\x3b\xf8\xd6\xd6\xc9\x9a\x61\x6d\x87\xda\x18\x10\x0c\x3b\xd0\xe2\x8b\xcd\x85\x7f\x34\x91\x8a\x9b\xba\xfa\xee\x03\x29\xc9\x12\x15\x29\x71\x16\xc7\x96\x5d\xf6\xd0\x8a\xef\x3d\x3e\x92\x3f\xf2\xf7\x48\x9a\xaf\xeb\x01\x42\xf8\x96\x24\x8c\xcc\x39\x68\x3c\x46\x56\x80\x10\x8e\x14\x57\x89\x2d\x22\x1c\x27\x4c\x90\xe4\x0e\x8f\x11\xfe\xe1\xe2\xe2\xfc\xfc\xf5\x6b\x8c\xb2\x01\x42\xd9\x70\x60\x2b\x13\xce\x88\xae\x57\xd5\x26\x61\x72\x61\xcd\x29\x5c\x93\x94\x1b\x3c\x2c\x7c\x2e\x49\xd2\x22\x16\x40\x59\x2a\x66\xf0\xc5\x58\xa5\xb1\xff\x16\x1a\xae\xe4\xa2\x4d\x3e\x67\xb2\xe8\x50\x5d\x4a\x89\x01\xc3\x04\xcc\xbe\xba\x46\x8a\x52\xa9\xad\x34\x4d\xa9\x36\x44\xc4\x95\xca\x15\x2b\xbd\xbc\xbb\x94\x06\x16\xe0\x7a\xce\x8a\x4f\x4f\x1b\x25\x20\x40\x1a\xdd\x62\x90\x4a\xcd\x16\x12\xe8\xec\x41\x37\x5a\x10\xce\x1f\x55\x3f\xd0\xcc\x9c\x2d\xba\xab\x3b\xe5\x16\x7d\x7c\xeb\x39\x29\xa5\x97\xed\xc6\xd3\x46\x97\x3b\xcc\x2f\x27\xae\x41\x5a\x96\x99\xdf\x91\x8d\x9c\x42\xc4\x04\xe1\x56\x78\xcd\x15\xa9\xa6\x54\xa5\x73\x0e\xf7\xc4\x65\x6b\x93\xaa\x5a\x29\xba\x68\xb5\xdb\xb8\x69\x35\xfb\x6d\xfa\xe9\xa3\x55\xfe\xa3\x95\x2c\x65\xf6\x7b\xde\x14\x5a\xc3\xb7\x4d\x61\x9a\x32\xda\xb2\xaa\x59\xfc\x86\xd2\x04\xb4\x6e\x5b\xf1\x24\x6a\x51\x56\x94\xba\x66\xc0\x69\x8d\x51\xa5\x45\x29\x70\x26\xdc\x38\xe8\x4b\x09\x42\xf8\x06\x1c\x27\xce\xd6\x9c\xcc\x81\xa3\x6f\xdf\x50\xa4\x84\x45\xdb\x7e\x4a\x22\x20\x2b\x3a\x50\x92\xc8\xf5\x7b\xb5\x84\x04\x46\x67\x6b\x67\x30\x12\xc4\x44\xcb\xba\x19\x50\x66\xbc\x66\xec\xba\xbf\x8b\x1d\x9a\x97\x32\x4e\x4d\xcd\x18\xd9\x60\xa1\x62\x5d\xc4\x0d\x4e\x22\x58\x2a\x4e\xf3\x25\x72\xf6\xfb\x8f\x31\x07\xa2\x01\x31\x5b\xed\x27\x74\xbf\x9f\x59\x1e\x58\xf2\x3f\xe5\x57\x36\xdc\x8c\x59\x25\x62\x17\x23\x2e\xc6\x5a\x57\xdd\x32\x58\x59\xd7\x59\x3f\x47\x6e\x48\xbe\x7e\x5f\x72\xe8\xd5\xe0\x5c\xc8\x1d\xd6\x46\x94\xa1\x7e\xe1\x32\x28\xd0\xc9\xd9\x01\x32\x15\xfb\xa0\x06\xfc\xbb\x2d\x2f\xa6\xc0\x21\xea\x82\xa1\x26\x44\x0f\x40\xa2\x9d\x8f\x76\x4c\x86\xbe\x0f\x15\x1b\xa6\xa4\x8b\x25\x67\xa3\xbc\xed\x4f\x4e\xb4\xce\x35\x19\xae\xd9\x1f\x88\x60\xa7\x08\xd7\x3e\x58\xd9\x86\xd7\x8c\x2c\x7a\x0f\xd6\x69\x4e\xbd\x1f\x78\x4c\x7e\x34\x5d\x1f\x98\x3e\x36\x5c\xbf\x49\x80\x3c\x0f\xc5\x07\x42\x70\x03\x44\x92\x1a\x35\x65\x5f\x21\x8f\xe9\x82\xc9\xcf\x6a\x65\x5b\xfa\x79\x68\x4f\x36\x5f\x8a\xd2\x2f\x35\xfc\x7a\x4a\x23\xa5\xb8\x61\x71\xe7\x6e\x65\x98\xc9\x0f\x8d\x8f\x6d\x4b\xa7\x3d\x4f\x8d\x35\x6f\x2f\x4f\xbd\xda\x6c\x27\xc4\xc0\x1f\x2c\xba\xd9\xdc\x3a\xfe\x27\xb0\x4f\x08\x23\x71\xde\x5c\x79\x97\xec\xf7\xee\x7a\x34\xf8\x1c\xcd\x21\xb7\xef\x88\x0e\x6a\xb8\xe2\x3b\x20\x49\x20\xec\x06\x3e\x07\x47\x20\xec\x4e\xf0\x09\x84\xdd\x11\xa2\x1e\x61\x29\x31\x61\x87\xad\xe0\x73\x70\x04\xc2\xee\x04\x9f\x03\x13\x36\x9f\x20\xe2\x7e\xce\xbf\xba\xba\xba\x7a\xf5\xe1\xc3\xab\xc9\x04\xa3\x23\x21\xf2\x16\x48\xdf\x23\x72\x38\x2e\x23\x84\xf5\x52\xad\x66\x05\x10\xf5\x35\xf0\xfe\xfd\x58\x88\xb1\xd6\x78\xeb\xab\xe2\xf7\x43\xf0\xdd\x61\x76\xb0\xeb\x75\xf5\x34\xd7\x84\xab\x3d\x10\xa0\xb6\xb1\xf5\x38\x32\x3c\x7b\x8a\xbc\x68\x51\x3d\x3d\x86\x70\x11\xc2\x45\x08\x17\x21\x5c\x34\xa7\xa8\x0c\x17\x79\xbc\x60\x9b\xc7\xf7\x1e\xbe\x09\x7f\x4c\xc5\xbc\x13\xda\xe3\x7a\x19\xee\xdd\x58\x7b\x48\xd0\xa7\xf3\x6f\x9f\xc8\x79\xdb\x6c\x33\x51\x25\xd0\x27\xd0\x27\xd0\x67\xfb\x64\x0b\x97\xeb\x14\x28\xd3\x5f\xca\x6c\x79\x70\xd9\xfe\x19\x91\x32\x6d\x29\x63\x7b\x6b\x92\x14\x8e\xf7\x18\xf9\x12\x34\x3b\x2c\xda\x3e\x35\xf3\x14\xc9\xc0\xce\xd3\x66\x67\xe0\xdf\x3e\xf1\xf4\x19\xe6\x67\x0f\x07\xa6\x05\xa6\x05\xa6\xbd\x0c\xd3\xe6\x4a\x71\x20\xb2\x77\x1c\xfb\x4c\x28\x53\xbf\x26\x2a\xed\x4a\x1b\xf3\x61\xaa\xf2\x0d\xff\xf2\x14\xc8\x72\xd1\xf5\xd9\x3a\x1d\x8f\xcf\xa5\x5b\x44\x43\x84\x6f\x09\x4f\xa1\xd8\xfc\xeb\xb3\xd7\x56\x6b\x92\x9f\x15\xea\xd5\xae\x09\xd7\xe0\xfd\x90\x84\xd0\xdf\x5b\x2e\xe4\x03\x51\xf9\x94\x21\x3d\x54\x6c\x98\xae\x98\xbf\xa8\xbb\xf1\x8c\x96\x10\xdd\x00\xfd\xb3\x06\x52\xe3\x48\x9a\xca\x77\xbe\x8d\x43\x64\xd8\xea\xe6\xdd\x92\x71\x9a\x80\xf4\xe7\xa0\xc3\x9f\x6f\x5c\x42\xff\x94\x30\xe1\xfe\x1f\xce\x7e\x32\x70\xab\xf7\xed\x48\x89\x38\x75\x39\x1a\x18\x64\xa4\x28\x93\x8b\x91\xed\xc8\xe8\xdc\x96\x00\x3f\x33\x21\xb4\xd3\xfd\x04\x9c\xfb\x3d\x5d\x44\x4e\x3a\xcb\xf7\xb1\x29\xec\x3a\x3e\xed\x27\x25\xf8\xb4\x56\xc0\xa0\xfc\x3b\x1b\x64\x83\xff\x02\x00\x00\xff\xff\xfb\xb3\xf6\x5c\x6f\x3a\x00\x00") +var _yaoFieldsModelTransJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5b\xcd\x72\xdb\x36\x10\xbe\xeb\x29\x30\xa8\x0f\xed\x8c\xa2\x71\x7b\xe8\x41\xb7\x24\x72\x1a\x77\x9a\xa4\x13\x69\x3a\xe3\xe9\xf4\x00\x11\x6b\x09\x35\x7e\x58\x02\xb4\xe2\x28\x7c\xf7\x0e\x40\x52\x24\x68\xd2\x96\x6b\x59\xa2\x54\xe4\x90\x10\xbb\x8b\xbf\x0f\xfb\x2d\x00\x61\xb3\x1e\x20\x84\x6f\x49\xc2\xc8\x9c\x83\xc6\x63\x64\x05\x08\xe1\x48\x71\x95\xd8\x22\xc2\x71\xc2\x04\x49\xee\xf0\x18\xe1\xef\xde\xbd\xbb\xb8\x38\x3f\xc7\x28\x1b\x20\x94\x0d\x07\xb6\x32\xe1\x8c\xe8\x7a\x55\x6d\x12\x26\x17\xd6\x9c\xc2\x35\x49\xb9\xc1\xc3\xa2\xcd\x25\x49\x5a\xc4\x02\x28\x4b\xc5\x0c\xbe\x18\xab\x34\xf6\xdf\x42\xc3\x95\x5c\xb4\xc9\xe7\x4c\x16\x03\xaa\x4b\x29\x31\x60\x98\x80\xd9\x57\xd7\x49\x51\x2a\xb5\x95\xa6\x29\xd5\x86\x88\xb8\x52\xb9\x62\xa5\x97\x77\x97\xd2\xc0\x02\xdc\xc8\x59\xf1\xe9\x69\xa3\x04\x04\x48\xa3\x5b\x0c\x52\xa9\xd9\x42\x02\x9d\x3d\xd8\x8c\x16\x84\xf3\x47\xd5\x0f\x74\x33\x67\x8b\xee\xea\x4e\xb9\xc5\x18\xdf\x78\x8d\x94\xd2\xcb\x76\xe3\x69\x63\xc8\x1d\xe6\x97\x13\xd7\x21\x2d\xcb\xcc\x1f\xc8\x46\x4e\x21\x62\x82\x70\x2b\xbc\xe6\x8a\x54\x4b\xaa\xd2\x39\x87\x7b\xe2\xb2\xb7\x49\x55\xad\x14\xbd\x6b\xb5\xdb\x34\xd3\x6a\xf6\xeb\xf4\xd3\x47\xab\xfc\x5b\x2b\x59\xca\xec\xf7\xbc\x29\xb4\x86\x6f\x9a\xc2\x34\x65\xb4\xc5\xab\x59\xfc\x9a\xd2\x04\xb4\x6e\xf3\x78\x12\xb5\x28\x2b\x4a\x5d\x33\xe0\xb4\xc6\xa8\xd2\xa2\x14\x38\x13\x6e\x1c\xf4\xa5\x04\x21\x7c\x03\x8e\x13\x67\x6b\x4e\xe6\xc0\xd1\xb7\x6f\x28\x52\xc2\xa2\x6d\x3f\x25\x11\x90\x15\x03\x28\x49\xe4\xc6\xbd\x5a\x42\x02\xa3\xb3\xb5\x33\x18\x09\x62\xa2\x65\xdd\x0c\x28\x33\x5e\x37\xd6\xef\xef\x62\x87\xe6\xa5\x8c\x53\x53\x33\x46\x36\x58\xa8\x58\x17\x71\x83\x93\x08\x96\x8a\xd3\xdc\x45\xce\x7e\xfb\x3e\xe6\x40\x34\x20\x66\xab\xfd\x80\xee\x8f\x33\xcb\x03\x4b\xfe\xa7\xfc\xca\x86\x9b\x39\xab\x44\xec\x62\xc6\xc5\x5c\xeb\xaa\x5b\x06\x2b\xdb\x74\xd6\xcf\x99\x1b\x92\xfb\xef\x4b\x4e\xbd\x9a\x9c\x0b\xb9\xc3\xda\x8c\x32\xd4\x2f\x5c\x06\x05\x3a\x39\x3b\x40\xa6\x62\x1f\xd4\x80\x7f\xb6\xe5\xc5\x14\x38\x44\x5d\x30\xd4\x84\xe8\x01\x48\xb4\x6b\xa3\x1d\x93\xa1\xdf\x86\x8a\x0d\x53\xd2\xc5\x92\xb3\x51\xde\xf7\x27\x27\x5a\xe7\x9a\x0c\xd7\xec\x0f\x44\xb0\x53\x84\x6b\x1f\xac\x6c\xc3\x6b\x46\x16\xbd\x07\xeb\x34\x97\xde\x0f\x3c\x26\x3f\x9a\xae\x0f\x4c\x1f\x1b\xae\x5f\x27\x40\x9e\x87\xe2\x03\x21\xb8\x01\x22\x49\x8d\x9a\xb2\xaf\x90\xc7\x74\xc1\xe4\x67\xb5\xb2\x3d\xfd\x34\xb4\x27\x9b\x2f\x45\xe9\xe7\x1a\x7e\x3d\xa5\x91\x52\xdc\xb0\xb8\x73\xb7\x32\xcc\xe4\x87\xc6\xc7\xb6\xa5\xd3\x5e\xa7\x86\xcf\xdb\xcb\x53\xaf\x36\xdb\x09\x31\xf0\x3b\x8b\x6e\x36\xb7\x8e\xff\x08\xec\x13\xc2\x48\x9c\x77\x57\xde\x25\xfb\xbd\xbb\x1e\x0d\x3e\x47\x73\xc8\xed\x3b\xa2\x83\x1a\xae\xf8\x0e\x48\x12\x08\xbb\x81\xcf\xc1\x11\x08\xbb\x13\x7c\x02\x61\x77\x84\xa8\x47\x58\x4a\x4c\xd8\x61\x2b\xf8\x1c\x1c\x81\xb0\x3b\xc1\xe7\xc0\x84\xcd\x17\x88\xb8\x9f\xf3\xaf\xae\xae\xae\x5e\x7d\xf8\xf0\x6a\x32\xc1\xe8\x48\x88\xbc\x05\xd2\xf7\x88\x1c\x8e\xcb\x08\x61\xbd\x54\xab\x59\x01\x44\xdd\x07\xde\xbf\x1f\x0b\x31\xd6\x1a\x6f\x7d\x55\xfc\xff\x10\x7c\x77\x98\x1d\xec\x7a\x5d\x3d\xcd\x35\xe1\x6a\x0f\x04\xa8\x6d\x6e\x3d\x8e\x0c\xcf\x5e\x22\x2f\x5a\x54\x4f\x8f\x21\x5c\x84\x70\x11\xc2\x45\x08\x17\xcd\x25\x2a\xc3\x45\x1e\x2f\xd8\xe6\xf1\xbd\x87\x6f\xc2\x1f\x53\x31\xef\x84\xf6\xb8\x5e\x86\x7b\x37\xd7\x1e\x12\xf4\xe9\xfc\xdb\x27\x72\xde\x36\xdb\x4c\x54\x09\xf4\x09\xf4\x09\xf4\xd9\x3e\xd9\xc2\xe5\x3a\x05\xca\xf4\x97\x32\x5b\x1e\x5c\xb6\x7f\x46\xa4\x4c\x5b\xca\xd8\xd1\x9a\x24\x85\xe3\x3d\x46\xbe\x04\xcd\x0e\x8b\xb6\x4f\xcd\x3c\x45\x32\xb0\xf3\xb4\xd9\x19\xf8\xb7\x4f\x3c\x7d\x86\xf9\xd9\xc3\x81\x69\x81\x69\x81\x69\x2f\xc3\xb4\xb9\x52\x1c\x88\xec\x1d\xc7\x3e\x13\xca\xd4\x2f\x89\x4a\xbb\xd2\xc6\x7c\x98\xaa\x7c\xc3\x3f\x3d\x05\xb2\x5c\x74\x63\xb6\x8d\x8e\xc7\x17\xd2\x39\xd1\x10\xe1\x5b\xc2\x53\xdb\xd3\x8f\xf5\xa5\x6b\xab\x32\xc9\x0f\x0a\xf5\x3a\xe7\xde\x2f\x48\x08\xfd\xb5\xa5\x07\x1f\x88\xc3\x27\x89\xe5\xa1\xa2\xc1\x74\xc5\x7c\x37\xee\x06\x32\x5a\x42\x74\x03\xf4\x8f\x12\x9d\xc6\x09\x34\x95\x6f\x7d\x83\xf3\x61\x6b\xfd\xb7\x4b\xc6\x69\x02\xd2\x47\xbd\xa3\x2d\xdf\xb8\xc4\xfb\x29\x11\xc1\xfd\x97\x9b\xfd\x24\xdb\x56\x4f\xd9\x91\x12\x71\xea\xd2\x31\x30\xc8\x48\x51\x26\x17\x23\x3b\x90\xd1\x85\x2d\x01\x7e\x66\xee\x67\x67\xf3\x13\x70\xcd\xef\xe9\xce\x71\xd2\x09\xbd\x8f\x2d\x61\xd7\x49\x69\x3f\xd9\xbf\xa7\xe5\x01\x83\xf2\xef\x6c\x90\x0d\xfe\x0d\x00\x00\xff\xff\x0e\xa4\xe8\xa9\x5a\x3a\x00\x00") func yaoFieldsModelTransJsonBytes() ([]byte, error) { return bindataRead( @@ -1216,7 +1237,7 @@ func yaoFieldsModelTransJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/fields/model.trans.json", size: 14959, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/fields/model.trans.json", size: 14938, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1236,7 +1257,7 @@ func yaoLangsEnUsJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/en-US.json", size: 66, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/langs/en-US.json", size: 66, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1256,7 +1277,7 @@ func yaoLangsZhCnGlobalYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-cn/global.yml", size: 1762, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/langs/zh-cn/global.yml", size: 1762, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1276,7 +1297,7 @@ func yaoLangsZhCnLoginsAdminLoginYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-cn/logins/admin.login.yml", size: 94, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/langs/zh-cn/logins/admin.login.yml", size: 94, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1296,7 +1317,7 @@ func yaoLangsZhCnLoginsUserLoginYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-cn/logins/user.login.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/langs/zh-cn/logins/user.login.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1316,7 +1337,7 @@ func yaoLangsZhHkGlobalYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-hk/global.yml", size: 1762, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/langs/zh-hk/global.yml", size: 1762, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1336,7 +1357,7 @@ func yaoLangsZhHkLoginsAdminLoginYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-hk/logins/admin.login.yml", size: 94, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/langs/zh-hk/logins/admin.login.yml", size: 94, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1356,7 +1377,7 @@ func yaoLangsZhHkLoginsUserLoginYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-hk/logins/user.login.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/langs/zh-hk/logins/user.login.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1376,7 +1397,7 @@ func yaoReleaseAppYaz() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/release/app.yaz", size: 181682, mode: os.FileMode(420), modTime: time.Unix(1702187663, 0)} + info := bindataFileInfo{name: "yao/release/app.yaz", size: 181682, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1433,8 +1454,6 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "builder/foo.js": builderFooJs, - "builder/index.html": builderIndexHtml, "init/README.md": initReadmeMd, "init/aigcs/translate.ai.yml": initAigcsTranslateAiYml, "init/apis/aigc.http.yao": initApisAigcHttpYao, @@ -1468,6 +1487,9 @@ var _bindata = map[string]func() (*asset, error){ "init/studio/hello.js": initStudioHelloJs, "init/tables/admin/user.tab.yao": initTablesAdminUserTabYao, "init/tables/demo/pet.tab.yao": initTablesDemoPetTabYao, + "libsui/index.ts": libsuiIndexTs, + "libsui/utils.ts": libsuiUtilsTs, + "libsui/yao.ts": libsuiYaoTs, "public/index.html": publicIndexHtml, "ui/index.html": uiIndexHtml, "xgen/setup/index.html": xgenSetupIndexHtml, @@ -1536,10 +1558,6 @@ type bintree struct { } var _bintree = &bintree{nil, map[string]*bintree{ - "builder": {nil, map[string]*bintree{ - "foo.js": {builderFooJs, map[string]*bintree{}}, - "index.html": {builderIndexHtml, map[string]*bintree{}}, - }}, "init": {nil, map[string]*bintree{ "README.md": {initReadmeMd, map[string]*bintree{}}, "aigcs": {nil, map[string]*bintree{ @@ -1631,6 +1649,11 @@ var _bintree = &bintree{nil, map[string]*bintree{ }}, }}, }}, + "libsui": {nil, map[string]*bintree{ + "index.ts": {libsuiIndexTs, map[string]*bintree{}}, + "utils.ts": {libsuiUtilsTs, map[string]*bintree{}}, + "yao.ts": {libsuiYaoTs, map[string]*bintree{}}, + }}, "public": {nil, map[string]*bintree{ "index.html": {publicIndexHtml, map[string]*bintree{}}, }}, diff --git a/data/data.go b/data/data.go index f6e8597a..e6be82f2 100644 --- a/data/data.go +++ b/data/data.go @@ -46,18 +46,6 @@ func Setup() *assetfs.AssetFS { panic("unreachable") } -// Builder Builder ui -func Builder() *assetfs.AssetFS { - assetInfo := func(path string) (os.FileInfo, error) { - return os.Stat(path) - } - for k := range _bintree.Children { - k = "builder" - return &assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, AssetInfo: assetInfo, Prefix: k, Fallback: "index.html"} - } - panic("unreachable") -} - // ReplaceXGen bindata file func ReplaceXGen(search, replace string) error { err := replaceXGenIndex(search, replace) diff --git a/service/static.go b/service/static.go index 00b4a2bf..c1acebd3 100644 --- a/service/static.go +++ b/service/static.go @@ -18,9 +18,6 @@ var AppFileServer http.Handler // XGenFileServerV1 XGen v1.0 var XGenFileServerV1 http.Handler = http.FileServer(data.XgenV1()) -// BuilderFileServer Builder ui -var BuilderFileServer http.Handler = http.FileServer(data.Builder()) - // AdminRoot cache var AdminRoot = "" diff --git a/sui/api/api.go b/sui/api/api.go index 7dfad437..74522334 100644 --- a/sui/api/api.go +++ b/sui/api/api.go @@ -10,6 +10,26 @@ var dsl = []byte(` "guard": "bearer-jwt", "group": "__yao/sui/v1", "paths": [ + { + "label": "Render", + "description": "Render the frontend page", + "path": "/render/*route", + "method": "POST", + "guard": "-", + "process": "sui.Render", + "in": [":context", "$param.route", ":payload"], + "out": { "status": 200, "type": "text/html; charset=utf-8" } + }, + { + "label": "Run", + "description": "Run the backend script, with Api prefix method", + "path": "/run/*route", + "guard": "-", + "method": "POST", + "process": "sui.Run", + "in": [":context", "$param.route", ":payload"], + "out": { "status": 200, "type": "application/json" } + }, { "path": "/:id/setting", "method": "GET", diff --git a/sui/api/process.go b/sui/api/process.go index 5459bb62..093f1d09 100644 --- a/sui/api/process.go +++ b/sui/api/process.go @@ -20,6 +20,9 @@ func init() { process.RegisterGroup("sui", map[string]process.Handler{ "setting": Setting, + "render": Render, + "run": Run, + "template.get": TemplateGet, "template.find": TemplateFind, "template.asset": TemplateAsset, diff --git a/sui/api/render.go b/sui/api/render.go new file mode 100644 index 00000000..732e911e --- /dev/null +++ b/sui/api/render.go @@ -0,0 +1,111 @@ +package api + +import ( + "fmt" + + "github.com/gin-gonic/gin" + "github.com/yaoapp/gou/process" + "github.com/yaoapp/yao/sui/core" +) + +// Render the frontend page +func Render(process *process.Process) interface{} { + process.ValidateArgNums(3) + ctx, ok := process.Args[0].(*gin.Context) + if !ok { + return "The context is required" + } + + ctx.Header("Content-Type", "text/html; charset=utf-8") + route := process.ArgsString(1) + payload := process.ArgsMap(2) + + if route == "" { + return "The route is required" + } + + if payload["name"] == nil { + return "The render name is required" + } + + ctx.Request.URL.Path = route + r, _, err := NewRequestContext(ctx) + if err != nil { + return fmt.Sprintf("
%s
", err.Error()) + } + + var c *core.Cache = nil + if !r.Request.DisableCache() { + c = core.GetCache(r.File) + } + + if c == nil { + c, _, err = r.MakeCache() + if err != nil { + return fmt.Sprintf("
%s
", err.Error()) + } + } + + if c == nil { + return fmt.Sprintf("
Cache not found
") + } + + data, ok := payload["data"].(map[string]interface{}) + if !ok { + return fmt.Sprintf("
Data not found
") + } + + name, ok := payload["name"].(string) + if !ok { + return fmt.Sprintf("
Name not found
") + } + + html, err := r.renderHTML(c, name, c.HTML, core.Data(data)) + if err != nil { + return fmt.Sprintf("
%s
", err.Error()) + } + + return html +} + +func (r *Request) renderHTML(c *core.Cache, name string, html string, data core.Data) (string, error) { + + doc, err := core.NewDocument([]byte(html)) + if err != nil { + return "", fmt.Errorf("Document error: %w", err) + } + + sel := doc.Find(fmt.Sprintf("[s\\:render='%s']", name)) + if sel.Length() == 0 { + return "", fmt.Errorf("Render %s not found", name) + } + + // Set the page request data + option := core.ParserOption{ + Theme: r.Request.Theme, + Locale: r.Request.Locale, + Debug: r.Request.DebugMode(), + DisableCache: r.Request.DisableCache(), + Route: r.Request.URL.Path, + Root: c.Root, + Script: c.Script, + Imports: c.Imports, + Request: r.Request, + } + + // Parse the template + parser := core.NewTemplateParser(data, &option) + err = parser.RenderSelection(sel) + if err != nil { + return "", fmt.Errorf("Parser error: %w", err) + } + + sel.Find("[sui-hide]").Remove() + parser.Tidy(sel) + html, err = sel.Html() + if err != nil { + return "", fmt.Errorf("Html error: %w", err) + } + + return html, nil +} diff --git a/sui/api/run.go b/sui/api/run.go new file mode 100644 index 00000000..b4aaa388 --- /dev/null +++ b/sui/api/run.go @@ -0,0 +1,8 @@ +package api + +import "github.com/yaoapp/gou/process" + +// Run the backend script, with Api prefix method +func Run(process *process.Process) interface{} { + return nil +} diff --git a/sui/core/build.go b/sui/core/build.go index 181e0e8b..49ac3f80 100644 --- a/sui/core/build.go +++ b/sui/core/build.go @@ -71,6 +71,19 @@ func (page *Page) Build(ctx *BuildContext, option *BuildOption) (*goquery.Docume ctx.warnings = append(ctx.warnings, warnings...) } + // Prepend the libsui.min.js + if !option.IgnoreLibSUI { + script := ScriptNode{ + Parent: "head", + Attrs: []html.Attribute{ + {Key: "src", Val: fmt.Sprintf("%s/libsui.min.js", option.AssetRoot)}, + {Key: "type", Val: "text/javascript"}, + {Key: "name", Val: "libsui"}, + }, + } + ctx.scripts = append([]ScriptNode{script}, ctx.scripts...) + } + // Scripts scripts, err := page.BuildScripts(ctx, option, "__page", namespace) if err != nil { diff --git a/sui/core/compile.go b/sui/core/compile.go index d16138fd..ebe9f38c 100644 --- a/sui/core/compile.go +++ b/sui/core/compile.go @@ -58,13 +58,6 @@ func (page *Page) Compile(ctx *BuildContext, option *BuildOption) (string, []str } - // SUI lib - lib, err := libsui(option.ScriptMinify) - if err != nil { - return "", warnings, err - } - head.AppendHtml("\n\n" + `` + "\n\n") - // Page Config page.Config = page.GetConfig() diff --git a/sui/core/event.go b/sui/core/event.go index b231de48..f36131fa 100644 --- a/sui/core/event.go +++ b/sui/core/event.go @@ -94,10 +94,12 @@ func GetEventScript(sequence int, sel *goquery.Selection, ns string, cn string, for name, handler := range events { if ispage { source += pageEventInjectScript(id, name, dataRaw, jsonRaw, handler) + "\n" + sel.SetAttr("s:event-cn", "__page") } else { source += compEventInjectScript(id, name, cn, dataRaw, jsonRaw, handler) + "\n" + sel.SetAttr("s:event-cn", cn) } - sel.RemoveAttr(fmt.Sprintf("s:on-%s", name)) + // sel.RemoveAttr(fmt.Sprintf("s:on-%s", name)) } sel.SetAttr("s:event", id) diff --git a/sui/core/injections.go b/sui/core/injections.go index b63f3631..9d579390 100644 --- a/sui/core/injections.go +++ b/sui/core/injections.go @@ -5,226 +5,45 @@ import ( "github.com/evanw/esbuild/pkg/api" "github.com/yaoapp/gou/runtime/transform" + "github.com/yaoapp/yao/data" ) var libsuicode = "" -func libsui(minify bool) (string, error) { - if libsuicode != "" { - return libsuicode, nil - } +// LibSUI return the libsui code +func LibSUI() ([]byte, []byte, error) { - option := api.TransformOptions{Target: api.ES2015} - if minify { - option.MinifyIdentifiers = true - option.MinifySyntax = true - option.MinifyWhitespace = true - } - var err error - libsuicode, err = transform.JavaScript(libsuisource, option) + // Read source code from bindata + index, err := data.Read("libsui/index.ts") if err != nil { - return "", fmt.Errorf("libsui error: %w", err) + return nil, nil, err } - return libsuicode, nil + + utils, err := data.Read("libsui/utils.ts") + if err != nil { + return nil, nil, err + } + + yao, err := data.Read("libsui/yao.ts") + if err != nil { + return nil, nil, err + } + + // Merge the source code + source := fmt.Sprintf("%s\n%s\n%s", index, utils, yao) + + // Build the source code + js, sm, err := transform.TypeScriptWithSourceMap(string(source), api.TransformOptions{ + Target: api.ES2015, + MinifyIdentifiers: true, + MinifySyntax: true, + MinifyWhitespace: true, + Sourcefile: "libsui.ts", + }) + + return js, sm, nil } -const libsuisource = ` - - function $$(selector) { - elm = null; - if (typeof selector === "string" ){ - elm = document.querySelector(selector); - } - - if (selector instanceof HTMLElement) { - elm = selector; - } - - if (elm) { - cn = elm.getAttribute("s:cn"); - if (cn != "" && typeof window[cn] === "function") { - const component = new window[cn](elm); - return new __sui_component(elm, component); - } - } - return null; - } - - const $utils = { - - RemoveClass: (element, className) => { - const classes = Array.isArray(className) ? className : className.split(" "); - classes.forEach((c) => { - const v = c.replace(/[\n\r\s]/g, ""); - if (v === "") return; - element.classList.remove(v); - }); - }, - - AddClass: (element, className) => { - const classes = Array.isArray(className) ? className : className.split(" "); - classes.forEach((c) => { - const v = c.replace(/[\n\r\s]/g, ""); - if (v === "") return; - element.classList.add(v); - }); - }, - } - - function __sui_component_root(elm, name) { - while (elm && elm.getAttribute("s:cn") !== name) { - elm = elm.parentElement; - } - return elm; - } - - function __sui_state(component) { - this.handlers = component.watch || {}; - this.Set = async function (key, value, target) { - const handler = this.handlers[key]; - target = target || component.root; - if (handler && typeof handler === "function") { - const stateObj = { - target: target, - stopPropagation: function () { - target.setAttribute("state-propagation", "true"); - }, - } - await handler(value, stateObj); - const isStopPropagation = target ? target.getAttribute("state-propagation") === "true" : false; - if (isStopPropagation) { - return; - } - - let parent = component.root.parentElement; - while (parent && !parent.getAttribute("s:cn")) { - parent = parent.parentElement; - } - if ( parent == document.body || parent == null) { - return; - } - // Dispatch the state change custom event to parent component - const event = new CustomEvent("state:change", { detail: { key: key, value: value, target:component.root } }); - parent.dispatchEvent(event); - } - } - } - - function __sui_props(elm) { - this.Get = function (key) { - if (!elm || typeof elm.getAttribute !== "function") { - return null; - } - const k = "prop:" + key; - const v = elm.getAttribute(k); - const json = elm.getAttribute("json-attr-prop:" + key) === "true"; - if (json) { - try { - return JSON.parse(v); - } catch (e) { - return null; - } - } - return v; - } - - this.List = function () { - const props = {}; - if (!elm || typeof elm.getAttribute !== "function") { - return props; - } - - const attrs = elm.attributes; - for (let i = 0; i < attrs.length; i++) { - const attr = attrs[i]; - if (attr.name.startsWith("prop:")) { - const k = attr.name.replace("prop:", ""); - const json = elm.getAttribute("json-attr-prop:" + k) === "true"; - if (json) { - try { - props[k] = JSON.parse(attr.value); - } catch (e) { - props[k] = null; - } - continue; - } - props[k] = attr.value; - } - } - return props; - } - } - - function __sui_component(elm, component) { - this.root = elm; - this.store = new __sui_store(elm); - this.props = new __sui_props(elm); - this.state = component ? new __sui_state(component) : {}; - } - - function __sui_event_handler(event, dataKeys, jsonKeys, target, root, handler) { - const data = {}; - target = target || null; - if (target) { - dataKeys.forEach(function (key) { - const value = target.getAttribute("data:" + key); - data[key] = value; - }) - jsonKeys.forEach(function (key) { - const value = target.getAttribute("json:" + key); - data[key] = null; - if (value && value != "") { - try { - data[key] = JSON.parse(value); - } catch (e) { - const message = e.message || e || "An error occurred"; - console.error(` + "`[SUI] Event Handler Error: ${message}`" + `, target); - } - } - }) - } - handler && handler(event, data, { - rootElement: root, - targetElement: target - }); - }; - - function __sui_store(elm) { - elm = elm || document.body; - - this.Get = function (key) { - return elm.getAttribute("data:" + key); - } - - this.Set = function (key, value) { - elm.setAttribute("data:" + key, value); - } - - this.GetJSON = function (key) { - const value = elm.getAttribute("json:" + key); - if (value && value != "") { - try { - const res = JSON.parse(value); - return res; - } catch (e) { - const message = e.message || e || "An error occurred"; - console.error(` + "`[SUI] Event Handler Error: ${message}`" + `, elm); - return null; - } - } - return null; - } - - this.SetJSON = function (key, value) { - elm.setAttribute("json:" + key, JSON.stringify(value)); - } - - this.GetData = function () { - return this.GetJSON("__component_data") || {}; - } - } -` - const initScriptTmpl = ` try { var __sui_data = %s; @@ -237,7 +56,7 @@ const initScriptTmpl = ` const cn = element.getAttribute("s:cn"); if (method && typeof window[cn] === "function") { try { - window[cn](element); + new window[cn](element); } catch (e) { const message = e.message || e || "An error occurred"; console.error(` + "`[SUI] ${cn} Error: ${message}`" + `); @@ -264,24 +83,30 @@ const i118nScriptTmpl = ` ` const pageEventScriptTmpl = ` - document.querySelector("[s\\:event=%s]").addEventListener("%s", function (event) { - const dataKeys = %s; - const jsonKeys = %s; - const root = document.body; - const target = this; - __sui_event_handler(event, dataKeys, jsonKeys, target, root, %s); - }); + if (document.querySelector("[s\\:event=%s]")) { + let elms = document.querySelectorAll("[s\\:event=%s]"); + elms.forEach(function (element) { + element.addEventListener("%s", function (event) { + const dataKeys = %s; + const jsonKeys = %s; + const root = document.body; + __sui_event_handler(event, dataKeys, jsonKeys, element, root, window.%s); + }); + }); + } ` const compEventScriptTmpl = ` if (document.querySelector("[s\\:event=%s]")) { - document.querySelector("[s\\:event=%s]").addEventListener("%s", function (event) { - const dataKeys = %s; - const jsonKeys = %s; - const root = __sui_component_root(this, "%s"); - handler = new %s(root).%s; - const target = event.target || null; - __sui_event_handler(event, dataKeys, jsonKeys, target, root, handler); + let elms = document.querySelectorAll("[s\\:event=%s]"); + elms.forEach(function (element) { + element.addEventListener("%s", function (event) { + const dataKeys = %s; + const jsonKeys = %s; + const root = __sui_component_root(element, "%s"); + handler = new %s(root).%s; + __sui_event_handler(event, dataKeys, jsonKeys, element, root, handler); + }); }); } ` @@ -333,7 +158,7 @@ func headInjectionScript(jsonRaw string) string { } func pageEventInjectScript(eventID, eventName, dataKeys, jsonKeys, handler string) string { - return fmt.Sprintf(pageEventScriptTmpl, eventID, eventName, dataKeys, jsonKeys, handler) + return fmt.Sprintf(pageEventScriptTmpl, eventID, eventID, eventName, dataKeys, jsonKeys, handler) } func compEventInjectScript(eventID, eventName, component, dataKeys, jsonKeys, handler string) string { diff --git a/sui/core/parser.go b/sui/core/parser.go index 86edb613..041dbf48 100644 --- a/sui/core/parser.go +++ b/sui/core/parser.go @@ -68,17 +68,21 @@ var keepWords = map[string]bool{ } var allowUsePropAttrs = map[string]bool{ - "s:if": true, - "s:elif": true, - "s:for": true, - "s:event": true, + "s:if": true, + "s:elif": true, + "s:for": true, + "s:event": true, + "s:event-cn": true, + "s:render": true, } var keepAttrs = map[string]bool{ - "s:ns": true, - "s:cn": true, - "s:ready": true, - "s:event": true, + "s:ns": true, + "s:cn": true, + "s:ready": true, + "s:event": true, + "s:event-cn": true, + "s:render": true, } // NewTemplateParser create a new template parser @@ -157,7 +161,7 @@ func (parser *TemplateParser) Render(html string) (string, error) { if parser.option != nil && (parser.option.Request != nil || parser.option.Preview) { // Remove the sui-hide attribute doc.Find("[sui-hide]").Remove() - parser.tidy(doc.Selection) + parser.Tidy(doc.Selection) } // fmt.Println(doc.Html()) @@ -837,13 +841,13 @@ func (parser *TemplateParser) show(sel *goquery.Selection) { // sel.SetAttr("style", style) } -func (parser *TemplateParser) tidy(s *goquery.Selection) { +func (parser *TemplateParser) Tidy(s *goquery.Selection) { s.Contents().Each(func(i int, child *goquery.Selection) { node := child.Get(0) if _, exist := child.Attr("s:jit"); node.Data == "slot" || exist { - parser.tidy(child) + parser.Tidy(child) parser.removeWrapper(child) return } @@ -861,7 +865,7 @@ func (parser *TemplateParser) tidy(s *goquery.Selection) { // Remove the parsed attribute attrs := []html.Attribute{} for _, attr := range node.Attr { - if strings.HasPrefix(attr.Key, "s:") && !keepAttrs[attr.Key] { + if strings.HasPrefix(attr.Key, "s:") && !keepAttrs[attr.Key] && !strings.HasPrefix(attr.Key, "s:on-") { continue } @@ -872,7 +876,7 @@ func (parser *TemplateParser) tidy(s *goquery.Selection) { } node.Attr = attrs - parser.tidy(child) + parser.Tidy(child) }) } diff --git a/sui/core/types.go b/sui/core/types.go index 038e37d0..54709b13 100644 --- a/sui/core/types.go +++ b/sui/core/types.go @@ -262,6 +262,7 @@ type BuildOption struct { PublicRoot string `json:"public_root,omitempty"` AssetRoot string `json:"asset_root,omitempty"` IgnoreAssetRoot bool `json:"ignore_asset_root,omitempty"` + IgnoreLibSUI bool `json:"ignore_lib_sui,omitempty"` IgnoreDocument bool `json:"ignore_document,omitempty"` JitMode bool `json:"jit_mode,omitempty"` WithWrapper bool `json:"with_wrapper,omitempty"` diff --git a/sui/libsui/index.ts b/sui/libsui/index.ts new file mode 100644 index 00000000..bdfaf98e --- /dev/null +++ b/sui/libsui/index.ts @@ -0,0 +1,340 @@ +function $$(selector) { + let elm: HTMLElement | null = null; + if (typeof selector === "string") { + elm = document.querySelector(selector); + } + + if (selector instanceof HTMLElement) { + elm = selector; + } + + if (elm) { + const cn = elm.getAttribute("s:cn"); + if (cn && cn != "" && typeof window[cn] === "function") { + const component = new window[cn](elm); + return new __sui_component(elm, component); + } + } + return null; +} + +function __sui_component_root(elm: Element, name: string) { + return elm.closest(`[s\\:cn=${name}]`); +} + +function __sui_state(component) { + this.handlers = component.watch || {}; + this.Set = async function (key, value, target) { + const handler = this.handlers[key]; + target = target || component.root; + if (handler && typeof handler === "function") { + const stateObj = { + target: target, + stopPropagation: function () { + target.setAttribute("state-propagation", "true"); + }, + }; + await handler(value, stateObj); + const isStopPropagation = target + ? target.getAttribute("state-propagation") === "true" + : false; + if (isStopPropagation) { + return; + } + + let parent = component.root.parentElement; + while (parent && !parent.getAttribute("s:cn")) { + parent = parent.parentElement; + } + if (parent == document.body || parent == null) { + return; + } + // Dispatch the state change custom event to parent component + const event = new CustomEvent("state:change", { + detail: { key: key, value: value, target: component.root }, + }); + parent.dispatchEvent(event); + } + }; +} + +function __sui_props(elm) { + this.Get = function (key) { + if (!elm || typeof elm.getAttribute !== "function") { + return null; + } + const k = "prop:" + key; + const v = elm.getAttribute(k); + const json = elm.getAttribute("json-attr-prop:" + key) === "true"; + if (json) { + try { + return JSON.parse(v); + } catch (e) { + return null; + } + } + return v; + }; + + this.List = function () { + const props = {}; + if (!elm || typeof elm.getAttribute !== "function") { + return props; + } + + const attrs = elm.attributes; + for (let i = 0; i < attrs.length; i++) { + const attr = attrs[i]; + if (attr.name.startsWith("prop:")) { + const k = attr.name.replace("prop:", ""); + const json = elm.getAttribute("json-attr-prop:" + k) === "true"; + if (json) { + try { + props[k] = JSON.parse(attr.value); + } catch (e) { + props[k] = null; + } + continue; + } + props[k] = attr.value; + } + } + return props; + }; +} + +function __sui_component(elm, component) { + this.root = elm; + this.store = new __sui_store(elm); + this.props = new __sui_props(elm); + this.state = component ? new __sui_state(component) : {}; +} + +function __sui_event_handler(event, dataKeys, jsonKeys, target, root, handler) { + const data = {}; + target = target || null; + if (target) { + dataKeys.forEach(function (key) { + const value = target.getAttribute("data:" + key); + data[key] = value; + }); + jsonKeys.forEach(function (key) { + const value = target.getAttribute("json:" + key); + data[key] = null; + if (value && value != "") { + try { + data[key] = JSON.parse(value); + } catch (e) { + const message = e.message || e || "An error occurred"; + console.error(`[SUI] Event Handler Error: ${message} `, target); + } + } + }); + } + handler && + handler(event, data, { + rootElement: root, + targetElement: target, + }); +} + +function __sui_event_init(elm: Element) { + const eventElms = elm.querySelectorAll("[s\\:event]"); + eventElms.forEach((eventElm) => { + const cn = eventElm.getAttribute("s:event-cn") || ""; + + // Data keys + const events: Record = {}; + const dataKeys: string[] = []; + const jsonKeys: string[] = []; + for (let i = 0; i < eventElm.attributes.length; i++) { + if (eventElm.attributes[i].name.startsWith("data:")) { + dataKeys.push(eventElm.attributes[i].name.replace("data:", "")); + } + if (eventElm.attributes[i].name.startsWith("json:")) { + jsonKeys.push(eventElm.attributes[i].name.replace("json:", "")); + } + if (eventElm.attributes[i].name.startsWith("s:on-")) { + const key = eventElm.attributes[i].name.replace("s:on-", ""); + events[key] = eventElm.attributes[i].value; + } + } + + // Bind the event + for (const name in events) { + const bind = events[name]; + if (cn == "__page") { + const handler = window[bind]; + const root = document.body; + const target = eventElm; + eventElm.addEventListener(name, (event) => { + __sui_event_handler(event, dataKeys, jsonKeys, target, root, handler); + }); + continue; + } + + const comp = new window[cn](eventElm.closest(`[s\\:cn=${cn}]`)); + const handler = comp[bind]; + const root = comp.root; + const target = eventElm; + eventElm.addEventListener(name, (event) => { + __sui_event_handler(event, dataKeys, jsonKeys, target, root, handler); + }); + } + }); +} + +function __sui_store(elm) { + elm = elm || document.body; + + this.Get = function (key) { + return elm.getAttribute("data:" + key); + }; + + this.Set = function (key, value) { + elm.setAttribute("data:" + key, value); + }; + + this.GetJSON = function (key) { + const value = elm.getAttribute("json:" + key); + if (value && value != "") { + try { + const res = JSON.parse(value); + return res; + } catch (e) { + const message = e.message || e || "An error occurred"; + console.error(`[SUI] Event Handler Error: ${message}`, elm); + return null; + } + } + return null; + }; + + this.SetJSON = function (key, value) { + elm.setAttribute("json:" + key, JSON.stringify(value)); + }; + + this.GetData = function () { + return this.GetJSON("__component_data") || {}; + }; +} + +/** + * SUI Render + * @param component + * @param name + */ +async function __sui_render( + component: Component | string, + name: string, + data: Record, + option?: RenderOption +): Promise { + const comp = ( + typeof component === "object" ? component : $$(component) + ) as Component; + + if (comp == null) { + console.error(`[SUI] Component not found: ${component}`); + return Promise.reject("Component not found"); + } + + const elms = comp.root.querySelectorAll(`[s\\:render=${name}]`); + if (!elms.length) { + console.error(`[SUI] No element found with s:render=${name}`); + return Promise.reject("No element found"); + } + + // Set default options + option = option || {}; + option.replace = option.replace === undefined ? true : option.replace; + option.showLoader = + option.showLoader === undefined ? false : option.showLoader; + option.withPageData = + option.withPageData === undefined ? false : option.withPageData; + + // Prepare loader + let loader = `Loading...`; + if (option.showLoader && option.replace) { + if (typeof option.showLoader === "string") { + loader = option.showLoader; + } else if (option.showLoader instanceof HTMLElement) { + loader = option.showLoader.outerHTML; + } + elms.forEach((elm) => (elm.innerHTML = loader)); + } + + // Prepare data + let _data = comp.store.GetData() || {}; + if (option.withPageData) { + // @ts-ignore + _data = { ..._data, ...__sui_data }; + } + + const route = window.location.pathname; + const url = `/api/__yao/sui/v1/render${route}`; + const payload = { name, data: { ..._data, ...data }, option }; + const headers = { + "Content-Type": "application/json", + Cookie: document.cookie, + }; + + // Native post request to the server + try { + const body = JSON.stringify(payload); + const response = await fetch(url, { method: "POST", headers, body: body }); + const text = await response.text(); + if (!option.replace) { + return Promise.resolve(text); + } + + // Set the response text to the elements + elms.forEach((elm) => { + elm.innerHTML = text; + __sui_event_init(elm); + }); + + return Promise.resolve(text); + } catch (e) { + //Set the error message + elms.forEach((elm) => { + elm.innerHTML = `Failed to render`; + console.error("Failed to render", e); + }); + return Promise.reject("Failed to render"); + } +} + +export type Component = { + root: HTMLElement; + state: ComponentState; + store: ComponentStore; + watch?: Record void>; + Constants?: Record; + + [key: string]: any; +}; + +export type RenderOption = { + target?: HTMLElement; // default is same with s:render target + showLoader?: HTMLElement | string | boolean; // default is false + replace?: boolean; // default is true + withPageData?: boolean; // default is false +}; + +export type ComponentState = { + Set: (key: string, value: any) => void; +}; + +export type ComponentStore = { + Get: (key: string) => string; + Set: (key: string, value: any) => void; + GetJSON: (key: string) => any; + SetJSON: (key: string, value: any) => void; + GetData: () => Record; +}; + +export type State = { + target: HTMLElement; + stopPropagation(); +}; diff --git a/sui/libsui/utils.ts b/sui/libsui/utils.ts new file mode 100644 index 00000000..555db7d4 --- /dev/null +++ b/sui/libsui/utils.ts @@ -0,0 +1,177 @@ +function $Store(elm) { + if (!elm) { + return null; + } + + if (typeof elm === "string") { + elm = document.querySelectorAll(elm); + if (elm.length == 0) { + return null; + } + elm = elm[0]; + } + // @ts-ignore + return new __sui_store(elm); +} + +function $Query(selector: string): __Query { + return new __Query(selector); +} + +class __Query { + selector: string | Element = ""; + elements: NodeListOf | null = null; + element: Element | null = null; + constructor(selector: string | Element) { + if (typeof selector === "string") { + this.selector = selector; + this.elements = document.querySelectorAll(selector); + if (this.elements.length > 0) { + this.element = this.elements[0]; + } + } else { + this.element = selector; + } + this.selector = selector; + } + + elm(): Element | null { + return this.element; + } + + elms(): NodeListOf | null { + return this.elements; + } + + $$() { + if (!this.element) { + return null; + } + const root = this.element.closest("[s\\:cn]"); + if (!root) { + return null; + } + + // @ts-ignore + return $$(root); + } + + each(callback: (element: __Query, index: number) => void) { + if (!this.elements) { + return; + } + this.elements.forEach((element, index) => { + callback(new __Query(element), index); + }); + return; + } + + store() { + if (!this.element || typeof this.element.getAttribute !== "function") { + return null; + } + + // @ts-ignore + return new __sui_store(this.element); + } + + attr(key) { + if (!this.element || typeof this.element.getAttribute !== "function") { + return null; + } + return this.element.getAttribute(key); + } + + data(key) { + if (!this.element || typeof this.element.getAttribute !== "function") { + return null; + } + return this.element.getAttribute("data:" + key); + } + + json(key) { + if (!this.element || typeof this.element.getAttribute !== "function") { + return null; + } + const v = this.element.getAttribute("json:" + key); + if (!v) { + return null; + } + try { + return JSON.parse(v); + } catch (e) { + console.error(`Error parsing JSON for key ${key}: ${e}`); + return null; + } + } + + hasClass(className) { + return this.element?.classList.contains(className); + } + + prop(key) { + if (!this.element || typeof this.element.getAttribute !== "function") { + return null; + } + const k = "prop:" + key; + const v = this.element.getAttribute(k); + const json = this.element.getAttribute("json-attr-prop:" + key) === "true"; + if (json && v) { + try { + return JSON.parse(v); + } catch (e) { + console.error(`Error parsing JSON for prop ${key}: ${e}`); + return null; + } + } + return v; + } + + removeClass(className) { + const classes = Array.isArray(className) ? className : className.split(" "); + classes.forEach((c) => { + const v = c.replace(/[\n\r\s]/g, ""); + if (v === "") return; + this.element?.classList.remove(v); + }); + return this; + } + + addClass(className) { + const classes = Array.isArray(className) ? className : className.split(" "); + classes.forEach((c) => { + const v = c.replace(/[\n\r\s]/g, ""); + if (v === "") return; + this.element?.classList.add(v); + }); + return this; + } + + html(html?: string): __Query | string { + if (html === undefined) { + return this.element?.innerHTML || ""; + } + if (this.element) { + this.element.innerHTML = html; + } + return this; + } +} + +function $Render(comp, option): __Render { + const r = new __Render(comp, option); + return r; +} + +class __Render { + comp = null; + option = null; + constructor(comp, option) { + this.comp = comp; + this.option = option; + } + async Render(name, data): Promise { + // @ts-ignore + return __sui_render(this.comp, name, data, this.option); + } +} diff --git a/sui/libsui/yao.ts b/sui/libsui/yao.ts new file mode 100644 index 00000000..23e41b74 --- /dev/null +++ b/sui/libsui/yao.ts @@ -0,0 +1,182 @@ +/** + * YAO Pure JavaScript SDK + * @author Max + * @maintainer https://yaoapps.com + */ + +/** + * Yao Object + * @param {*} host + */ +function Yao(host) { + this.host = `${ + host || window.location.protocol + "//" + window.location.host + }/api`; + this.query = {}; + new URLSearchParams(window.location.search).forEach((key, value) => { + this.query[key] = value; + }); +} + +/** + * Get API + * @param {*} path + * @param {*} params + */ +Yao.prototype.Get = async function (path, params, headers) { + return this.Fetch("GET", path, params, null, headers); +}; + +/** + * Post API + * @param {*} path + * @param {*} data + * @param {*} params + * @param {*} headers + */ +Yao.prototype.Post = async function (path, data, params, headers) { + return this.Fetch("POST", path, params, data, headers); +}; + +/** + * Download API + * @param {*} path + * @param {*} params + */ +Yao.prototype.Download = async function (path, params, savefile, headers) { + try { + const blob = await this.Fetch("GET", path, params, null, headers, true); + + var objectUrl = window.URL.createObjectURL(blob); + let anchor = document.createElement("a"); + document.body.appendChild(anchor); + anchor.href = objectUrl; + anchor.download = savefile; + anchor.click(); + window.URL.revokeObjectURL(objectUrl); + } catch (err) { + alert("成功创建导出任务!"); + } +}; + +/** + * Fetch API + * @param {*} method + * @param {*} path + * @param {*} params + * @param {*} data + * @param {*} headers + */ +Yao.prototype.Fetch = async function ( + method, + path, + params, + data, + headers, + isblob +) { + params = params || {}; + headers = headers || {}; + data = data || null; + var url = `${this.host}${path}`; + var queryString = this.Serialize(params); + if (queryString != "") { + url = url.includes("?") ? `${url}&${queryString}` : `${url}?${queryString}`; + } + + const token = this.Token(); + if (token != "") { + headers["authorization"] = `Bearer ${token}`; + } + + if (!headers["Content-Type"]) { + headers["Content-Type"] = "application/json"; + } + + var options: any = { + method: method, + mode: "cors", // no-cors, *cors, same-origin + cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached + credentials: "same-origin", // include, *same-origin, omit + headers: headers, + redirect: "follow", // manual, *follow, error + }; + + if (data != null) { + options["body"] = JSON.stringify(data); + } + + const resp = await fetch(url, options); + const type = resp.headers.get("Content-Type") || ""; + if (type.includes("application/json")) { + try { + const data = await resp.json(); + return data; + } catch (err) { + return { code: resp.status, message: "empty return" }; + } + } else if (isblob) { + return resp.blob(); + } else if (type.includes("text/html") || type.includes("text/plain")) { + return resp.text(); + } + return resp.text(); +}; + +/** + * Token API + * @param {*} path + * @param {*} params + */ +Yao.prototype.Token = function () { + var token = sessionStorage.getItem("token") || ""; + if (token == "") { + return this.Cookie("__tk") || ""; + } + return token; +}; + +/** + * Get Cookie + * @param {*} cookieName + * @returns + */ +Yao.prototype.Cookie = function (cookieName) { + var name = cookieName + "="; + var decodedCookie = decodeURIComponent(document.cookie); + var cookieArray = decodedCookie.split(";"); + + for (var i = 0; i < cookieArray.length; i++) { + var cookie = cookieArray[i].trim(); + if (cookie.indexOf(name) === 0) { + return cookie.substring(name.length, cookie.length); + } + } + return null; +}; + +Yao.prototype.SetCookie = function (cookieName, cookieValue, expireDays) { + expireDays = expireDays || 30; + var d = new Date(); + d.setTime(d.getTime() + expireDays * 24 * 60 * 60 * 1000); + var expires = "expires=" + d.toUTCString(); + document.cookie = `${cookieName}=${cookieValue};${expires};path=/`; +}; + +Yao.prototype.DeleteCookie = function (cookieName) { + document.cookie = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`; +}; + +/** + * Serialize To Query String + * @param {*} obj + * @returns + */ +Yao.prototype.Serialize = function (obj) { + const str: string[] = []; + for (const p in obj) + if (obj.hasOwnProperty(p)) { + str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); + } + return str.join("&"); +}; diff --git a/sui/storages/local/build.go b/sui/storages/local/build.go index 4a428c2e..7b62e252 100644 --- a/sui/storages/local/build.go +++ b/sui/storages/local/build.go @@ -124,6 +124,12 @@ func (tmpl *Template) Build(option *core.BuildOption) ([]string, error) { return warnings, err } + // Add sui lib to the global + err = tmpl.UpdateJSSDK(option) + if err != nil { + return warnings, err + } + // Execute the build after hook if option.ExecScripts { res := tmpl.ExecAfterBuildScripts() @@ -200,6 +206,44 @@ func (tmpl *Template) SyncAssetFile(file string, option *core.BuildOption) error return copy(sourceFile, targetFile) } +// UpdateJSSDK update the js sdk +func (tmpl *Template) UpdateJSSDK(option *core.BuildOption) error { + + jsCode, sourceMap, err := core.LibSUI() + if err != nil { + return err + } + + // get source abs path + root, err := tmpl.local.DSL.PublicRoot(option.Data) + if err != nil { + log.Error("SyncAssets: Get the public root error: %s. use %s", err.Error(), tmpl.local.DSL.Public.Root) + root = tmpl.local.DSL.Public.Root + } + + targetRoot := filepath.Join(application.App.Root(), "public", root, "assets") + + file := filepath.Join(targetRoot, "libsui.min.js") + mapFile := filepath.Join(targetRoot, "libsui.min.js.map") + + // create the target directory + if exist, _ := os.Stat(targetRoot); exist == nil { + os.MkdirAll(targetRoot, os.ModePerm) + } + + // write the js sdk + // add source map url + jsCode = append(jsCode, []byte("\n//# sourceMappingURL=libsui.min.js.map")...) + err = os.WriteFile(file, jsCode, 0644) + if err != nil { + return err + } + + // write the source map + err = os.WriteFile(mapFile, sourceMap, 0644) + return nil +} + func (tmpl *Template) writeGlobalScript(data map[string]interface{}) error { file, source, err := tmpl.backendScriptSource("__global.backend") if err != nil { diff --git a/sui/storages/local/page_render_test.go b/sui/storages/local/page_render_test.go index 20170fe7..2ba1fbcc 100644 --- a/sui/storages/local/page_render_test.go +++ b/sui/storages/local/page_render_test.go @@ -28,10 +28,10 @@ func TestPageEditorRender(t *testing.T) { assert.NotEmpty(t, res.HTML) assert.NotEmpty(t, res.CSS) - assert.NotEmpty(t, res.Scripts) + // assert.NotEmpty(t, res.Scripts) assert.NotEmpty(t, res.Styles) assert.GreaterOrEqual(t, len(res.Styles), 1) - assert.GreaterOrEqual(t, len(res.Scripts), 1) + // assert.GreaterOrEqual(t, len(res.Scripts), 1) }