db.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. // Package database provides database initialization, migration, and management utilities
  2. // for the 3x-ui panel using GORM with SQLite or PostgreSQL.
  3. package database
  4. import (
  5. "bytes"
  6. "encoding/json"
  7. "errors"
  8. "io"
  9. "log"
  10. "math"
  11. "os"
  12. "path"
  13. "slices"
  14. "strconv"
  15. "strings"
  16. "time"
  17. "github.com/mhsanaei/3x-ui/v3/config"
  18. "github.com/mhsanaei/3x-ui/v3/database/model"
  19. "github.com/mhsanaei/3x-ui/v3/util/crypto"
  20. "github.com/mhsanaei/3x-ui/v3/util/random"
  21. "github.com/mhsanaei/3x-ui/v3/xray"
  22. "gorm.io/driver/postgres"
  23. "gorm.io/driver/sqlite"
  24. "gorm.io/gorm"
  25. "gorm.io/gorm/logger"
  26. )
  27. var db *gorm.DB
  28. const (
  29. DialectSQLite = "sqlite"
  30. DialectPostgres = "postgres"
  31. )
  32. // IsPostgres reports whether the active connection is a PostgreSQL backend.
  33. func IsPostgres() bool {
  34. if db == nil {
  35. return config.GetDBKind() == "postgres"
  36. }
  37. return db.Dialector.Name() == "postgres"
  38. }
  39. // Dialect returns the active GORM dialect name, or "" if the DB is not open.
  40. func Dialect() string {
  41. if db == nil {
  42. return ""
  43. }
  44. return db.Dialector.Name()
  45. }
  46. const (
  47. defaultUsername = "admin"
  48. defaultPassword = "admin"
  49. )
  50. func initModels() error {
  51. models := []any{
  52. &model.User{},
  53. &model.Inbound{},
  54. &model.OutboundTraffics{},
  55. &model.Setting{},
  56. &model.InboundClientIps{},
  57. &xray.ClientTraffic{},
  58. &model.HistoryOfSeeders{},
  59. &model.CustomGeoResource{},
  60. &model.Node{},
  61. &model.ApiToken{},
  62. &model.ClientRecord{},
  63. &model.ClientInbound{},
  64. &model.ClientGroup{},
  65. &model.InboundFallback{},
  66. }
  67. for _, mdl := range models {
  68. if err := db.AutoMigrate(mdl); err != nil {
  69. if isIgnorableDuplicateColumnErr(err, mdl) {
  70. log.Printf("Ignoring duplicate column during auto migration for %T: %v", mdl, err)
  71. continue
  72. }
  73. log.Printf("Error auto migrating model: %v", err)
  74. return err
  75. }
  76. }
  77. return nil
  78. }
  79. func isIgnorableDuplicateColumnErr(err error, mdl any) bool {
  80. if err == nil {
  81. return false
  82. }
  83. errMsg := strings.ToLower(err.Error())
  84. // SQLite: "duplicate column name: foo"
  85. // Postgres: `pq: column "foo" of relation "bar" already exists` / `sqlstate 42701`
  86. const sqlitePrefix = "duplicate column name:"
  87. if _, after, ok := strings.Cut(errMsg, sqlitePrefix); ok {
  88. col := strings.TrimSpace(after)
  89. col = strings.Trim(col, "`\"[]")
  90. return col != "" && db != nil && db.Migrator().HasColumn(mdl, col)
  91. }
  92. if strings.Contains(errMsg, "already exists") && strings.Contains(errMsg, "column ") {
  93. // Best effort: extract the column name between the first pair of double quotes.
  94. if _, after, ok := strings.Cut(errMsg, "column \""); ok {
  95. rest := after
  96. if e := strings.Index(rest, "\""); e > 0 {
  97. col := rest[:e]
  98. return col != "" && db != nil && db.Migrator().HasColumn(mdl, col)
  99. }
  100. }
  101. }
  102. return false
  103. }
  104. // initUser creates a default admin user if the users table is empty.
  105. func initUser() error {
  106. empty, err := isTableEmpty("users")
  107. if err != nil {
  108. log.Printf("Error checking if users table is empty: %v", err)
  109. return err
  110. }
  111. if empty {
  112. hashedPassword, err := crypto.HashPasswordAsBcrypt(defaultPassword)
  113. if err != nil {
  114. log.Printf("Error hashing default password: %v", err)
  115. return err
  116. }
  117. user := &model.User{
  118. Username: defaultUsername,
  119. Password: hashedPassword,
  120. }
  121. return db.Create(user).Error
  122. }
  123. return nil
  124. }
  125. // runSeeders migrates user passwords to bcrypt and records seeder execution to prevent re-running.
  126. func runSeeders(isUsersEmpty bool) error {
  127. empty, err := isTableEmpty("history_of_seeders")
  128. if err != nil {
  129. log.Printf("Error checking if users table is empty: %v", err)
  130. return err
  131. }
  132. if empty && isUsersEmpty {
  133. seeders := []string{"UserPasswordHash", "ClientsTable", "InboundClientsArrayFix", "InboundClientTgIdFix", "InboundClientSubIdFix"}
  134. for _, name := range seeders {
  135. if err := db.Create(&model.HistoryOfSeeders{SeederName: name}).Error; err != nil {
  136. return err
  137. }
  138. }
  139. return seedApiTokens()
  140. }
  141. var seedersHistory []string
  142. if err := db.Model(&model.HistoryOfSeeders{}).Pluck("seeder_name", &seedersHistory).Error; err != nil {
  143. log.Printf("Error fetching seeder history: %v", err)
  144. return err
  145. }
  146. if !slices.Contains(seedersHistory, "UserPasswordHash") && !isUsersEmpty {
  147. var users []model.User
  148. if err := db.Find(&users).Error; err != nil {
  149. log.Printf("Error fetching users for password migration: %v", err)
  150. return err
  151. }
  152. for _, user := range users {
  153. hashedPassword, err := crypto.HashPasswordAsBcrypt(user.Password)
  154. if err != nil {
  155. log.Printf("Error hashing password for user '%s': %v", user.Username, err)
  156. return err
  157. }
  158. if err := db.Model(&user).Update("password", hashedPassword).Error; err != nil {
  159. log.Printf("Error updating password for user '%s': %v", user.Username, err)
  160. return err
  161. }
  162. }
  163. hashSeeder := &model.HistoryOfSeeders{
  164. SeederName: "UserPasswordHash",
  165. }
  166. if err := db.Create(hashSeeder).Error; err != nil {
  167. return err
  168. }
  169. }
  170. if !slices.Contains(seedersHistory, "ApiTokensTable") {
  171. if err := seedApiTokens(); err != nil {
  172. return err
  173. }
  174. }
  175. if !slices.Contains(seedersHistory, "ClientsTable") {
  176. if err := seedClientsFromInboundJSON(); err != nil {
  177. return err
  178. }
  179. }
  180. if !slices.Contains(seedersHistory, "InboundClientsArrayFix") {
  181. if err := normalizeInboundClientsArray(); err != nil {
  182. return err
  183. }
  184. }
  185. if !slices.Contains(seedersHistory, "InboundClientTgIdFix") {
  186. if err := normalizeInboundClientTgId(); err != nil {
  187. return err
  188. }
  189. }
  190. if !slices.Contains(seedersHistory, "InboundClientSubIdFix") {
  191. if err := normalizeInboundClientSubId(); err != nil {
  192. return err
  193. }
  194. }
  195. return nil
  196. }
  197. func normalizeInboundClientTgId() error {
  198. var inbounds []model.Inbound
  199. if err := db.Find(&inbounds).Error; err != nil {
  200. return err
  201. }
  202. return db.Transaction(func(tx *gorm.DB) error {
  203. for _, inbound := range inbounds {
  204. if strings.TrimSpace(inbound.Settings) == "" {
  205. continue
  206. }
  207. var settings map[string]any
  208. if err := json.Unmarshal([]byte(inbound.Settings), &settings); err != nil {
  209. log.Printf("InboundClientTgIdFix: skip inbound %d (invalid settings json): %v", inbound.Id, err)
  210. continue
  211. }
  212. clients, ok := settings["clients"].([]any)
  213. if !ok {
  214. continue
  215. }
  216. mutated := false
  217. for i, raw := range clients {
  218. obj, ok := raw.(map[string]any)
  219. if !ok {
  220. continue
  221. }
  222. tgRaw, present := obj["tgId"]
  223. if !present {
  224. continue
  225. }
  226. v, isFloat := tgRaw.(float64)
  227. if isFloat && !math.IsNaN(v) && !math.IsInf(v, 0) && v == math.Trunc(v) {
  228. continue
  229. }
  230. obj["tgId"] = int64(0)
  231. clients[i] = obj
  232. mutated = true
  233. }
  234. if !mutated {
  235. continue
  236. }
  237. settings["clients"] = clients
  238. newSettings, err := json.MarshalIndent(settings, "", " ")
  239. if err != nil {
  240. log.Printf("InboundClientTgIdFix: skip inbound %d (marshal failed): %v", inbound.Id, err)
  241. continue
  242. }
  243. if err := tx.Model(&model.Inbound{}).Where("id = ?", inbound.Id).
  244. Update("settings", string(newSettings)).Error; err != nil {
  245. return err
  246. }
  247. }
  248. return tx.Create(&model.HistoryOfSeeders{SeederName: "InboundClientTgIdFix"}).Error
  249. })
  250. }
  251. func normalizeInboundClientSubId() error {
  252. var inbounds []model.Inbound
  253. if err := db.Find(&inbounds).Error; err != nil {
  254. return err
  255. }
  256. return db.Transaction(func(tx *gorm.DB) error {
  257. for _, inbound := range inbounds {
  258. if strings.TrimSpace(inbound.Settings) == "" {
  259. continue
  260. }
  261. var settings map[string]any
  262. if err := json.Unmarshal([]byte(inbound.Settings), &settings); err != nil {
  263. log.Printf("InboundClientSubIdFix: skip inbound %d (invalid settings json): %v", inbound.Id, err)
  264. continue
  265. }
  266. clients, ok := settings["clients"].([]any)
  267. if !ok {
  268. continue
  269. }
  270. mutated := false
  271. for i, raw := range clients {
  272. obj, ok := raw.(map[string]any)
  273. if !ok {
  274. continue
  275. }
  276. existing, _ := obj["subId"].(string)
  277. if strings.TrimSpace(existing) != "" {
  278. continue
  279. }
  280. obj["subId"] = random.NumLower(16)
  281. clients[i] = obj
  282. mutated = true
  283. }
  284. if !mutated {
  285. continue
  286. }
  287. settings["clients"] = clients
  288. newSettings, err := json.MarshalIndent(settings, "", " ")
  289. if err != nil {
  290. log.Printf("InboundClientSubIdFix: skip inbound %d (marshal failed): %v", inbound.Id, err)
  291. continue
  292. }
  293. if err := tx.Model(&model.Inbound{}).Where("id = ?", inbound.Id).
  294. Update("settings", string(newSettings)).Error; err != nil {
  295. return err
  296. }
  297. }
  298. return tx.Create(&model.HistoryOfSeeders{SeederName: "InboundClientSubIdFix"}).Error
  299. })
  300. }
  301. func normalizeInboundClientsArray() error {
  302. var inbounds []model.Inbound
  303. if err := db.Find(&inbounds).Error; err != nil {
  304. return err
  305. }
  306. return db.Transaction(func(tx *gorm.DB) error {
  307. for _, inbound := range inbounds {
  308. if strings.TrimSpace(inbound.Settings) == "" {
  309. continue
  310. }
  311. var settings map[string]any
  312. if err := json.Unmarshal([]byte(inbound.Settings), &settings); err != nil {
  313. log.Printf("InboundClientsArrayFix: skip inbound %d (invalid settings json): %v", inbound.Id, err)
  314. continue
  315. }
  316. raw, exists := settings["clients"]
  317. if !exists || raw != nil {
  318. continue
  319. }
  320. settings["clients"] = []any{}
  321. newSettings, err := json.MarshalIndent(settings, "", " ")
  322. if err != nil {
  323. log.Printf("InboundClientsArrayFix: skip inbound %d (marshal failed): %v", inbound.Id, err)
  324. continue
  325. }
  326. if err := tx.Model(&model.Inbound{}).Where("id = ?", inbound.Id).
  327. Update("settings", string(newSettings)).Error; err != nil {
  328. return err
  329. }
  330. }
  331. return tx.Create(&model.HistoryOfSeeders{SeederName: "InboundClientsArrayFix"}).Error
  332. })
  333. }
  334. // normalizeClientJSONFields coerces loosely-typed numeric fields in a raw
  335. // settings.clients entry so json.Unmarshal into model.Client doesn't fail
  336. // when older rows wrote tgId/limitIp/totalGB/etc. as strings. Empty strings
  337. // drop the key so the field falls back to its zero value.
  338. func normalizeClientJSONFields(obj map[string]any) {
  339. normalizeInt := func(key string) {
  340. raw, exists := obj[key]
  341. if !exists {
  342. return
  343. }
  344. s, ok := raw.(string)
  345. if !ok {
  346. return
  347. }
  348. trimmed := strings.ReplaceAll(strings.TrimSpace(s), " ", "")
  349. if trimmed == "" {
  350. delete(obj, key)
  351. return
  352. }
  353. if n, err := strconv.ParseInt(trimmed, 10, 64); err == nil {
  354. obj[key] = n
  355. } else {
  356. delete(obj, key)
  357. }
  358. }
  359. for _, k := range []string{"tgId", "limitIp", "totalGB", "expiryTime", "reset", "created_at", "updated_at"} {
  360. normalizeInt(k)
  361. }
  362. }
  363. func seedClientsFromInboundJSON() error {
  364. var inbounds []model.Inbound
  365. if err := db.Find(&inbounds).Error; err != nil {
  366. return err
  367. }
  368. return db.Transaction(func(tx *gorm.DB) error {
  369. byEmail := map[string]*model.ClientRecord{}
  370. var existing []model.ClientRecord
  371. if err := tx.Find(&existing).Error; err != nil {
  372. return err
  373. }
  374. for i := range existing {
  375. byEmail[existing[i].Email] = &existing[i]
  376. }
  377. for _, inbound := range inbounds {
  378. if strings.TrimSpace(inbound.Settings) == "" {
  379. continue
  380. }
  381. var settings map[string]any
  382. if err := json.Unmarshal([]byte(inbound.Settings), &settings); err != nil {
  383. log.Printf("ClientsTable seed: skip inbound %d (invalid settings json): %v", inbound.Id, err)
  384. continue
  385. }
  386. rawList, ok := settings["clients"].([]any)
  387. if !ok {
  388. continue
  389. }
  390. for _, raw := range rawList {
  391. obj, ok := raw.(map[string]any)
  392. if !ok {
  393. continue
  394. }
  395. normalizeClientJSONFields(obj)
  396. blob, err := json.Marshal(obj)
  397. if err != nil {
  398. continue
  399. }
  400. var c model.Client
  401. if err := json.Unmarshal(blob, &c); err != nil {
  402. log.Printf("ClientsTable seed: skip client in inbound %d (unmarshal failed): %v; payload=%s",
  403. inbound.Id, err, string(blob))
  404. continue
  405. }
  406. email := strings.TrimSpace(c.Email)
  407. if email == "" {
  408. continue
  409. }
  410. incoming := c.ToRecord()
  411. row, dup := byEmail[email]
  412. if !dup {
  413. if err := tx.Create(incoming).Error; err != nil {
  414. return err
  415. }
  416. byEmail[email] = incoming
  417. row = incoming
  418. } else {
  419. conflicts := model.MergeClientRecord(row, incoming)
  420. for _, x := range conflicts {
  421. log.Printf("client merge: email=%s conflict on %s old=%v new=%v kept=%v",
  422. email, x.Field, x.Old, x.New, x.Kept)
  423. }
  424. if err := tx.Save(row).Error; err != nil {
  425. return err
  426. }
  427. }
  428. link := model.ClientInbound{
  429. ClientId: row.Id,
  430. InboundId: inbound.Id,
  431. FlowOverride: c.Flow,
  432. }
  433. if err := tx.Where("client_id = ? AND inbound_id = ?", row.Id, inbound.Id).
  434. FirstOrCreate(&link).Error; err != nil {
  435. return err
  436. }
  437. }
  438. }
  439. return tx.Create(&model.HistoryOfSeeders{SeederName: "ClientsTable"}).Error
  440. })
  441. }
  442. // seedApiTokens copies the legacy `apiToken` setting into the new
  443. // api_tokens table as a row named "default" so existing central panels
  444. // keep working after the upgrade. Idempotent — records itself in
  445. // history_of_seeders and only runs when api_tokens is empty.
  446. func seedApiTokens() error {
  447. empty, err := isTableEmpty("api_tokens")
  448. if err != nil {
  449. return err
  450. }
  451. if empty {
  452. var legacy model.Setting
  453. err := db.Model(model.Setting{}).Where("key = ?", "apiToken").First(&legacy).Error
  454. if err == nil && legacy.Value != "" {
  455. row := &model.ApiToken{
  456. Name: "default",
  457. Token: legacy.Value,
  458. Enabled: true,
  459. }
  460. if err := db.Create(row).Error; err != nil {
  461. log.Printf("Error migrating legacy apiToken: %v", err)
  462. return err
  463. }
  464. }
  465. }
  466. return db.Create(&model.HistoryOfSeeders{SeederName: "ApiTokensTable"}).Error
  467. }
  468. // isTableEmpty returns true if the named table contains zero rows.
  469. func isTableEmpty(tableName string) (bool, error) {
  470. var count int64
  471. err := db.Table(tableName).Count(&count).Error
  472. return count == 0, err
  473. }
  474. // InitDB sets up the database connection, migrates models, and runs seeders.
  475. // When XUI_DB_TYPE=postgres, dbPath is ignored and XUI_DB_DSN is used instead.
  476. func InitDB(dbPath string) error {
  477. var gormLogger logger.Interface
  478. if config.IsDebug() {
  479. gormLogger = logger.New(
  480. log.New(os.Stdout, "\r\n", log.LstdFlags),
  481. logger.Config{
  482. SlowThreshold: time.Second,
  483. LogLevel: logger.Info,
  484. IgnoreRecordNotFoundError: true,
  485. Colorful: true,
  486. },
  487. )
  488. } else {
  489. gormLogger = logger.Discard
  490. }
  491. c := &gorm.Config{Logger: gormLogger}
  492. var err error
  493. switch config.GetDBKind() {
  494. case "postgres":
  495. dsn := config.GetDBDSN()
  496. if dsn == "" {
  497. return errors.New("XUI_DB_TYPE=postgres but XUI_DB_DSN is empty")
  498. }
  499. db, err = gorm.Open(postgres.Open(dsn), c)
  500. if err != nil {
  501. return err
  502. }
  503. default:
  504. dir := path.Dir(dbPath)
  505. if err = os.MkdirAll(dir, 0755); err != nil {
  506. return err
  507. }
  508. dsn := dbPath + "?_journal_mode=WAL&_busy_timeout=10000&_synchronous=NORMAL&_txlock=immediate"
  509. db, err = gorm.Open(sqlite.Open(dsn), c)
  510. if err != nil {
  511. return err
  512. }
  513. sqlDB, err := db.DB()
  514. if err != nil {
  515. return err
  516. }
  517. if _, err := sqlDB.Exec("PRAGMA journal_mode=WAL"); err != nil {
  518. return err
  519. }
  520. if _, err := sqlDB.Exec("PRAGMA busy_timeout=10000"); err != nil {
  521. return err
  522. }
  523. if _, err := sqlDB.Exec("PRAGMA synchronous=NORMAL"); err != nil {
  524. return err
  525. }
  526. }
  527. sqlDB, err := db.DB()
  528. if err != nil {
  529. return err
  530. }
  531. var maxOpen, maxIdle int
  532. switch config.GetDBKind() {
  533. case "postgres":
  534. maxOpen = envInt("XUI_DB_MAX_OPEN_CONNS", 25)
  535. maxIdle = envInt("XUI_DB_MAX_IDLE_CONNS", 25)
  536. default:
  537. maxOpen = envInt("XUI_DB_MAX_OPEN_CONNS", 8)
  538. maxIdle = envInt("XUI_DB_MAX_IDLE_CONNS", 4)
  539. }
  540. sqlDB.SetMaxOpenConns(maxOpen)
  541. sqlDB.SetMaxIdleConns(maxIdle)
  542. sqlDB.SetConnMaxLifetime(time.Hour)
  543. sqlDB.SetConnMaxIdleTime(30 * time.Minute)
  544. if err := initModels(); err != nil {
  545. return err
  546. }
  547. isUsersEmpty, err := isTableEmpty("users")
  548. if err != nil {
  549. return err
  550. }
  551. if err := initUser(); err != nil {
  552. return err
  553. }
  554. return runSeeders(isUsersEmpty)
  555. }
  556. func envInt(key string, def int) int {
  557. v := strings.TrimSpace(os.Getenv(key))
  558. if v == "" {
  559. return def
  560. }
  561. n, err := strconv.Atoi(v)
  562. if err != nil || n <= 0 {
  563. return def
  564. }
  565. return n
  566. }
  567. // CloseDB closes the database connection if it exists.
  568. func CloseDB() error {
  569. if db != nil {
  570. sqlDB, err := db.DB()
  571. if err != nil {
  572. return err
  573. }
  574. return sqlDB.Close()
  575. }
  576. return nil
  577. }
  578. // GetDB returns the global GORM database instance.
  579. func GetDB() *gorm.DB {
  580. return db
  581. }
  582. func IsNotFound(err error) bool {
  583. return errors.Is(err, gorm.ErrRecordNotFound)
  584. }
  585. // IsSQLiteDB checks if the given file is a valid SQLite database by reading its signature.
  586. func IsSQLiteDB(file io.ReaderAt) (bool, error) {
  587. signature := []byte("SQLite format 3\x00")
  588. buf := make([]byte, len(signature))
  589. _, err := file.ReadAt(buf, 0)
  590. if err != nil {
  591. return false, err
  592. }
  593. return bytes.Equal(buf, signature), nil
  594. }
  595. // Checkpoint performs a WAL checkpoint on the SQLite database to ensure data consistency.
  596. // No-op on PostgreSQL (WAL there is managed by the server).
  597. func Checkpoint() error {
  598. if IsPostgres() {
  599. return nil
  600. }
  601. return db.Exec("PRAGMA wal_checkpoint;").Error
  602. }
  603. // ValidateSQLiteDB opens the provided sqlite DB path with a throw-away connection
  604. // and runs a PRAGMA integrity_check to ensure the file is structurally sound.
  605. // It does not mutate global state or run migrations.
  606. func ValidateSQLiteDB(dbPath string) error {
  607. if _, err := os.Stat(dbPath); err != nil { // file must exist
  608. return err
  609. }
  610. gdb, err := gorm.Open(sqlite.Open(dbPath), &gorm.Config{Logger: logger.Discard})
  611. if err != nil {
  612. return err
  613. }
  614. sqlDB, err := gdb.DB()
  615. if err != nil {
  616. return err
  617. }
  618. defer sqlDB.Close()
  619. var res string
  620. if err := gdb.Raw("PRAGMA integrity_check;").Scan(&res).Error; err != nil {
  621. return err
  622. }
  623. if res != "ok" {
  624. return errors.New("sqlite integrity check failed: " + res)
  625. }
  626. return nil
  627. }