Ver Fonte

【综合】解决冲突

tangchao há 3 meses atrás
pai
commit
aa7556dc3a
91 ficheiros alterados com 149 adições e 12769 exclusões
  1. 1 6
      PDF Office/PDF Master DMG/AppDelegate.swift
  2. 1 6
      PDF Office/PDF Master Pro/AppDelegate.swift
  3. 11 83
      PDF Office/PDF Master/AppDelegate.swift
  4. 1 11
      PDF Office/PDF Master/Class/ChromiumTabs/KMBrowserWindowController.swift
  5. 6 36
      PDF Office/PDF Master/Class/ChromiumTabs/KMToolbarRightView.swift
  6. 43 0
      PDF Office/PDF Master/Class/Common/Category/NSString+KMExtension.swift
  7. 2 69
      PDF Office/PDF Master/Class/Document/KMMainDocument.swift
  8. 0 109
      PDF Office/PDF Master/Class/KMLightMember/Cache/KMLightMemberCache.swift
  9. 0 42
      PDF Office/PDF Master/Class/KMLightMember/Controller/AccountException/KMAccountExceptionWindowController.swift
  10. 0 43
      PDF Office/PDF Master/Class/KMLightMember/Controller/AccountException/KMAccountExceptionWindowController.xib
  11. 0 101
      PDF Office/PDF Master/Class/KMLightMember/Controller/AccountException/View/KMAccountExceptionView.swift
  12. 0 132
      PDF Office/PDF Master/Class/KMLightMember/Controller/AccountException/View/KMAccountExceptionView.xib
  13. 0 213
      PDF Office/PDF Master/Class/KMLightMember/Controller/AccountInfo/KMAccountInfoWindowController.swift
  14. 0 47
      PDF Office/PDF Master/Class/KMLightMember/Controller/AccountInfo/KMAccountInfoWindowController.xib
  15. 0 308
      PDF Office/PDF Master/Class/KMLightMember/Controller/AccountInfo/View/KMAccountInfoView.swift
  16. 0 289
      PDF Office/PDF Master/Class/KMLightMember/Controller/AccountInfo/View/KMAccountInfoView.xib
  17. 0 50
      PDF Office/PDF Master/Class/KMLightMember/Controller/Cancellation/KMCancellationWindowController.swift
  18. 0 42
      PDF Office/PDF Master/Class/KMLightMember/Controller/Cancellation/KMCancellationWindowController.xib
  19. 0 73
      PDF Office/PDF Master/Class/KMLightMember/Controller/Cancellation/View/KMCancellationSuccessView.swift
  20. 0 133
      PDF Office/PDF Master/Class/KMLightMember/Controller/Cancellation/View/KMCancellationSuccessView.xib
  21. 0 284
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/KMComparativeTableViewController.swift
  22. 0 43
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/KMComparativeTableViewController.xib
  23. 0 193
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/KMComparativeOutlineView.swift
  24. 0 170
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/KMComparativeOutlineView.xib
  25. 0 46
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/Manager/KMComparativeManager.swift
  26. 0 44
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/Model/KMComparativeModel.swift
  27. 0 116
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/View/KMComparativeOutlineCell.swift
  28. 0 146
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/View/KMComparativeOutlineCell.xib
  29. 0 117
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/View/KMComparativeOutlineRowView.swift
  30. 0 83
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/View/KMComparativeOutlineSectionCell.swift
  31. 0 59
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/View/KMComparativeOutlineSectionCell.xib
  32. 0 117
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeTableView.swift
  33. 0 194
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeTableView.xib
  34. 0 314
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/KMComparativeView.swift
  35. 0 248
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/KMComparativeView.xib
  36. 0 31
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/View/KMComparativeGradientView.swift
  37. 0 274
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/View/KMComparativeViewCollectionItem.swift
  38. 0 169
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/View/KMComparativeViewCollectionItem.xib
  39. 0 52
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/View/KMComparativeViewCollectionItemItem.swift
  40. 0 49
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/View/KMComparativeViewCollectionItemItem.xib
  41. 0 396
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/KMLoginWindowController.swift
  42. 0 113
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/KMLoginWindowController.xib
  43. 0 178
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/Presenter/KMRegisterPresenter.swift
  44. 0 50
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLightNoNetworkView.swift
  45. 0 63
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLightNoNetworkView.xib
  46. 0 265
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginInputPasswordView.swift
  47. 0 233
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginInputPasswordView.xib
  48. 0 86
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginLeftImageView.swift
  49. 0 98
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginLeftImageView.xib
  50. 0 301
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginView.swift
  51. 0 224
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginView.xib
  52. 0 145
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterSuccessView.swift
  53. 0 201
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterSuccessView.xib
  54. 0 330
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterView.swift
  55. 0 299
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterView.xib
  56. 0 305
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMResetPasswordView.swift
  57. 0 235
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMResetPasswordView.xib
  58. 0 81
      PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/SubscribeSuccess/KMSubscribeSuccessWindowController.swift
  59. 0 45
      PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/SubscribeSuccess/KMSubscribeSuccessWindowController.xib
  60. 0 51
      PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/SubscribeSuccess/View/KMSubscribeSuccessView.swift
  61. 0 77
      PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/SubscribeSuccess/View/KMSubscribeSuccessView.xib
  62. 0 307
      PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/KMSubscribeWaterMarkWindowController.swift
  63. 0 47
      PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/KMSubscribeWaterMarkWindowController.xib
  64. 0 53
      PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkCollectionItem.swift
  65. 0 68
      PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkCollectionItem.xib
  66. 0 276
      PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkView.swift
  67. 0 238
      PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkView.xib
  68. 0 130
      PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/KMVerficationCodeWindowController.swift
  69. 0 51
      PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/KMVerficationCodeWindowController.xib
  70. 0 93
      PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/View/KMLightMemberAlertView.swift
  71. 0 63
      PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/View/KMLightMemberAlertView.xib
  72. 0 490
      PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/View/KMVerificationCodeView.swift
  73. 0 318
      PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/View/KMVerificationCodeView.xib
  74. 2 3
      PDF Office/PDF Master/Class/KMLightMember/InAppPurchase/Appstore/KMInAppPurchaseManager.swift
  75. 3 36
      PDF Office/PDF Master/Class/KMLightMember/InAppPurchase/DMG/KMDMGPurchaseManager.swift
  76. 2 26
      PDF Office/PDF Master/Class/KMLightMember/InAppPurchase/KMPurchaseManager.swift
  77. 0 285
      PDF Office/PDF Master/Class/KMLightMember/Manager/KMLightMemberManager.swift
  78. 4 678
      PDF Office/PDF Master/Class/KMLightMember/Manager/KMRequestServerManager.swift
  79. 0 69
      PDF Office/PDF Master/Class/KMLightMember/Model/KMLightMemberToken.swift
  80. 0 211
      PDF Office/PDF Master/Class/KMLightMember/Model/KMLightMemberUserInfo.swift
  81. 0 77
      PDF Office/PDF Master/Class/KMLightMember/Tools/Alert/KMPurchaseAlertView.swift
  82. 0 64
      PDF Office/PDF Master/Class/KMLightMember/Tools/Alert/KMPurchaseAlertView.xib
  83. 3 24
      PDF Office/PDF Master/Class/PDFTools/Compress/Controller/KMCompressWindowController.swift
  84. 40 0
      PDF Office/PDF Master/Class/PDFTools/EditPDF/Tools/KMEditPDfHanddler.swift
  85. 6 49
      PDF Office/PDF Master/Class/PDFTools/Merge/OCPart/KMPDFEditAppendWindow.m
  86. 1 8
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift
  87. 2 2
      PDF Office/PDF Master/Class/Preference/Tools/KMPreferenceManager.swift
  88. 5 24
      PDF Office/PDF Master/Class/Welcome/KMWelcomeWindowController.swift
  89. 1 2
      PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift
  90. 0 759
      PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj
  91. 15 0
      PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

+ 1 - 6
PDF Office/PDF Master DMG/AppDelegate.swift

@@ -40,12 +40,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
 extension AppDelegate : NSMenuDelegate,NSMenuItemValidation {
     func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
         let action = menuItem.action
-        if action == #selector(manageAcctounMenuAction) {
-            return KMLightMemberManager.manager.isLogin()
-        }
-        if action == #selector(loginMenuItemAction) {
-            return !KMLightMemberManager.manager.isLogin()
-        }
+       
         return true
     }
 }

+ 1 - 6
PDF Office/PDF Master Pro/AppDelegate.swift

@@ -42,12 +42,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
 extension AppDelegate : NSMenuDelegate,NSMenuItemValidation {
     func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
         let action = menuItem.action
-        if action == #selector(manageAcctounMenuAction) {
-            return KMLightMemberManager.manager.isLogin()
-        }
-        if action == #selector(loginMenuItemAction) {
-            return !KMLightMemberManager.manager.isLogin()
-        }
+         
         return true
     }
 }

+ 11 - 83
PDF Office/PDF Master/AppDelegate.swift

@@ -262,39 +262,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
             #if VERSION_DMG
             // 执行相应的操作
             if url.scheme == "subscriptiondmgschemes" {
-                if urlString.contains("open=expired") {
-                    KMPrint("刷新用户信息")
-                    if !KMLightMemberManager.manager.isLogin() && NSApp.mainWindow != nil {
-                        _ = KMLoginWindowController.show(window: NSApp.mainWindow!)
-                    } else {
-                        if NSApp.mainWindow != nil && KMLightMemberManager.manager.isLogin() {
-                            _ = KMAccountInfoWindowController.show(window: NSApp.mainWindow!)
-                        }
-                    }
-                } else if urlString.contains("open=success") {
-                    if !KMLightMemberManager.manager.isLogin() && NSApp.mainWindow != nil {
-                        _ = KMLoginWindowController.show(window: NSApp.mainWindow!)
-                    } else {
-                        KMPurchaseManager.manager.restorePurchases { isSuccess, error  in
-                            if isSuccess {
-                                
-                            } else {
-                                KMComparativeTableViewController.purchasefailed(view: NSApp.mainWindow?.contentView, state: error)
-                            }
-                        }
-                    }
-                }
+                
             }
             #endif
 
             #if VERSION_FREE
             // 执行相应的操作
             if url.scheme == "subscriptionSchemes" {
-                //刷新用户信息
-                KMRequestServerManager.manager.getUserInfo { success, data, error, isLocal in
-
-                }
-                
+              
                 if url.path == "/open" {
                     // 执行打开操作
                 } else if url.path == "/close" {
@@ -552,10 +527,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
 #endif
         if let items = PDFOfficeMenu?.items {
             for menu in items {
-                let ranges = menu.title.ranges(of: "PDF Reader Pro")
-                if let _range = ranges.range.first {
-                    menu.title.replaceSubrange(_range, with: KMTools.getAppName())
-                }
+                 
             }
         }
         if let item = PDFOfficeMenu?.item(withTitle: NSLocalizedString("Volume Discount", comment: "")) {
@@ -629,29 +601,15 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
     }
     
     @objc @IBAction func manageAcctounMenuAction(_ sender: Any) {
-        if KMLightMemberManager.manager.isLogin() {
-            _ = KMAccountInfoWindowController.show(window: NSApp.mainWindow!)
-        }
+         
     }
     
     @IBAction func loginMenuItemAction(_ sender: Any) {
-        // Login & Logout
-        if KMLightMemberManager.manager.isLogin() {
-            
-        } else {
-            _ = KMLoginWindowController.show(window: NSApp.mainWindow!)
-        }
+        
     }
     
     @IBAction func logoutMenuItemAction(_ sender: Any) {
-        // Login & Logout
-        if KMLightMemberManager.manager.isLogin() {
-            KMRequestServerManager.manager.logout { success, result in
-                if success {
-                    KMPrint("登出成功")
-                }
-            }
-        }
+        
     }
     
     @IBAction func restoreMenuItemAction(_ sender: Any) {
@@ -660,16 +618,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
                 
             } else {
                 if error != .restoreSuccess {
-                    KMComparativeTableViewController.purchasefailed(view: NSApp.mainWindow?.contentView, state: error)
-                }
+                 }
             }
         }
     }
     
     @objc func accountRefreshAction() {
-        KMLightMemberManager.manager.updateNetworkingUserInfo { isDidLogout in
-            
-        }
+       
+        
     }
     
     @objc func showAccount() {
@@ -854,19 +810,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
 extension AppDelegate : NSMenuDelegate,NSMenuItemValidation {
     func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
         let action = menuItem.action
-        if action == #selector(manageAcctounMenuAction) {
-            self.updateLoginMenuItem()
-            return KMLightMemberManager.manager.isLogin()
-        }
-        if action == #selector(loginMenuItemAction) {
-            self.updateLoginMenuItem()
-            return !KMLightMemberManager.manager.isLogin()
-        }
-
-        if action == #selector(logoutMenuItemAction) {
-            self.updateLoginMenuItem()
-            return KMLightMemberManager.manager.isLogin()
-        }
+         
         
         if (action == #selector(sharePageItemAction)) {
             guard let _windowC = NSApp.mainWindow?.windowController as? KMBrowserWindowController else {
@@ -901,24 +845,8 @@ extension AppDelegate : NSMenuDelegate,NSMenuItemValidation {
             let item2 = firstItem?.item(withTag: 12)
             let item3 = firstItem?.item(withTag: 13)
             let item4 = firstItem?.item(withTag: 14)
-//            let item5 = firstItem?.item(withTag: 15)
             let item6 = firstItem?.item(withTag: kKMMainMenuAccountRefreshItemTag)
-//            if KMLightMemberManager.manager.isLogin() {
-//                item1?.title = KMLightMemberManager.manager.info.email
-//                item1?.isHidden = false
-//                item2?.isHidden = true
-//                item3?.isHidden = false
-//                item4?.isHidden = false
-////                item5?.isHidden = false
-//                item6?.isHidden = false
-//            } else {
-//                item1?.isHidden = true
-//                item2?.isHidden = false
-//                item3?.isHidden = true
-//                item4?.isHidden = true
-////                item5?.isHidden = true
-//                item6?.isHidden = true
-//            }
+
             item1?.isHidden = true
             item2?.isHidden = true
             item3?.isHidden = true

+ 1 - 11
PDF Office/PDF Master/Class/ChromiumTabs/KMBrowserWindowController.swift

@@ -531,17 +531,7 @@ extension KMBrowserWindowController: KMToolbarRightViewDelegate {
     }
     
     func userInfoButtonAction(_ sender: NSButton) {
-        if KMLightMemberManager.manager.isLogin() {
-            Task { @MainActor in
-                if await KMLightMemberManager.manager.canUseAdvanced(needNetworking: true) {
-                    KMAccountInfoWindowController.show(window: self.window!)
-                } else {
-                    KMLoginWindowController.show(window: self.window!)
-                }
-            }
-        } else {
-            KMLoginWindowController.show(window: self.window!)
-        }
+         
     }
     
     func homeRefreshButtonAction(_ sender: NSButton?) {

+ 6 - 36
PDF Office/PDF Master/Class/ChromiumTabs/KMToolbarRightView.swift

@@ -53,8 +53,7 @@ import Cocoa
     }
     
     @objc func updateView() -> Void {
-//        KMLightMemberManager.manager.canShowAdvancedView &&
-        if canShowAdvanced() {
+         if canShowAdvanced() {
             if self.advancedLabel != nil {
                 self.advancedContentView.isHidden = false
                 self.advancedViewRightConstraint.constant = 8.0
@@ -62,9 +61,7 @@ import Cocoa
                 self.advancedLabel.textColor = NSColor.km_init(hex: "#FFFFFF")
                 
                 var advancedString = NSLocalizedString("Upgrade", comment: "")
-//                if KMLightMemberManager.manager.purchaseState == .trial {
-//                    advancedString = NSLocalizedString("Trialling", comment: "")
-//                }
+ 
                 self.advancedLabel.stringValue = advancedString
             }
         } else {
@@ -75,42 +72,17 @@ import Cocoa
         }
         
         if self.userInfoButton != nil {
-            if KMLightMemberManager.manager.info.email.count != 0 {
-                self.userInfoButton.backgroundColor(NSColor.km_init(hex: "#1770F4"))
-                self.userInfoButton.font = NSFont.SFProTextSemiboldFont(14.0)
-                self.userInfoButton.contentTintColor = NSColor.km_init(hex: "#FFFFFF")
-                self.userInfoButton.border(NSColor.km_init(hex: "#1770F4"), 1, 12)
-                self.userInfoButton.title = KMLightMemberManager.manager.info.email.substring(to: 1)
-                self.userInfoButton.image = nil
-            } else {
-                self.userInfoButton.image = NSImage(named: "Icon_other_avatar_false")
-                self.userInfoButton.title = ""
-                self.userInfoButton.border(NSColor.km_init(hex: "#1770F4"), 0, 12)
-                self.userInfoButton.backgroundColor(NSColor.clear)
-            }
+             
         }
     }
     
     func canShowAdvanced() -> Bool {
-        #if VERSION_FREE
-        return (
-            //KMLightMemberManager.manager.isLogin() &&
-             (KMLightMemberManager.manager.purchaseState != .subscription &&
-              KMLightMemberManager.manager.purchaseState != .trial))
-        #else
-        return (!KMLightMemberManager.manager.isLogin() ||
-             (KMLightMemberManager.manager.purchaseState != .subscription &&
-              KMLightMemberManager.manager.purchaseState != .trial))
-        #endif
-        
+       return false
     }
     
     func fetchAdvancedViewSize() -> CGSize {
         var advancedString = NSLocalizedString("Upgrade", comment: "")
-//        if KMLightMemberManager.manager.purchaseState == .trial {
-//            advancedString = NSLocalizedString("Trialling", comment: "")
-//        }
-        
+
         let paragraphStyle = NSMutableParagraphStyle()
         paragraphStyle.lineHeightMultiple = 1.32
         paragraphStyle.alignment = .right
@@ -136,9 +108,7 @@ import Cocoa
     
     func addNotification() {
         self.removeNotification()
-        NotificationCenter.default.addObserver(self, selector: #selector(updateAdvancedContentView), name: NSNotification.Name(rawValue: ADVANCED_NOTIFICATION), object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(updateAdvancedContentView), name: NSNotification.Name(rawValue: USER_INFO_CHANGE_NOTIFICATION), object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(updateAdvancedContentView), name: NSNotification.Name(rawValue: USER_LOGINSTATE_NOTIFICATION), object: nil)
+        
     }
     
     func updateAdvancedContentView() {

+ 43 - 0
PDF Office/PDF Master/Class/Common/Category/NSString+KMExtension.swift

@@ -258,3 +258,46 @@ extension String {
     }
 }
 
+extension String {
+    /// 从字符串中提取数字
+    func getIntFromString() -> String {
+        let scanner = Scanner(string: self)
+        scanner.scanUpToCharacters(from: CharacterSet.decimalDigits, into: nil)
+        var number :Int = 0
+        scanner.scanInt(&number)
+        return String(number)
+        
+    }
+    
+    /// 查找子字符串
+    func ranges(of string: String) -> (range:[Range<String.Index>], nsRnage: [NSRange]) {
+        var rangeArray = [Range<String.Index>]()
+        var nsRangeArray = [NSRange]()
+        var searchedRange: Range<String.Index>
+        guard let sr = self.range(of: self) else {
+            return (rangeArray, nsRangeArray)
+        }
+        searchedRange = sr
+        var resultRange = self.range(of: string, options: .regularExpression, range: searchedRange, locale: nil)
+        while let range = resultRange {
+            rangeArray.append(range)
+            nsRangeArray.append(NSRange(range,in:self))
+            searchedRange = Range(uncheckedBounds: (range.upperBound, searchedRange.upperBound))
+            resultRange = self.range(of: string, options: .regularExpression, range: searchedRange, locale: nil)
+        }
+        return (rangeArray,nsRangeArray)
+    }
+
+    /// range -> NSRange
+    func nsRange(from range: Range<String.Index>) -> NSRange? {
+        
+        let utf16view = self.utf16
+        
+        if let from = range.lowerBound.samePosition(in: utf16view), let to = range.upperBound.samePosition(in: utf16view) {
+            
+            return NSMakeRange(utf16view.distance(from: utf16view.startIndex, to: from), utf16view.distance(from: from, to: to))
+            
+        }
+        return nil
+    }
+}

+ 2 - 69
PDF Office/PDF Master/Class/Document/KMMainDocument.swift

@@ -726,24 +726,13 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
     func trackEvents() {
         km_synchronized(self) {
             for i in self._trackEvents {
-                if let type = KMSubscribeWaterMarkType(rawValue: i) {
-                    KMTools.trackEvent(type: type)
-                }
+               
             }
         }
         
         self.clearTrackEvents()
     }
     
-    func recordTrackEvent(type: KMSubscribeWaterMarkType) {
-        if (type == .none) {
-            return
-        }
-        
-        km_synchronized(self) {
-            self._trackEvents.insert(type.rawValue)
-        }
-    }
     
     func clearTrackEvents() {
         km_synchronized(self) {
@@ -963,63 +952,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
     }
     
     private func _km_saveForWatermark(openAccessoryView: Bool = true, subscribeDidClick: (()->Void)? = nil, callback:@escaping (_ needSave: Bool, _ param: Any...)->Void) {
-        Task { @MainActor in
-            if await (KMLightMemberManager.manager.canPayFunction() == false) {
-                let _ = KMSubscribeWaterMarkWindowController.show(window: NSApp.mainWindow!, isContinue:false, type: .save) {
-                    if let _callback = subscribeDidClick {
-                        _callback()
-                    }
-                } completion: { isSubscribeSuccess, isWaterMarkExport, isClose in
-                    if (isClose) {
-                        callback(false, KMResult.cancel, false)
-                        return
-                    }
-                    
-                    if (isSubscribeSuccess) {
-                        callback(true)
-                        return
-                    }
-                    
-                    if (isWaterMarkExport) {
-                        guard let _document = self.mainViewController?.document else {
-                            callback(false, KMResult.failure)
-                            return
-                        }
-                        // 提交文本编辑的内容
-                        DispatchQueue.main.async {
-                            NSPanel.savePanel(NSApp.mainWindow!, openAccessoryView, panel:{ panel in
-                                if (!self.isNewCreated) {
-                                    panel.directoryURL = _document.documentURL.deletingLastPathComponent()
-                                }
-                                
-                                panel.nameFieldStringValue = _document.documentURL.lastPathComponent
-                            }) { response, url, isOpen in
-                                if (response == .cancel) {
-                                    callback(false, KMResult.cancel, true)
-                                    return
-                                }
-                                guard let _url = KMTools.saveWatermarkDocument(document: _document, to: url!, secureOptions: self.mainViewController?.secureOptions, documentAttribute: self.mainViewController?.documentAttribute,removePWD: self.mainViewController!.removeSecureFlag) else {
-                                    callback(false, KMResult.failure)
-                                    return
-                                }
-                                callback(false, KMResult.success)
-                                if (isOpen) {
-                                    NSDocumentController.shared.km_safe_openDocument(withContentsOf: _url, display: true) { _, _, _ in
-                                        
-                                    }
-                                } else {
-                                    NSWorkspace.shared.activateFileViewerSelecting([_url])
-                                }
-                            }
-                        }
-                        return
-                    }
-                    callback(false, KMResult.cancel, false)
-                }
-                return
-            }
-            callback(true)
-        }
+         
     }
     
     private func _km_save(_ sender: Any?) {

+ 0 - 109
PDF Office/PDF Master/Class/KMLightMember/Cache/KMLightMemberCache.swift

@@ -1,109 +0,0 @@
-//
-//  KMLightMemberCache.swift
-//  KMLightMember
-//
-//  Created by lizhe on 2022/11/25.
-//
-
-enum KMLightMemberCacheType: String {
-    case info = "lightMemberInfoCache.plist"
-    case token = "lightMemberTokenCache.plist"
-}
-
-class KMLightMemberCache: NSObject {
-    let kFilePath: NSString = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first!.path + "KMLightMemberCache" as NSString
-    
-    //单例
-    public static let cache = KMLightMemberCache()
-    //存储
-    func saveData(data: NSDictionary, type: KMLightMemberCacheType = .info) {
-        let string: NSString = (kFilePath as String) + "/" + type.rawValue as NSString
-
-        if (!FileManager.default.fileExists(atPath: string.deletingLastPathComponent as String)) {
-            try?FileManager.default.createDirectory(atPath: string.deletingLastPathComponent as String, withIntermediateDirectories: true, attributes: nil)
-        }
-        
-        if (!FileManager.default.fileExists(atPath: string as String)) {
-            FileManager.default.createFile(atPath: string as String, contents: nil)
-        }
-        
-        //获取有用的参数
-//        let dic: NSMutableDictionary = [:]
-//        for key in data.allKeys {
-//            let object = data.object(forKey: key)
-//            if let subDictionary = object as? [NSDictionary] {
-//
-//            } else if (!(object is NSNull)) {
-//                dic.setObject(object as Any, forKey: key as! NSCopying)
-//            }
-//        }
-        
-//        let dic: [String: Any] = data.allKeys // 待处理的字典数据
-        let result = removeNullValuesFromDictionary(data as! [String : Any])
-        
-//        dic.removeObject(forKey: "subscriptionInfoList")
-        
-        let saveData: NSArray = [result]
-        let success = saveData.write(toFile: string.expandingTildeInPath as String, atomically: true)
-
-        if (success == true) {
-            KMPrint("成功 -" + (string.expandingTildeInPath as String))
-        } else {
-            KMPrint("失败 -" + (string.expandingTildeInPath as String))
-        }
-    }
-
-   //读取
-    func readData( type: KMLightMemberCacheType = .info) -> NSDictionary {
-        let string: NSString = (kFilePath as String) + "/" + type.rawValue as NSString
-        
-        let data =  NSArray.init(contentsOfFile: string.expandingTildeInPath as String)
-        if (data != nil) {
-            return data!.firstObject as! NSDictionary
-        } else {
-            return [:]
-        }
-    }
-    
-    func clean() {
-        if (FileManager.default.fileExists(atPath: kFilePath as String)) {
-            try?FileManager.default.removeItem(atPath: kFilePath as String)
-        }
-    }
-}
-
-extension KMLightMemberCache {
-    /**
-     */
-    func removeNullValuesFromDictionary(_ dictionary: [String: Any]) -> [String: Any] {
-        var result: [String: Any] = [:]
-
-        for (key, value) in dictionary {
-            if let subDictionary = value as? [NSDictionary] {
-                // 子集为数组,则递归遍历子字典并进行处理
-                var array: [Any] = []
-                for item in subDictionary {
-                    let cleanedSubDictionary = removeNullValuesFromDictionary(item as! [String : Any])
-                    array.append(cleanedSubDictionary)
-                }
-                if !array.isEmpty {
-                    result[key] = array
-                }
-            } else if let subDictionary = value as? [String: Any] {
-                // 子集为字典,则递归遍历子字典并进行处理
-                let cleanedSubDictionary = removeNullValuesFromDictionary(subDictionary)
-                if !cleanedSubDictionary.isEmpty {
-                    result[key] = cleanedSubDictionary
-                }
-            } else if !(value is NSNull) {
-                // 子集不为 null,则将键值对添加到结果字典中
-                result[key] = value
-            }
-//            else if (value is NSNull) {
-//                result[key] = ""
-//            }
-        }
-
-        return result
-    }
-}

+ 0 - 42
PDF Office/PDF Master/Class/KMLightMember/Controller/AccountException/KMAccountExceptionWindowController.swift

@@ -1,42 +0,0 @@
-//
-//  KMAccountExceptionWindowController.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/9/4.
-//
-
-import Cocoa
-
-var accountExceptionController: KMAccountExceptionWindowController?
-var accountExceptionMainWindow: NSWindow?
-
-class KMAccountExceptionWindowController: NSWindowController {
-
-    @IBOutlet weak var accountExceptionView: KMAccountExceptionView!
-    override func windowDidLoad() {
-        super.windowDidLoad()
-        self.setup()
-        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-    }
-    
-    //MARK: 打开文件
-    static func show(window: NSWindow) -> KMAccountExceptionWindowController {
-        let controller: KMAccountExceptionWindowController = KMAccountExceptionWindowController.init(windowNibName: "KMAccountExceptionWindowController")
-        window.beginSheet(controller.window!)
-        controller.window?.center()
-        accountExceptionController = controller
-        accountExceptionMainWindow = window
-        return controller
-    }
-    
-    func setup() {
-        self.window?.contentView?.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-        
-        self.accountExceptionView.cancelAction = { view in
-            cancellationMainWindow?.endSheet(view.window!)
-            view.window?.close()
-            accountExceptionMainWindow = nil
-            accountExceptionController = nil
-        }
-    }
-}

+ 0 - 43
PDF Office/PDF Master/Class/KMLightMember/Controller/AccountException/KMAccountExceptionWindowController.xib

@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22154" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22154"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMAccountExceptionWindowController" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="accountExceptionView" destination="JGT-CD-5uD" id="c2Q-ou-2WM"/>
-                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
-            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="400" height="306"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
-            <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="400" height="306"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="JGT-CD-5uD" customClass="KMAccountExceptionView" customModule="PDF_Master" customModuleProvider="target">
-                        <rect key="frame" x="0.0" y="0.0" width="400" height="306"/>
-                    </customView>
-                </subviews>
-                <constraints>
-                    <constraint firstItem="JGT-CD-5uD" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="gGH-Os-LRu"/>
-                    <constraint firstAttribute="trailing" secondItem="JGT-CD-5uD" secondAttribute="trailing" id="hEQ-Gt-oR1"/>
-                    <constraint firstAttribute="bottom" secondItem="JGT-CD-5uD" secondAttribute="bottom" id="hGA-u2-sdM"/>
-                    <constraint firstItem="JGT-CD-5uD" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="kJY-Ex-6yX"/>
-                </constraints>
-            </view>
-            <connections>
-                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
-            </connections>
-            <point key="canvasLocation" x="84" y="212"/>
-        </window>
-    </objects>
-</document>

+ 0 - 101
PDF Office/PDF Master/Class/KMLightMember/Controller/AccountException/View/KMAccountExceptionView.swift

@@ -1,101 +0,0 @@
-//
-//  KMAccountExceptionView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/9/4.
-//
-
-import Cocoa
-
-typealias KMAccountExceptionViewCancelAction = (_ view: KMAccountExceptionView) -> Void
-
-class KMAccountExceptionView: BaseXibView {
-    @IBOutlet var textView: NSTextView!
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var doneButton: NSButton!
-    
-    @IBOutlet weak var closeButton: NSButton!
-    @IBOutlet weak var closeBox: KMBox!
-    
-    
-    var cancelAction: KMAccountExceptionViewCancelAction?
-    
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    func setup() {
-        self.closeBox.moveCallback = { [weak self] (mouseEntered, mouseBox) in
-            if mouseEntered {
-                self?.closeButton?.image = NSImage(named: "control_btn_icon_close_hov")
-            } else {
-                self?.closeButton?.image = NSImage(named: "control_btn_icon_close")
-            }
-        }
-        
-        self.textView.delegate = self
-        self.textView.frame = (self.textView.enclosingScrollView?.contentView.bounds)!
-        self.textView.autoresizingMask = [.width, .height]
-        self.textView.font = NSFont.SFProTextRegularFont(14)
-        
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-        self.titleLabel.font = NSFont.SFProTextSemiboldFont(20)
-        
-        self.doneButton.backgroundColor(NSColor.km_init(hex: "#1770F4"))
-        self.doneButton.contentTintColor = NSColor.km_init(hex: "#FFFFFF")
-        self.doneButton.font = NSFont.SFProTextRegularFont(14)
-        self.doneButton.border(NSColor.clear, 0, 4)
-    }
-    
-    func updateLanguage() {
-        
-        self.titleLabel.stringValue = NSLocalizedString("Account Blocked", comment: "")
-        //singin
-        let string = NSLocalizedString("Your account is currently blocked due to frequent switching, during which you can still use the free basics function normally.To unblock the account, please contact us and provide complaint instructions.", comment: "")
-        let attributedString = NSMutableAttributedString.init(string: string)
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.alignment = .center;
-        paragraphStyle.lineHeightMultiple = 1.32
-        paragraphStyle.lineBreakMode = .byWordWrapping
-        attributedString.addAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(14.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#616469"),
-                                        NSAttributedString.Key.paragraphStyle : paragraphStyle],
-                                    range: NSRange(location: 0, length: string.count))
-
-        let range = string.range(of: NSLocalizedString("contact us", comment: ""))
-        attributedString.setAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(14.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#1770F4"),
-                                        NSAttributedString.Key.underlineColor : NSColor.clear,
-                                        NSAttributedString.Key.link : "timer://"],
-                                       range: string.nsRange(from: range!)!)
-
-        self.textView.textStorage?.setAttributedString(attributedString)
-    }
-    
-    
-    @IBAction func doneAction(_ sender: Any) {
-        guard let callBack = cancelAction else { return }
-        
-        callBack(self)
-    }
-    
-    @IBAction func closeButtonAction(_ sender: Any) {
-        guard let callBack = cancelAction else { return }
-        
-        callBack(self)
-    }
-}
-
-extension KMAccountExceptionView: NSTextViewDelegate {
-    func textView(_ textView: NSTextView, clickedOnLink link: Any, at charIndex: Int) -> Bool {
-        if link as! String == "timer://" {
-//            guard let callBack = reSendAction else { return true }
-//            textView.isSelectable = false
-//            callBack(self, textView)
-            NSWorkspace.shared.open(URL(string: "https://www.pdfreaderpro.com/contact")!)
-        }
-        return true
-    }
-}

+ 0 - 132
PDF Office/PDF Master/Class/KMLightMember/Controller/AccountException/View/KMAccountExceptionView.xib

@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22154" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22154"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMAccountExceptionView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="closeBox" destination="MHN-NE-sQe" id="fDR-eN-Kxf"/>
-                <outlet property="closeButton" destination="hMe-4u-Zx8" id="LAS-Im-b9U"/>
-                <outlet property="doneButton" destination="cBn-Kn-Hsf" id="01W-ln-Z1A"/>
-                <outlet property="textView" destination="bop-ts-OHe" id="6kS-6h-grq"/>
-                <outlet property="titleLabel" destination="Qck-ob-xJt" id="6rk-XN-8cm"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="400" height="306"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="NeX-6e-gus">
-                    <rect key="frame" x="0.0" y="278" width="400" height="28"/>
-                    <subviews>
-                        <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="MHN-NE-sQe" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                            <rect key="frame" x="8" y="8" width="12" height="12"/>
-                            <view key="contentView" id="Pfv-1T-36f">
-                                <rect key="frame" x="0.0" y="0.0" width="12" height="12"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            </view>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="12" id="oIC-Q5-iVH"/>
-                                <constraint firstAttribute="height" constant="12" id="uOe-nL-FQK"/>
-                            </constraints>
-                        </box>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hMe-4u-Zx8">
-                            <rect key="frame" x="8" y="8" width="12" height="12"/>
-                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="control_btn_icon_close" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="TjZ-ax-YbX">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="12" id="bWb-H9-4Fp"/>
-                                <constraint firstAttribute="height" constant="12" id="cof-Ln-xU7"/>
-                            </constraints>
-                            <connections>
-                                <action selector="closeButtonAction:" target="-2" id="uO7-Fu-fzT"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="hMe-4u-Zx8" firstAttribute="leading" secondItem="NeX-6e-gus" secondAttribute="leading" constant="8" id="03x-SY-cRz"/>
-                        <constraint firstItem="hMe-4u-Zx8" firstAttribute="centerY" secondItem="NeX-6e-gus" secondAttribute="centerY" id="7Xb-S4-zJG"/>
-                        <constraint firstItem="MHN-NE-sQe" firstAttribute="leading" secondItem="NeX-6e-gus" secondAttribute="leading" constant="8" id="S7F-GV-PpI"/>
-                        <constraint firstItem="MHN-NE-sQe" firstAttribute="centerY" secondItem="NeX-6e-gus" secondAttribute="centerY" id="ZbC-SM-I2X"/>
-                        <constraint firstAttribute="height" constant="28" id="viF-TB-Gb0"/>
-                    </constraints>
-                </customView>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Qck-ob-xJt">
-                    <rect key="frame" x="141" y="242" width="118" height="16"/>
-                    <textFieldCell key="cell" lineBreakMode="clipping" title="Account Exception" id="THt-xK-kHp">
-                        <font key="font" usesAppearanceFont="YES"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YwU-fS-mY1">
-                    <rect key="frame" x="32" y="116" width="336" height="110"/>
-                    <clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="uDf-Ok-ReC">
-                        <rect key="frame" x="0.0" y="0.0" width="336" height="110"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <textView wantsLayer="YES" editable="NO" drawsBackground="NO" importsGraphics="NO" richText="NO" verticallyResizable="YES" spellingCorrection="YES" smartInsertDelete="YES" id="bop-ts-OHe">
-                                <rect key="frame" x="0.0" y="0.0" width="336" height="110"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                <size key="minSize" width="336" height="110"/>
-                                <size key="maxSize" width="336" height="10000000"/>
-                            </textView>
-                        </subviews>
-                        <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                    </clipView>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="110" id="7ga-du-wYA"/>
-                    </constraints>
-                    <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="MHe-JO-Pvz">
-                        <rect key="frame" x="-100" y="-100" width="225" height="15"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </scroller>
-                    <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="Qvu-i4-J1D">
-                        <rect key="frame" x="-100" y="-100" width="15" height="135"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </scroller>
-                </scrollView>
-                <button translatesAutoresizingMaskIntoConstraints="NO" id="cBn-Kn-Hsf">
-                    <rect key="frame" x="80" y="40" width="240" height="32"/>
-                    <buttonCell key="cell" type="square" title="OK" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="lKb-Su-P0o">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="32" id="PHy-kQ-nMU"/>
-                        <constraint firstAttribute="width" constant="240" id="v6U-H9-69V"/>
-                    </constraints>
-                    <connections>
-                        <action selector="doneAction:" target="-2" id="xoa-YF-sGs"/>
-                    </connections>
-                </button>
-            </subviews>
-            <constraints>
-                <constraint firstAttribute="trailing" secondItem="YwU-fS-mY1" secondAttribute="trailing" constant="32" id="1mY-ea-JBg"/>
-                <constraint firstItem="YwU-fS-mY1" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="7KR-KH-Im8"/>
-                <constraint firstItem="Qck-ob-xJt" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="Cf2-4A-FKT"/>
-                <constraint firstItem="YwU-fS-mY1" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="32" id="EBW-Ib-Whg"/>
-                <constraint firstItem="cBn-Kn-Hsf" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="H9a-oo-U2k"/>
-                <constraint firstAttribute="bottom" secondItem="cBn-Kn-Hsf" secondAttribute="bottom" constant="40" id="IYw-Vt-Nmz"/>
-                <constraint firstAttribute="trailing" secondItem="NeX-6e-gus" secondAttribute="trailing" id="X6U-sv-cue"/>
-                <constraint firstItem="Qck-ob-xJt" firstAttribute="top" secondItem="NeX-6e-gus" secondAttribute="bottom" constant="20" id="aeR-1a-oAA"/>
-                <constraint firstItem="NeX-6e-gus" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="bU8-nA-pSa"/>
-                <constraint firstItem="NeX-6e-gus" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="dCW-lE-T95"/>
-                <constraint firstItem="YwU-fS-mY1" firstAttribute="top" secondItem="Qck-ob-xJt" secondAttribute="bottom" constant="16" id="wNb-bu-cov"/>
-            </constraints>
-            <point key="canvasLocation" x="-12" y="154"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="control_btn_icon_close" width="12" height="12"/>
-    </resources>
-</document>

+ 0 - 213
PDF Office/PDF Master/Class/KMLightMember/Controller/AccountInfo/KMAccountInfoWindowController.swift

@@ -1,213 +0,0 @@
-//
-//  KMAccountInfoWindowController.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/24.
-//
-
-import Cocoa
-
-var accountInfoController: KMAccountInfoWindowController?
-var accountInfoMainWindow: NSWindow?
-
-typealias KMAccountInfoWindowControllerCancellationAction = (_ controller: KMAccountInfoWindowController) -> Void
-class KMAccountInfoWindowController: NSWindowController {
-
-    @IBOutlet weak var accountInfoView: KMAccountInfoView!
-    @IBOutlet weak var accountViewHeightConstraint: NSLayoutConstraint!
-    
-    var inputType: DataNavigationViewButtonActionType?
-    var cancellAtionAction: KMAccountInfoWindowControllerCancellationAction?
-    
-    deinit {
-        KMPrint("KMAccountInfoWindowController 释放")
-    }
-    
-    override func windowDidLoad() {
-        super.windowDidLoad()
-
-        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-        self.setup()
-        self.reloadData()
-    }
-    
-    //MARK: 打开文件
-    static func show(window: NSWindow, _ type: DataNavigationViewButtonActionType = .Batch, _ logType: KMRegisterLogType = .login) -> KMAccountInfoWindowController {
-        if KMAccountInfoWindowController.isSampleController() {
-            return accountInfoController ?? KMAccountInfoWindowController()
-        } else {
-            let controller: KMAccountInfoWindowController = KMAccountInfoWindowController.init(windowNibName: "KMAccountInfoWindowController")
-            controller.inputType = type
-            controller.cancellAtionAction = { controller in
-                let verficationCodeWindowController = KMVerficationCodeWindowController.show(window: controller.window!)
-                verficationCodeWindowController.didCancellation = {
-                    accountInfoMainWindow?.endSheet(controller.window!)
-                    controller.window?.close()
-                    if accountInfoMainWindow != nil {
-                        let cancellationWindowController = KMCancellationWindowController.show(window: accountInfoMainWindow!)
-                    }
-                    
-                    accountInfoController = nil
-                    accountInfoMainWindow = nil
-                }
-            }
-            
-            
-            window.beginSheet(controller.window!)
-            accountInfoController = controller
-            accountInfoMainWindow = window
-            return controller
-        }
-    }
-    
-    static func isSampleController() -> Bool {
-        for window in NSApp.windows {
-            let controller = window.windowController
-            if controller is KMAccountInfoWindowController {
-                return true
-            }
-        }
-        return false
-    }
-    
-    static func fetchSampleController() -> KMAccountInfoWindowController? {
-        for window in NSApp.windows {
-            let controller = window.windowController
-            if controller is KMAccountInfoWindowController {
-                return controller as! KMAccountInfoWindowController
-            }
-        }
-        
-        return nil
-    }
-    
-    func setup() {
-        self.window?.contentView?.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-        
-        self.accountInfoView.closeAction = { view in
-            KMPrint("关闭")
-            accountInfoMainWindow?.endSheet(view.window!)
-            view.window?.close()
-            accountInfoController = nil
-            accountInfoMainWindow = nil
-        }
-        
-        self.accountInfoView.logOutAction = { view in
-            KMPrint("登出")
-            KMRequestServerManager.manager.logout { success, result in
-                if success {
-                    KMPrint("登出成功")
-                }
-            }
-            KMLightMemberManager.manager.logOut()
-            accountInfoMainWindow?.endSheet(view.window!)
-            view.window?.close()
-            accountInfoController = nil
-            accountInfoMainWindow = nil
-        }
-        
-        self.accountInfoView.cancellationAction = { [unowned self] view in
-            KMPrint("注销")
-            
-            if KMLightMemberManager.manager.purchaseState == .subscription ||
-                KMLightMemberManager.manager.purchaseState == .trial {
-                let alert = NSAlert()
-                alert.messageText = NSLocalizedString("Are you sure you want to cancel?", comment: "")
-                alert.informativeText = NSLocalizedString("You are still in the subscription and cannot cancel account. Please click Cancel Account after the subscription period ends.", comment: "")
-                alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
-                alert.beginSheetModal(for: view.window!) { [unowned self] result in
-
-                }
-            } else {
-                let alert = NSAlert()
-                alert.messageText = NSLocalizedString("Are you sure you want to cancel?", comment: "")
-                alert.informativeText = NSLocalizedString("Cancellation cannot be withdrawn, it will be completed within 3 working days, until then your account will be frozen and cannot be logged in, are you sure you want to delete your account?", comment: "")
-                alert.addButton(withTitle: NSLocalizedString("No", comment: ""))
-                alert.addButton(withTitle: NSLocalizedString("Yes", comment: ""))
-                alert.beginSheetModal(for: view.window!) { [unowned self] result in
-                    if (result == .alertFirstButtonReturn) { /// 取消
-                        return
-                    } else if result == .alertSecondButtonReturn {
-                        guard let callBack = cancellAtionAction else { return }
-    //                    accountInfoMainWindow?.endSheet(view.window!)
-    //                    view.window?.close()
-    //                    accountInfoController = nil
-    //                    accountInfoMainWindow = nil
-                        callBack(self)
-                    }
-                    
-                }
-            }
-        }
-        
-        self.accountInfoView.purchaseInfoAction = { view in
-            KMPurchaseManager.manager.showPurchasesInfo()
-        }
-        
-        self.accountInfoView.subcriptionAction = { view in
-#if VERSION_DMG
-            KMPurchaseManager.manager.purchaseProduct(productIdentifier: "") { isSuccess, error in
-                
-            }
-#endif
-            
-#if VERSION_FREE
-            accountInfoMainWindow?.endSheet(view.window!)
-            view.window?.close()
-            accountInfoController = nil
-            accountInfoMainWindow = nil
-            
-            //跳转订阅比较表
-            let _ = KMComparativeTableViewController.show(window: NSApp.mainWindow ?? NSWindow(), .accountInfo)
-#endif
-        }
-    }
-    
-    func reloadData() {
-        let state = KMDMGPurchaseManager.manager.state
-        if state == .unknow {
-            self.accountViewHeightConstraint.constant = 274
-#if VERSION_DMG
-            if KMLightMemberManager.manager.existOrderInfo() {
-                self.accountViewHeightConstraint.constant = 274 + 44
-            }
-#endif
-        } else if state == .subscription ||
-                    state == .trial {
-            self.accountViewHeightConstraint.constant = 411 - 60
-#if VERSION_DMG
-            if KMLightMemberManager.manager.info.subscriptionInfoList[0].payType == 1 {
-                self.accountViewHeightConstraint.constant = 483 - 52 - 20
-            } else {
-                self.accountViewHeightConstraint.constant = 483
-            }
-#endif
-        } else if state == .subscriptionExpired ||
-                    state == .trialExpired {
-            self.accountViewHeightConstraint.constant = 483 - 52
-#if VERSION_DMG
-            self.accountViewHeightConstraint.constant = 483
-#endif
-        }
-        self.accountInfoView.purchaseState = state
-        
-        KMRequestServerManager.manager.getUserInfo { [weak self] success, data, error, isLocal in
-            if success {
-                self?.accountInfoView.userInfo = data
-                KMLightMemberManager.manager.reloadUserInfo()
-            } else {
-                if error?.code == 304 {
-                    DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.3) {
-                        if self?.window != nil {
-                            accountInfoMainWindow?.endSheet((self?.window)!)
-                        }
-                        self?.window?.close()
-                        KMLightMemberManager.manager.logOut()
-                        accountInfoController = nil
-                        accountInfoMainWindow = nil
-                    }
-                }
-            }
-        }
-    }
-}

+ 0 - 47
PDF Office/PDF Master/Class/KMLightMember/Controller/AccountInfo/KMAccountInfoWindowController.xib

@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22146" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22146"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMAccountInfoWindowController" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="accountInfoView" destination="lEJ-0F-5yu" id="Psb-5b-4hM"/>
-                <outlet property="accountViewHeightConstraint" destination="AGy-5K-Lb1" id="cbn-uG-fE2"/>
-                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="F0z-JX-Cv5">
-            <windowStyleMask key="styleMask" titled="YES"/>
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="440" height="483"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
-            <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="440" height="483"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="lEJ-0F-5yu" customClass="KMAccountInfoView" customModule="PDF_Master" customModuleProvider="target">
-                        <rect key="frame" x="0.0" y="0.0" width="440" height="483"/>
-                        <constraints>
-                            <constraint firstAttribute="height" constant="483" id="AGy-5K-Lb1"/>
-                        </constraints>
-                    </customView>
-                </subviews>
-                <constraints>
-                    <constraint firstAttribute="trailing" secondItem="lEJ-0F-5yu" secondAttribute="trailing" id="6oc-Np-dZU"/>
-                    <constraint firstAttribute="bottom" secondItem="lEJ-0F-5yu" secondAttribute="bottom" id="CoK-Qd-hsm"/>
-                    <constraint firstItem="lEJ-0F-5yu" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="tjC-Lj-h6K"/>
-                    <constraint firstItem="lEJ-0F-5yu" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="wOC-QS-0nj"/>
-                </constraints>
-            </view>
-            <connections>
-                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
-            </connections>
-            <point key="canvasLocation" x="-34" y="144"/>
-        </window>
-    </objects>
-</document>

+ 0 - 308
PDF Office/PDF Master/Class/KMLightMember/Controller/AccountInfo/View/KMAccountInfoView.swift

@@ -1,308 +0,0 @@
-//
-//  KMAccountInfoView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/24.
-//
-
-import Cocoa
-
-typealias KMAccountInfoViewCloseAction = (_ view: KMAccountInfoView) -> Void
-typealias KMAccountInfoViewCancellationAction = (_ view: KMAccountInfoView) -> Void
-typealias KMAccountInfoViewLogOutAction = (_ view: KMAccountInfoView) -> Void
-typealias KMAccountInfoViewPurchaseInfoAction = (_ view: KMAccountInfoView) -> Void
-typealias KMAccountInfoViewSubcriptionAction = (_ view: KMAccountInfoView) -> Void
-
-class KMAccountInfoView: BaseXibView {
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var closeButton: NSButton!
-    
-    @IBOutlet weak var infoContentView: NSView!
-    @IBOutlet weak var moreButton: NSButton!
-    @IBOutlet weak var imageViewButton: NSButton!
-    @IBOutlet weak var accountDescribeLabel: NSTextField!
-    @IBOutlet weak var accountLabel: NSTextField!
-    @IBOutlet weak var closeBox: KMBox!
-    @IBOutlet weak var statusTitleLabel: NSTextField!
-    @IBOutlet weak var statusLabel: NSTextField!
-    @IBOutlet weak var tagLabel: NSTextField!
-    @IBOutlet weak var tagContentView: NSView!
-    @IBOutlet weak var statusTimeLabel: NSTextField!
-    @IBOutlet weak var purchaseInfoButton: NSButton!
-    @IBOutlet weak var lineView: NSView!
-    @IBOutlet weak var subscribeButton: NSButton!
-    @IBOutlet weak var statusContentView: NSView!
-    @IBOutlet weak var purchaseInfoContentView: NSView!
-    @IBOutlet weak var subscribeButtonContentView: NSView!
-    
-    
-    @IBOutlet weak var subscriptionInfoContentViewHeightConstraint: NSLayoutConstraint!
-    @IBOutlet weak var subscriptionInfoContentViewTopConstraint: NSLayoutConstraint!
-    @IBOutlet weak var lineViewTopConttraint: NSLayoutConstraint!
-    
-    var closeAction: KMAccountInfoViewCloseAction?
-    var cancellationAction: KMAccountInfoViewCancellationAction?
-    var logOutAction: KMAccountInfoViewLogOutAction?
-    var purchaseInfoAction: KMAccountInfoViewPurchaseInfoAction?
-    var subcriptionAction: KMAccountInfoViewSubcriptionAction?
-
-    var userInfo: KMLightMemberUserInfo? {
-        didSet {
-            self.reloadData()
-        }
-    }
-    
-    var purchaseState: KMPurchaseManagerState = .unknow {
-        didSet {
-            self.reloadData()
-        }
-    }
-    
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    func setup() {
-        
-        self.closeBox.moveCallback = { [weak self] (mouseEntered, mouseBox) in
-            if mouseEntered {
-                self?.closeButton.image = NSImage(named: "control_btn_icon_close_hov")
-            } else {
-                self?.closeButton.image = NSImage(named: "control_btn_icon_close")
-            }
-        }
-    }
-    
-    func updateUI() {
-        
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-        self.titleLabel.font = NSFont.SFProTextSemiboldFont(20.0)
-        
-        self.accountLabel.textColor = NSColor.km_init(hex: "#252629")
-        self.accountLabel.font = NSFont.SFProTextRegularFont(14.0)
-        
-        self.accountDescribeLabel.textColor = NSColor.km_init(hex: "#616469")
-        self.accountDescribeLabel.font = NSFont.SFProTextSemiboldFont(12.0)
-        
-        self.imageViewButton.backgroundColor(NSColor.km_init(hex: "#1770F4"))
-        self.imageViewButton.font = NSFont.SFProTextSemiboldFont(28.0)
-        self.imageViewButton.contentTintColor = NSColor.km_init(hex: "#FFFFFF")
-        self.imageViewButton.border(NSColor.km_init(hex: "#1770F4"), 1, 24)
-        
-        self.infoContentView.backgroundColor(NSColor.km_init(hex: "#F7F8FA"))
-        self.infoContentView.border(NSColor.km_init(hex: "#F7F8FA"), 0, 6)
-        
-        self.purchaseInfoButton.font = NSFont.SFProTextRegularFont(14)
-        self.purchaseInfoButton.contentTintColor = NSColor.km_init(hex: "#1770F4")
-        
-
-        self.statusTitleLabel.textColor = NSColor.km_init(hex: "#616469")
-        self.statusTitleLabel.font = NSFont.SFProTextRegularFont(12.0)
- 
-        self.statusLabel.textColor = NSColor.km_init(hex: "#252629")
-        self.statusLabel.font = NSFont.SFProTextSemiboldFont(16.0)
-        
-        self.statusTimeLabel.textColor = NSColor.km_init(hex: "#616469")
-        self.statusTimeLabel.font = NSFont.SFProTextRegularFont(12.0)
-        
-        self.subscribeButton.contentTintColor = NSColor.km_init(hex: "#FFFFFF")
-        self.subscribeButton.backgroundColor(NSColor.km_init(hex: "#FF852E"))
-        self.subscribeButton.font = NSFont.SFProTextRegularFont(16)
-        self.subscribeButton.border(NSColor.clear, 0, 20)
-        
-        self.tagLabel.font = NSFont.SFProTextRegularFont(12)
-        self.tagLabel.textColor = NSColor.km_init(hex: "#252629")
-        
-        self.tagContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
-        self.tagContentView.backgroundColor(NSColor.km_init(hex: "#F7F8FA"))
-        
-        self.lineView.backgroundColor(NSColor.km_init(hex: "#ECECEC"))
-        self.updateMoreButtonState(select: false)
-    }
-    
-    func reloadData() {
-        
-        if self.userInfo != nil {
-            self.accountLabel.stringValue = userInfo!.email
-            self.imageViewButton.title = userInfo?.email.substring(to: 1) ?? ""
-            
-            if KMLightMemberManager.manager.info.subscriptionInfoList[0].payType == 1 {
-                self.tagContentView.isHidden = false
-            } else {
-                self.tagContentView.isHidden = true
-            }
-        }
-         
-        self.statusTimeLabel.stringValue = ""
-        self.statusLabel.textColor = NSColor.km_init(hex: "#252629")
-        
-        //初始化
-        self.purchaseInfoContentView.isHidden = KMLightMemberManager.manager.existOrderInfo() ? false:true
-        self.subscribeButtonContentView.isHidden = true
-        self.statusContentView.isHidden = true
-        self.subscriptionInfoContentViewHeightConstraint.constant = 74
-        self.subscriptionInfoContentViewTopConstraint.constant = 20
-        self.lineViewTopConttraint.constant = 16
-        self.lineView.isHidden = false
-        
-        if purchaseState == .unknow {
-#if VERSION_DMG
-            self.subscriptionInfoContentViewHeightConstraint.constant = 0
-            self.subscriptionInfoContentViewTopConstraint.constant = 0
-            self.lineViewTopConttraint.constant = 12
-            self.lineView.isHidden = true
-#endif
-        } else if purchaseState == .subscription ||
-                    purchaseState == .trial {
-            self.statusContentView.isHidden = false
-#if VERSION_DMG
-            self.purchaseInfoContentView.isHidden = false
-            if KMLightMemberManager.manager.info.subscriptionInfoList[0].payType == 1 {
-                self.subscribeButtonContentView.isHidden = true
-            } else {
-                self.subscribeButtonContentView.isHidden = false
-            }
-#else
-            self.purchaseInfoContentView.isHidden = true
-#endif
-            self.statusLabel.stringValue = NSLocalizedString("On Subscription", comment: "")
-            if purchaseState == .trial {
-                self.statusLabel.stringValue = NSLocalizedString("On Trial", comment: "")
-            }
-            
-            let dateString = userInfo?.subscriptionInfoList[0].endDate ?? ""
-            self.statusTimeLabel.stringValue = "\(self.fetchDate(dateString: dateString)) \n\(NSLocalizedString("Subscription expire on", comment: ""))"
-        } else if purchaseState == .subscriptionExpired ||
-                    purchaseState == .trialExpired {
-            self.statusContentView.isHidden = false
-            self.subscribeButtonContentView.isHidden = false
-            
-#if VERSION_DMG
-            self.purchaseInfoContentView.isHidden = false
-#else
-            self.purchaseInfoContentView.isHidden = true
-#endif
-            self.statusLabel.stringValue = NSLocalizedString("Expired", comment: "")
-            self.statusLabel.textColor = NSColor.km_init(hex: "#F3465B")
-            
-            let dateString = userInfo?.subscriptionInfoList[0].endDate ?? ""
-            self.statusTimeLabel.stringValue = "\(self.fetchDate(dateString: dateString)) \n\(NSLocalizedString("Subscription expire on", comment: ""))"
-        }
-        
-        if self.userInfo != nil {
-            if KMLightMemberManager.manager.info.subscriptionInfoList[0].payType == 1 {
-                let dateString = userInfo?.subscriptionInfoList[0].endDate ?? ""
-                self.statusTimeLabel.stringValue = "\(self.fetchDate(dateString: dateString))\n\(NSLocalizedString("Subscription renewal date", comment: ""))"
-            }
-        }
-        
-        self.updateLanguage()
-    }
-    
-    func updateLanguage() {
-        
-        self.purchaseInfoButton.title = NSLocalizedString("Order Information", comment: "")
-        
-        self.tagLabel.stringValue = NSLocalizedString("Auto-renewal", comment: "")
-        self.statusTitleLabel.stringValue = NSLocalizedString("Status", comment: "")
-        self.accountDescribeLabel.stringValue = NSLocalizedString("Email Address", comment: "")
-        self.titleLabel.stringValue = NSLocalizedString("Account Information", comment: "")
-        
-//        self.logOutButton.stringValue = NSLocalizedString("Log Out", comment: "")
-        
-        let timeString = self.statusTimeLabel.stringValue
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.lineHeightMultiple = 1.32
-        paragraphStyle.alignment = .right
-        self.statusTimeLabel.attributedStringValue = NSMutableAttributedString(string: NSLocalizedString(timeString, comment: ""), attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle])
-        
-        let paragraphStyle2 = NSMutableParagraphStyle()
-        paragraphStyle2.lineHeightMultiple = 1.32
-        paragraphStyle2.alignment = .left
-        self.statusLabel.attributedStringValue = NSMutableAttributedString(string: NSLocalizedString(self.statusLabel.stringValue, comment: ""), attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle2])
-    }
-    
-    func fetchDate(dateString: String) -> String {
-        let dateFormatter = DateFormatter()
-        dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
-
-        let date = dateFormatter.date(from: dateString)
-        let targetDateFormatter = DateFormatter()
-        targetDateFormatter.dateFormat = "yyyy-MM-dd"
-        let formattedDate = targetDateFormatter.string(from: date ?? NSDate() as Date)
-        KMPrint(formattedDate) // 输出:2024-06-28
-        return formattedDate
-    }
-}
-
-extension KMAccountInfoView {
-    func updateMoreButtonState(select: Bool) {
-        if select {
-            self.moreButton.backgroundColor(NSColor.km_init(hex: "#CED0D4", alpha: 0.6))
-            self.moreButton.border(NSColor.km_init(hex: "#CED0D4"), 1, 4)
-        } else {
-            self.moreButton.backgroundColor(NSColor.clear)
-            self.moreButton.border(NSColor.km_init(hex: "#CED0D4"), 0, 4)
-        }
-    }
-}
-
-protocol KMAccountInfoViewAction {}
-extension KMAccountInfoView: KMAccountInfoViewAction {
-    @IBAction func closeButtonAction(_ sender: Any) {
-        guard let callBack = closeAction else { return }
-        
-        callBack(self)
-    }
-    
-    
-    @IBAction func moreButtonAction(_ sender: NSButton) {
-        self.updateMoreButtonState(select: true)
-        let vc: KMHomePopViewController = KMHomePopViewController().initWithPopViewDataArr([NSLocalizedString("Log out", comment: ""), NSLocalizedString("Cancel", comment: "")])
-        let createFilePopover: NSPopover = NSPopover.init()
-        createFilePopover.contentViewController = vc
-        createFilePopover.delegate = self
-        createFilePopover.animates = true
-        createFilePopover.behavior = .semitransient
-        createFilePopover.setValue(true, forKey: "shouldHideAnchor")
-        createFilePopover.show(relativeTo: CGRect(x: sender.bounds.origin.x, y: 10, width: sender.bounds.size.width, height: sender.bounds.size.height), of: sender, preferredEdge: .maxY)
-        
-//        vc.customBoxWidthLayoutConstraint.constant = sender.frame.width
-        vc.downCallback = { [unowned self] (downEntered: Bool, count: String) -> Void in
-            if downEntered {
-                if count == NSLocalizedString("Cancel", comment: "") {
-                    createFilePopover.close()
-                    
-                    guard let callBack = self.cancellationAction else { return }
-                    
-                    callBack(self)
-                } else if count == "Log out" {
-                    guard let callBack = logOutAction else { return }
-                    
-                    callBack(self)
-                }
-            }
-        }
-    }
-    
-    @IBAction func purchaseButtonAction(_ sender: Any) {
-        guard let callBack = purchaseInfoAction else { return }
-        
-        callBack(self)
-    }
-    
-    @IBAction func subcriptionButtonAction(_ sender: Any) {
-        guard let callBack = subcriptionAction else { return }
-        
-        callBack(self)
-    }
-    
-}
-
-extension KMAccountInfoView: NSPopoverDelegate {
-    func popoverWillClose(_ notification: Notification) {
-        self.updateMoreButtonState(select: false)
-    }
-}

+ 0 - 289
PDF Office/PDF Master/Class/KMLightMember/Controller/AccountInfo/View/KMAccountInfoView.xib

@@ -1,289 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22146" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22146"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMAccountInfoView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="accountDescribeLabel" destination="xZx-LL-ESd" id="OdG-eF-d4T"/>
-                <outlet property="accountLabel" destination="RBL-0P-CFH" id="y2h-N0-OGa"/>
-                <outlet property="closeBox" destination="fOd-XX-43K" id="zmz-yX-PWU"/>
-                <outlet property="closeButton" destination="Amy-OB-Mza" id="9R5-gn-vVI"/>
-                <outlet property="imageViewButton" destination="8gX-ju-NH5" id="zaq-tO-ADt"/>
-                <outlet property="infoContentView" destination="FM4-aP-xFU" id="UOr-fX-6Zg"/>
-                <outlet property="lineView" destination="WMg-Cr-JJr" id="qD5-Ls-DrK"/>
-                <outlet property="lineViewTopConttraint" destination="bqD-h1-usB" id="ypZ-iC-U8W"/>
-                <outlet property="moreButton" destination="t75-lC-90r" id="xu0-vh-wtQ"/>
-                <outlet property="purchaseInfoButton" destination="5PX-6O-xK8" id="nmu-lh-qmx"/>
-                <outlet property="purchaseInfoContentView" destination="ftd-cD-kBx" id="wju-0o-2fa"/>
-                <outlet property="statusContentView" destination="9AV-k7-nob" id="q6D-7t-UXt"/>
-                <outlet property="statusLabel" destination="xqM-Bi-zV4" id="KSF-S7-R3G"/>
-                <outlet property="statusTimeLabel" destination="hNa-H6-poH" id="b5k-1e-jIY"/>
-                <outlet property="statusTitleLabel" destination="QSv-Q9-wi2" id="pcQ-1L-Zjt"/>
-                <outlet property="subscribeButton" destination="6uz-0m-698" id="Dlq-ns-XT2"/>
-                <outlet property="subscribeButtonContentView" destination="l6v-gx-NaZ" id="LUP-wd-tnT"/>
-                <outlet property="subscriptionInfoContentViewHeightConstraint" destination="Wjw-0L-dSz" id="J19-WH-UaH"/>
-                <outlet property="subscriptionInfoContentViewTopConstraint" destination="a4h-ok-qKR" id="v5X-2X-B9a"/>
-                <outlet property="tagContentView" destination="ABe-Ge-8Kf" id="3Fp-U5-gMV"/>
-                <outlet property="tagLabel" destination="dUy-Xz-Fsv" id="C28-5w-9yP"/>
-                <outlet property="titleLabel" destination="wzN-5h-FkM" id="e2e-2a-3Lx"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="440" height="483"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="fOd-XX-43K" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                    <rect key="frame" x="8" y="461" width="12" height="12"/>
-                    <view key="contentView" id="Qwz-rh-8Tv">
-                        <rect key="frame" x="0.0" y="0.0" width="12" height="12"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                    </view>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="12" id="54z-76-XYi"/>
-                        <constraint firstAttribute="width" constant="12" id="fAj-Qy-Axf"/>
-                    </constraints>
-                </box>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Amy-OB-Mza">
-                    <rect key="frame" x="8" y="461" width="12" height="12"/>
-                    <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="control_btn_icon_close" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="c3n-rh-CpG">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="12" id="JMt-xb-LqK"/>
-                        <constraint firstAttribute="height" constant="12" id="c7Q-qR-TGj"/>
-                    </constraints>
-                    <connections>
-                        <action selector="closeButtonAction:" target="-2" id="U1Z-rX-5eH"/>
-                    </connections>
-                </button>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wzN-5h-FkM">
-                    <rect key="frame" x="129" y="415" width="183" height="28"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="28" id="hwe-Db-IjI"/>
-                    </constraints>
-                    <textFieldCell key="cell" lineBreakMode="clipping" title="Account Information" id="MI1-Oq-p89">
-                        <font key="font" metaFont="system" size="20"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ftd-cD-kBx">
-                    <rect key="frame" x="24" y="100" width="392" height="22"/>
-                    <subviews>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5PX-6O-xK8">
-                            <rect key="frame" x="0.0" y="0.0" width="112" height="22"/>
-                            <buttonCell key="cell" type="square" title="Order Information" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="cYo-gl-9pO">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="purchaseButtonAction:" target="-2" id="KvK-9w-bTt"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="5PX-6O-xK8" firstAttribute="leading" secondItem="ftd-cD-kBx" secondAttribute="leading" id="0HA-BH-wlA"/>
-                        <constraint firstAttribute="bottom" secondItem="5PX-6O-xK8" secondAttribute="bottom" id="3gG-4L-shl"/>
-                        <constraint firstItem="5PX-6O-xK8" firstAttribute="top" secondItem="ftd-cD-kBx" secondAttribute="top" id="Jmf-r0-526"/>
-                        <constraint firstAttribute="height" constant="22" id="Jxy-9d-amZ"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="l6v-gx-NaZ">
-                    <rect key="frame" x="24" y="32" width="392" height="40"/>
-                    <subviews>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6uz-0m-698">
-                            <rect key="frame" x="96" y="0.0" width="200" height="40"/>
-                            <buttonCell key="cell" type="square" title="Subscribe" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="iF3-pV-hyc">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="40" id="Mpa-mF-kKW"/>
-                                <constraint firstAttribute="width" constant="200" id="aft-Eg-IK7"/>
-                            </constraints>
-                            <connections>
-                                <action selector="subcriptionButtonAction:" target="-2" id="OIO-bS-649"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="6uz-0m-698" firstAttribute="centerY" secondItem="l6v-gx-NaZ" secondAttribute="centerY" id="257-3D-YoF"/>
-                        <constraint firstItem="6uz-0m-698" firstAttribute="centerX" secondItem="l6v-gx-NaZ" secondAttribute="centerX" id="l8x-EU-8W2"/>
-                        <constraint firstAttribute="height" constant="40" id="yMx-ST-IO5"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="WMg-Cr-JJr">
-                    <rect key="frame" x="24" y="130" width="392" height="1"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="1" id="0iA-OZ-Odp"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="9AV-k7-nob">
-                    <rect key="frame" x="24" y="147" width="392" height="74"/>
-                    <subviews>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="QSv-Q9-wi2">
-                            <rect key="frame" x="-2" y="58" width="43" height="16"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" title="Status" id="SA6-LW-oSg">
-                                <font key="font" usesAppearanceFont="YES"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="1pg-8T-wNz">
-                            <rect key="frame" x="0.0" y="0.0" width="392" height="50"/>
-                            <subviews>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xqM-Bi-zV4">
-                                    <rect key="frame" x="-2" y="17" width="102" height="16"/>
-                                    <textFieldCell key="cell" title="On Subscription" id="crp-kV-aMk">
-                                        <font key="font" usesAppearanceFont="YES"/>
-                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hNa-H6-poH">
-                                    <rect key="frame" x="315" y="9" width="79" height="32"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="right" id="bqx-Sm-ykO">
-                                        <font key="font" usesAppearanceFont="YES"/>
-                                        <string key="title">2023/01/25
-Trial expires</string>
-                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="ABe-Ge-8Kf">
-                                    <rect key="frame" x="106" y="15" width="107" height="20"/>
-                                    <subviews>
-                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dUy-Xz-Fsv">
-                                            <rect key="frame" x="3" y="2" width="101" height="16"/>
-                                            <textFieldCell key="cell" lineBreakMode="clipping" title="  Auto-renewal  " id="NKq-uS-TUg">
-                                                <font key="font" metaFont="system"/>
-                                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                            </textFieldCell>
-                                        </textField>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="20" id="1eC-Ga-7L7"/>
-                                        <constraint firstAttribute="width" secondItem="dUy-Xz-Fsv" secondAttribute="width" multiplier="1.1" id="WaV-Hg-Mwv"/>
-                                        <constraint firstItem="dUy-Xz-Fsv" firstAttribute="centerY" secondItem="ABe-Ge-8Kf" secondAttribute="centerY" id="edK-lC-TYV"/>
-                                        <constraint firstItem="dUy-Xz-Fsv" firstAttribute="centerX" secondItem="ABe-Ge-8Kf" secondAttribute="centerX" id="vpa-Ik-yop"/>
-                                    </constraints>
-                                </customView>
-                            </subviews>
-                            <constraints>
-                                <constraint firstItem="xqM-Bi-zV4" firstAttribute="centerY" secondItem="1pg-8T-wNz" secondAttribute="centerY" id="1Uu-r0-Q04"/>
-                                <constraint firstItem="ABe-Ge-8Kf" firstAttribute="centerY" secondItem="xqM-Bi-zV4" secondAttribute="centerY" id="3JP-mc-W3l"/>
-                                <constraint firstItem="xqM-Bi-zV4" firstAttribute="leading" secondItem="1pg-8T-wNz" secondAttribute="leading" id="F3R-oN-U5B"/>
-                                <constraint firstItem="ABe-Ge-8Kf" firstAttribute="leading" secondItem="xqM-Bi-zV4" secondAttribute="trailing" constant="8" id="SSj-pe-e3T"/>
-                                <constraint firstItem="hNa-H6-poH" firstAttribute="centerY" secondItem="1pg-8T-wNz" secondAttribute="centerY" id="WLL-Zz-HhA"/>
-                                <constraint firstAttribute="trailing" secondItem="hNa-H6-poH" secondAttribute="trailing" id="jGS-Qa-jZA"/>
-                            </constraints>
-                        </customView>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="QSv-Q9-wi2" firstAttribute="leading" secondItem="9AV-k7-nob" secondAttribute="leading" id="0Gz-5s-KmR"/>
-                        <constraint firstItem="1pg-8T-wNz" firstAttribute="leading" secondItem="9AV-k7-nob" secondAttribute="leading" id="H0g-jS-eT5"/>
-                        <constraint firstAttribute="height" constant="74" id="Wjw-0L-dSz"/>
-                        <constraint firstItem="1pg-8T-wNz" firstAttribute="top" secondItem="QSv-Q9-wi2" secondAttribute="bottom" constant="8" id="eoz-w9-hTi"/>
-                        <constraint firstAttribute="trailing" secondItem="1pg-8T-wNz" secondAttribute="trailing" id="fOK-4o-iPs"/>
-                        <constraint firstAttribute="bottom" secondItem="1pg-8T-wNz" secondAttribute="bottom" id="sGh-ug-YvR"/>
-                        <constraint firstItem="QSv-Q9-wi2" firstAttribute="top" secondItem="9AV-k7-nob" secondAttribute="top" id="ut7-vG-uwU"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="FM4-aP-xFU">
-                    <rect key="frame" x="24" y="241" width="392" height="158"/>
-                    <subviews>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="t75-lC-90r">
-                            <rect key="frame" x="360" y="126" width="24" height="24"/>
-                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="icon_btn_more" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="9Nf-kJ-lvd">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="24" id="fan-42-fAl"/>
-                                <constraint firstAttribute="height" constant="24" id="hFQ-nv-2SB"/>
-                            </constraints>
-                            <connections>
-                                <action selector="moreButtonAction:" target="-2" id="bTi-kP-MP3"/>
-                            </connections>
-                        </button>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8gX-ju-NH5">
-                            <rect key="frame" x="172" y="86" width="48" height="48"/>
-                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="wRw-DB-pSM">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="48" id="4Re-q3-7cZ"/>
-                                <constraint firstAttribute="width" constant="48" id="Ssr-id-8TX"/>
-                            </constraints>
-                        </button>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xZx-LL-ESd">
-                            <rect key="frame" x="148" y="53" width="96" height="17"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" title="Email Address" id="XBY-1W-x0h">
-                                <font key="font" metaFont="system" size="14"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RBL-0P-CFH">
-                            <rect key="frame" x="105" y="20" width="182" height="17"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" title="pdfoffice@kdanmobile.com" id="jfQ-Wh-ayi">
-                                <font key="font" metaFont="system" size="14"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                    </subviews>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="158" id="0lq-B5-Tez"/>
-                        <constraint firstItem="xZx-LL-ESd" firstAttribute="top" secondItem="8gX-ju-NH5" secondAttribute="bottom" constant="16" id="ERt-u6-VYw"/>
-                        <constraint firstItem="RBL-0P-CFH" firstAttribute="centerX" secondItem="FM4-aP-xFU" secondAttribute="centerX" id="RZg-yb-gjj"/>
-                        <constraint firstItem="8gX-ju-NH5" firstAttribute="top" secondItem="FM4-aP-xFU" secondAttribute="top" constant="24" id="VSC-8e-MWQ"/>
-                        <constraint firstAttribute="bottom" secondItem="RBL-0P-CFH" secondAttribute="bottom" constant="20" id="ajF-YF-BFf"/>
-                        <constraint firstItem="8gX-ju-NH5" firstAttribute="centerX" secondItem="FM4-aP-xFU" secondAttribute="centerX" id="g0Q-JS-crg"/>
-                        <constraint firstItem="xZx-LL-ESd" firstAttribute="centerX" secondItem="FM4-aP-xFU" secondAttribute="centerX" id="gqp-ht-R0Y"/>
-                        <constraint firstItem="t75-lC-90r" firstAttribute="top" secondItem="FM4-aP-xFU" secondAttribute="top" constant="8" id="nbD-nU-ucy"/>
-                        <constraint firstAttribute="trailing" secondItem="t75-lC-90r" secondAttribute="trailing" constant="8" id="oRO-91-kmx"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstAttribute="trailing" secondItem="l6v-gx-NaZ" secondAttribute="trailing" constant="24" id="67o-Fl-jBi"/>
-                <constraint firstAttribute="bottom" secondItem="l6v-gx-NaZ" secondAttribute="bottom" constant="32" id="GDb-5f-iw6"/>
-                <constraint firstItem="wzN-5h-FkM" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="40" id="P6g-Wv-Jeq"/>
-                <constraint firstItem="WMg-Cr-JJr" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="24" id="QcH-kl-ozy"/>
-                <constraint firstItem="Amy-OB-Mza" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="10" id="Sws-1x-SeB"/>
-                <constraint firstItem="FM4-aP-xFU" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="24" id="Ulr-Yh-Bjz"/>
-                <constraint firstItem="fOd-XX-43K" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="8" id="Y25-7v-CD2"/>
-                <constraint firstAttribute="trailing" secondItem="FM4-aP-xFU" secondAttribute="trailing" constant="24" id="YCA-vu-F7q"/>
-                <constraint firstItem="9AV-k7-nob" firstAttribute="top" secondItem="FM4-aP-xFU" secondAttribute="bottom" constant="20" id="a4h-ok-qKR"/>
-                <constraint firstItem="WMg-Cr-JJr" firstAttribute="top" secondItem="9AV-k7-nob" secondAttribute="bottom" constant="16" id="bqD-h1-usB"/>
-                <constraint firstItem="fOd-XX-43K" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="10" id="cgn-Ff-hUb"/>
-                <constraint firstAttribute="trailing" secondItem="ftd-cD-kBx" secondAttribute="trailing" constant="24" id="dgo-ts-hpg"/>
-                <constraint firstItem="9AV-k7-nob" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="24" id="eEC-5I-s11"/>
-                <constraint firstAttribute="trailing" secondItem="9AV-k7-nob" secondAttribute="trailing" constant="24" id="fuE-Zj-fwG"/>
-                <constraint firstItem="FM4-aP-xFU" firstAttribute="top" secondItem="wzN-5h-FkM" secondAttribute="bottom" constant="16" id="hU4-Uz-s5G"/>
-                <constraint firstItem="ftd-cD-kBx" firstAttribute="top" secondItem="WMg-Cr-JJr" secondAttribute="bottom" constant="8" id="inP-k0-adN"/>
-                <constraint firstItem="l6v-gx-NaZ" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="24" id="kIo-BU-E5u"/>
-                <constraint firstItem="ftd-cD-kBx" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="24" id="knm-gJ-U7h"/>
-                <constraint firstItem="Amy-OB-Mza" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="8" id="tep-pD-Lcj"/>
-                <constraint firstAttribute="trailing" secondItem="WMg-Cr-JJr" secondAttribute="trailing" constant="24" id="uay-Qa-HfL"/>
-                <constraint firstItem="wzN-5h-FkM" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="vvq-pC-WW8"/>
-                <constraint firstItem="WMg-Cr-JJr" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="yft-jJ-E3y"/>
-            </constraints>
-            <point key="canvasLocation" x="18" y="225.5"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="control_btn_icon_close" width="12" height="12"/>
-        <image name="icon_btn_more" width="16" height="16"/>
-    </resources>
-</document>

+ 0 - 50
PDF Office/PDF Master/Class/KMLightMember/Controller/Cancellation/KMCancellationWindowController.swift

@@ -1,50 +0,0 @@
-//
-//  KMCancellationWindowController.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/4/20.
-//
-
-import Cocoa
-
-var cancellationController: KMCancellationWindowController?
-var cancellationMainWindow: NSWindow?
-
-class KMCancellationWindowController: NSWindowController {
-    @IBOutlet weak var cancellationSuccessView: KMCancellationSuccessView!
-    
-    deinit {
-        KMPrint("KMCancellationWindowController 释放")
-    }
-    override func windowDidLoad() {
-        super.windowDidLoad()
-
-        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-        self.setup()
-    }
-    
-    //MARK: 打开文件
-    static func show(window: NSWindow) -> KMCancellationWindowController {
-        let controller: KMCancellationWindowController = KMCancellationWindowController.init(windowNibName: "KMCancellationWindowController")
-        window.beginSheet(controller.window!)
-        controller.window?.center()
-        cancellationController = controller
-        cancellationMainWindow = window
-        return controller
-    }
-    
-    func setup() {
-        self.window?.contentView?.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-        
-        self.cancellationSuccessView.cancelAction = { view in
-            cancellationMainWindow?.endSheet(view.window!)
-            view.window?.close()
-            cancellationMainWindow = nil
-            cancellationController = nil
-        }
-    }
-}
-
-extension KMCancellationWindowController {
-    
-}

+ 0 - 42
PDF Office/PDF Master/Class/KMLightMember/Controller/Cancellation/KMCancellationWindowController.xib

@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMCancellationWindowController" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="cancellationSuccessView" destination="bC2-6O-qNO" id="3iN-wt-3PW"/>
-                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="F0z-JX-Cv5">
-            <windowStyleMask key="styleMask" titled="YES"/>
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="319" height="380"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
-            <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="319" height="380"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="bC2-6O-qNO" customClass="KMCancellationSuccessView" customModule="PDF_Master" customModuleProvider="target">
-                        <rect key="frame" x="0.0" y="0.0" width="319" height="380"/>
-                    </customView>
-                </subviews>
-                <constraints>
-                    <constraint firstAttribute="trailing" secondItem="bC2-6O-qNO" secondAttribute="trailing" id="1sy-91-Cgh"/>
-                    <constraint firstAttribute="bottom" secondItem="bC2-6O-qNO" secondAttribute="bottom" id="7Xk-nJ-37Y"/>
-                    <constraint firstItem="bC2-6O-qNO" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="ScW-6E-B8R"/>
-                    <constraint firstItem="bC2-6O-qNO" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="Uhq-vf-bt4"/>
-                </constraints>
-            </view>
-            <connections>
-                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
-            </connections>
-            <point key="canvasLocation" x="58.5" y="196"/>
-        </window>
-    </objects>
-</document>

+ 0 - 73
PDF Office/PDF Master/Class/KMLightMember/Controller/Cancellation/View/KMCancellationSuccessView.swift

@@ -1,73 +0,0 @@
-//
-//  KMCancellationSuccessView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/4/20.
-//
-
-import Cocoa
-
-typealias KMCancellationSuccessViewCancelAction = (_ view: KMCancellationSuccessView) -> Void
-
-class KMCancellationSuccessView: BaseXibView {
-
-    @IBOutlet weak var closeBox: KMBox!
-    @IBOutlet weak var closeButton: NSButton!
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var subTitleLabel: NSTextField!
-    @IBOutlet weak var doneView: NSView!
-    var doneButtonVC: KMDesignButton!
-    
-    var cancelAction: KMCancellationSuccessViewCancelAction?
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    func setup() {
-        
-        self.closeBox.moveCallback = { [weak self] (mouseEntered, mouseBox) in
-            if mouseEntered {
-                self?.closeButton?.image = NSImage(named: "control_btn_icon_close_hov")
-            } else {
-                self?.closeButton?.image = NSImage(named: "control_btn_icon_close")
-            }
-        }
-        
-        self.titleLabel.font = NSFont.SFProTextSemiboldFont(19.0)
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-        
-        self.subTitleLabel.font = NSFont.SFProTextRegularFont(14.0)
-        self.subTitleLabel.textColor = NSColor.km_init(hex: "#616469")
-        self.subTitleLabel.maximumNumberOfLines = 0
-        
-        self.doneButtonVC = KMDesignButton(withType: .Text)
-        self.doneView.addSubview(self.doneButtonVC.view)
-        self.doneButtonVC?.view.frame = self.doneView.bounds
-        self.doneButtonVC.target = self
-        self.doneButtonVC.action = #selector(closeButtonAction)
-        self.doneButtonVC.button(type: .Cta, size: .m)
-        self.doneButtonVC.button.keyEquivalent = KMKeyEquivalent.enter
-        self.doneButtonVC.stringValue = NSLocalizedString("OK", comment: "")
-        self.doneButtonVC.updateUI()
-    }
-        
-    func reloadData() {
-        
-    }
-    
-    func updateLanguage() {
-        self.titleLabel.stringValue = NSLocalizedString("Cancellation Submitted", comment: "")
-        self.subTitleLabel.stringValue = NSLocalizedString("Your account will be canceled within 3 working days and there is no need to submit the application for cancellation again", comment: "")
-        self.doneButtonVC.stringValue = NSLocalizedString("OK", comment: "")
-    }
-}
-
-extension KMCancellationSuccessView {
-    @IBAction func closeButtonAction(_ sender: Any) {
-        guard let callBack = cancelAction else { return }
-        
-        callBack(self)
-    }
-}

+ 0 - 133
PDF Office/PDF Master/Class/KMLightMember/Controller/Cancellation/View/KMCancellationSuccessView.xib

@@ -1,133 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMCancellationSuccessView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="closeBox" destination="Ews-5U-e3e" id="t0c-47-yxx"/>
-                <outlet property="closeButton" destination="Tx7-Ft-LhQ" id="ugb-xT-o47"/>
-                <outlet property="doneView" destination="ICE-z5-M1Q" id="3pB-il-NkF"/>
-                <outlet property="subTitleLabel" destination="iye-TR-Rcu" id="v1G-3q-xS3"/>
-                <outlet property="titleLabel" destination="i1q-1C-cVS" id="gZH-Jx-huE"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="326" height="408"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="M22-FE-Phc">
-                    <rect key="frame" x="48" y="122" width="230" height="238"/>
-                    <subviews>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="v3R-yS-PKg">
-                            <rect key="frame" x="70" y="148" width="90" height="90"/>
-                            <subviews>
-                                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SAP-e1-U1t">
-                                    <rect key="frame" x="0.0" y="0.0" width="90" height="90"/>
-                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="icon_success_tips" id="xEq-G7-TX4"/>
-                                </imageView>
-                            </subviews>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="90" id="XjS-oT-Mty"/>
-                                <constraint firstAttribute="width" constant="90" id="mqp-Wr-uiK"/>
-                            </constraints>
-                        </customView>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="i1q-1C-cVS">
-                            <rect key="frame" x="-2" y="116" width="234" height="16"/>
-                            <textFieldCell key="cell" lineBreakMode="charWrapping" alignment="center" title="Cancellation Submitted" id="62J-pr-O9u">
-                                <font key="font" usesAppearanceFont="YES"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iye-TR-Rcu">
-                            <rect key="frame" x="-2" y="36" width="234" height="64"/>
-                            <textFieldCell key="cell" lineBreakMode="charWrapping" alignment="center" title="Your account will be canceled within 3 working days and there is no need to submit the application for cancellation again" id="eGy-Ov-ABz">
-                                <font key="font" usesAppearanceFont="YES"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="iye-TR-Rcu" firstAttribute="top" secondItem="i1q-1C-cVS" secondAttribute="bottom" constant="16" id="8c4-Ho-aqf"/>
-                        <constraint firstItem="v3R-yS-PKg" firstAttribute="centerX" secondItem="M22-FE-Phc" secondAttribute="centerX" id="Z9v-OB-DWq"/>
-                        <constraint firstAttribute="height" constant="238" id="eYR-le-rcN"/>
-                        <constraint firstAttribute="width" constant="230" id="hec-4J-W5K"/>
-                        <constraint firstAttribute="trailing" secondItem="i1q-1C-cVS" secondAttribute="trailing" id="iib-xz-DN4"/>
-                        <constraint firstItem="iye-TR-Rcu" firstAttribute="centerX" secondItem="M22-FE-Phc" secondAttribute="centerX" id="jYH-Os-t3X"/>
-                        <constraint firstItem="iye-TR-Rcu" firstAttribute="leading" secondItem="M22-FE-Phc" secondAttribute="leading" id="lIZ-xc-68e"/>
-                        <constraint firstItem="i1q-1C-cVS" firstAttribute="top" secondItem="v3R-yS-PKg" secondAttribute="bottom" constant="16" id="ph2-LT-Tum"/>
-                        <constraint firstItem="v3R-yS-PKg" firstAttribute="top" secondItem="M22-FE-Phc" secondAttribute="top" id="qND-ac-gmc"/>
-                        <constraint firstItem="i1q-1C-cVS" firstAttribute="centerX" secondItem="M22-FE-Phc" secondAttribute="centerX" id="rdl-GI-BIU"/>
-                        <constraint firstItem="i1q-1C-cVS" firstAttribute="leading" secondItem="M22-FE-Phc" secondAttribute="leading" id="ucl-5D-jAo"/>
-                        <constraint firstAttribute="trailing" secondItem="iye-TR-Rcu" secondAttribute="trailing" id="vmJ-VK-75G"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="i4O-Wa-FiJ">
-                    <rect key="frame" x="0.0" y="380" width="326" height="28"/>
-                    <subviews>
-                        <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="Ews-5U-e3e" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                            <rect key="frame" x="8" y="8" width="12" height="12"/>
-                            <view key="contentView" id="k6j-Be-QCf">
-                                <rect key="frame" x="0.0" y="0.0" width="12" height="12"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            </view>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="12" id="Q3a-SF-zQB"/>
-                                <constraint firstAttribute="width" constant="12" id="YIj-ZS-wDh"/>
-                            </constraints>
-                        </box>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Tx7-Ft-LhQ">
-                            <rect key="frame" x="8" y="8" width="12" height="12"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="12" id="01y-7H-n7t"/>
-                                <constraint firstAttribute="width" constant="12" id="Ege-Ta-tLC"/>
-                            </constraints>
-                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="control_btn_icon_close" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="jmB-Fp-WOg">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="closeButtonAction:" target="-2" id="4ZL-7U-SRB"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="Tx7-Ft-LhQ" firstAttribute="centerY" secondItem="i4O-Wa-FiJ" secondAttribute="centerY" id="EPh-9t-gTt"/>
-                        <constraint firstItem="Ews-5U-e3e" firstAttribute="leading" secondItem="i4O-Wa-FiJ" secondAttribute="leading" constant="8" id="Y1g-R1-5jT"/>
-                        <constraint firstAttribute="height" constant="28" id="eAM-wW-B3T"/>
-                        <constraint firstItem="Tx7-Ft-LhQ" firstAttribute="leading" secondItem="i4O-Wa-FiJ" secondAttribute="leading" constant="8" id="i6L-Gm-PVw"/>
-                        <constraint firstItem="Ews-5U-e3e" firstAttribute="centerY" secondItem="i4O-Wa-FiJ" secondAttribute="centerY" id="zxu-C4-nb6"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="ICE-z5-M1Q">
-                    <rect key="frame" x="32" y="50" width="262" height="32"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="32" id="36K-gi-LVF"/>
-                        <constraint firstAttribute="width" constant="262" id="CbA-10-CEc"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstItem="M22-FE-Phc" firstAttribute="top" secondItem="i4O-Wa-FiJ" secondAttribute="bottom" constant="20" id="1ig-dk-AXZ"/>
-                <constraint firstItem="ICE-z5-M1Q" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="6fF-3w-lD6"/>
-                <constraint firstAttribute="trailing" secondItem="i4O-Wa-FiJ" secondAttribute="trailing" id="Fqq-ST-fvm"/>
-                <constraint firstItem="M22-FE-Phc" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="Mgj-Un-Tcx"/>
-                <constraint firstItem="i4O-Wa-FiJ" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="Ulf-QH-blD"/>
-                <constraint firstItem="i4O-Wa-FiJ" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="eza-Wo-ze3"/>
-                <constraint firstItem="ICE-z5-M1Q" firstAttribute="top" secondItem="M22-FE-Phc" secondAttribute="bottom" constant="40" id="t3h-Of-pUs"/>
-            </constraints>
-            <point key="canvasLocation" x="132" y="-72"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="control_btn_icon_close" width="12" height="12"/>
-        <image name="icon_success_tips" width="80" height="80"/>
-    </resources>
-</document>

+ 0 - 284
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/KMComparativeTableViewController.swift

@@ -1,284 +0,0 @@
-//
-//  KMComparativeTableViewController.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/24.
-//
-
-import Cocoa
-
-typealias KMComparativeTableViewControllerLoginAction = (_ controller: KMComparativeTableViewController) -> Void
-typealias KMComparativeTableViewControllerSignUpAction = (_ controller: KMComparativeTableViewController) -> Void
-typealias KMComparativeTableViewControllerSubscriptionAction = (_ controller: KMComparativeTableViewController) -> Void
-typealias KMComparativeTableViewControllerRestoreAction = (_ controller: KMComparativeTableViewController) -> Void
-
-var comparativeController: KMComparativeTableViewController?
-var comparativeMainWindow: NSWindow?
-
-@objc enum KMComparativeInputType: Int {
-    case unknown = 0
-    case login = 1 //登录界面
-    case register = 2 //注册界面
-    case resetPassword = 3 //重置密码
-    case verificationCode = 4 //验证码
-    case registerSuccess = 5 //注册成功
-    case loginInputPassword = 6 //登录密码输入
-    case accountInfo = 7 //用户信息
-    case loginSuccess = 8 //用户登录成功
-    case loginCancel = 9 //用户登录成功
-    
-    case compress       = 10         // 压缩
-    case convert        = 11         // 转档
-    case secure         = 12        // 安全
-    case pageEdit       = 13        // 页面编辑
-    case merge          = 14        // 合并
-    case crop           = 15        // 裁切
-    case thumb          = 16        // 缩略图列表
-    case shareFlatten   = 17        // 分享副本
-    //后续添加
-    
-    case upgrade = 18 //升级按钮
-    case equity = 19 //权益弹窗
-}
-
-@objcMembers class KMComparativeTableViewController: NSWindowController {
-
-    @IBOutlet weak var comparativeTableView: KMComparativeTableView!
-    @IBOutlet weak var comparativeView: KMComparativeView!
-    
-    var inputType: KMComparativeInputType?
-    
-    var loginAction: KMComparativeTableViewControllerLoginAction?
-    var signUpAction: KMComparativeTableViewControllerSignUpAction?
-    var subscriptionAction: KMComparativeTableViewControllerSubscriptionAction?
-    var restoreAction: KMComparativeTableViewControllerRestoreAction?
-    
-    deinit {
-        KMPrint("KMComparativeTableViewController 释放")
-    }
-    
-    //MARK: 打开文件
-    /**
-     @abstract 弹出比较表
-     @param window 弹出window
-     @param type 从什么页面跳转到比较表 默认batch
-     */
-    static func show(window: NSWindow, _ type: KMComparativeInputType = .unknown, inputType: KMSubscribeWaterMarkType = .none) -> KMComparativeTableViewController? {
-#if VERSION_DMG
-        if KMLightMemberManager.manager.isLogin() || type == .upgrade {
-            KMPurchaseManager.manager.showStore()
-        } else {
-            KMLoginWindowController.show(window: window)
-        }
-#endif
-        
-#if VERSION_FREE
-        let controller: KMComparativeTableViewController = KMComparativeTableViewController.init(windowNibName: "KMComparativeTableViewController")
-        controller.inputType = type
-
-        controller.loginAction = { controller in
-            comparativeController = nil
-            comparativeMainWindow?.endSheet(controller.window!)
-            comparativeMainWindow = nil
-            controller.close()
-
-            if NSApp.mainWindow != nil {
-                KMLoginWindowController.show(window: NSApp.mainWindow!, .ComparativeTable, .login)
-            }
-        }
-
-        controller.signUpAction = { controller in
-            comparativeController = nil
-            comparativeMainWindow?.endSheet(controller.window!)
-            comparativeMainWindow = nil
-            controller.close()
-
-            if NSApp.mainWindow != nil {
-                KMLoginWindowController.show(window: NSApp.mainWindow!, .ComparativeTable, .register)
-            }
-        }
-        
-        controller.subscriptionAction = { controller in
-            controller.subscribeAction(controller: controller)
-        }
-        
-        controller.restoreAction = { controller in
-            controller.subscribeAction(controller: controller, isRestore:true)
-        }
-        
-        if controller.window != nil {
-            window.beginSheet(controller.window!)
-        }
-
-        comparativeController = controller
-        comparativeMainWindow = window
-        
-        if type == .loginSuccess && KMLightMemberManager.manager.purchaseState != .subscription {
-            controller.subscribeAction(controller: controller)
-        }
-        return controller
-#endif
-        return nil
-    }
-    
-    override func windowDidLoad() {
-        super.windowDidLoad()
-        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-        self.setup()
-        
-        KMPrint("订阅状态:  \(KMInAppPurchaseManager.manager.state)")
-    }
-    
-    func setup() {
-        self.window?.contentView?.backgroundColor(NSColor.km_init(hex: "FFFFFF"))
-        self.comparativeView.closeAction = { view in
-            KMPrint("关闭")
-            comparativeMainWindow?.endSheet(view.window!)
-            view.window?.close()
-            comparativeController = nil
-            comparativeMainWindow = nil
-        }
-        
-        self.comparativeView.signUpAction = { [weak self] view in
-            KMPrint("注册")
-            guard let callBack = self?.signUpAction else { return }
-
-            callBack(self!)
-        }
-
-//        self.comparativeTableView.loginAction = { [weak self] view in
-//            print("登录")
-//            guard let callBack = self?.loginAction else { return }
-//
-//            callBack(self!)
-//        }
-//
-        self.comparativeView.subscriptionAction = { [weak self] view in
-            KMPrint("订阅")
-            guard let callBack = self?.subscriptionAction else { return }
-
-            callBack(self!)
-        }
-
-        self.comparativeView.restoreAction = { [weak self] view in
-            KMPrint("restore订阅")
-            guard let callBack = self?.restoreAction else { return }
-
-            callBack(self!)
-        }
-    }
-    
-    static func isSampleController() -> KMComparativeTableViewController {
-        for window in NSApp.windows {
-            let controller = window.windowController
-            if controller is KMComparativeTableViewController {
-                return controller as! KMComparativeTableViewController
-            }
-        }
-        return KMComparativeTableViewController()
-    }
-    
-    func subscribeAction(controller: KMComparativeTableViewController, isRestore: Bool = false) {
-        //loading
-        controller.comparativeView.beginLoading(backgroundColor: NSColor.black.withAlphaComponent(0.2))
-        if isRestore {
-            KMPurchaseManager.manager.restorePurchases { isSuccess, error in
-                if isSuccess {
-                    comparativeController = nil
-                    comparativeMainWindow?.endSheet(controller.window!)
-                    comparativeMainWindow = nil
-                    controller.close()
-                } else {
-                    if error != .restoreSuccess {
-                        KMComparativeTableViewController.purchasefailed(view: comparativeController?.comparativeView, state: error)
-                    }
-                }
-                controller.comparativeView.endLoading()
-            }
-        } else {
-            KMPurchaseManager.manager.purchaseProduct(productIdentifier: PRODUCT_1) { isSuccess, error in
-                if isSuccess {
-                    KMPrint("订阅成功")
-                    comparativeController = nil
-                    comparativeMainWindow?.endSheet(controller.window!)
-                    controller.close()
-
-                    if comparativeMainWindow != nil {
-                        _ = KMSubscribeSuccessWindowController.show(window: comparativeMainWindow!)
-                        comparativeMainWindow = nil
-                    }
-                } else {
-                    KMComparativeTableViewController.purchasefailed(view: comparativeController?.comparativeView, state: error)
-                }
-                //loading
-                controller.comparativeView.endLoading()
-            }
-        }
-    }
-    
-    static func purchasefailed(view: NSView?, state: KMInAppPurchaseState) {
-        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1, execute: {
-            if let showView = view {
-                KMPurchaseAlertView.show(view: showView, string: state.rawValue)
-            }
-        })
-    }
-    
-    static func purchaseSuccess() {
-        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1, execute: {
-            let alert = NSAlert()
-            alert.messageText = NSLocalizedString("restore success", comment: "")
-            alert.informativeText = NSLocalizedString("", comment: "")
-//            alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
-            alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
-            var window = NSApp.mainWindow
-            if NSApp.mainWindow?.sheets.first != nil {
-                window = NSApp.mainWindow?.sheets.first
-            }
-            if window != nil {
-                alert.beginSheetModal(for: window!) { result in
-                    if (result == .alertFirstButtonReturn) {
-
-                    } else if result == .alertSecondButtonReturn {
-                        return
-                    }
-                }
-            }
-        })
-    }
-    
-    static func loginAlertView() {
-        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1, execute: {
-            let alert = NSAlert()
-            alert.messageText = NSLocalizedString("Please login or register to proceed to the next step", comment: "")
-            alert.informativeText = NSLocalizedString("As a PDF Reader Pro member, you can get unlimited conversion, merge function, AI free use times and other advanced rights.", comment: "")
-//            alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
-            alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
-            var window = NSApp.mainWindow
-            if NSApp.mainWindow?.sheets.first != nil {
-                window = NSApp.mainWindow?.sheets.first
-            }
-            if window != nil {
-                alert.beginSheetModal(for: window!) { result in
-                    if (result == .alertFirstButtonReturn) {
-                        comparativeMainWindow?.endSheet(comparativeController!.window!)
-                        comparativeMainWindow = nil
-                        comparativeController!.close()
-                        comparativeController = nil
-
-                        if NSApp.mainWindow != nil {
-                            var email: String = UserDefaults.standard.value(forKey: "kLoginEmail") as? String ?? ""
-                            if email.count == 0 {
-                                let tempController = KMLoginWindowController.show(window: NSApp.mainWindow!, .ComparativeTable, .register)
-                            } else {
-                                let tempController = KMLoginWindowController.show(window: NSApp.mainWindow!, .ComparativeTable)
-                            }
-                        }
-                    } else if result == .alertSecondButtonReturn {
-                        return
-                    }
-                }
-            }
-        })
-    }
-}

+ 0 - 43
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/KMComparativeTableViewController.xib

@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22146" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22146"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMComparativeTableViewController" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="comparativeView" destination="hxs-Ao-ieK" id="Wgu-UR-72C"/>
-                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
-            <windowStyleMask key="styleMask" titled="YES"/>
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="807" height="659"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
-            <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="807" height="659"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="hxs-Ao-ieK" customClass="KMComparativeView" customModule="PDF_Master" customModuleProvider="target">
-                        <rect key="frame" x="0.0" y="0.0" width="807" height="659"/>
-                    </customView>
-                </subviews>
-                <constraints>
-                    <constraint firstAttribute="bottom" secondItem="hxs-Ao-ieK" secondAttribute="bottom" id="3E0-v6-OGb"/>
-                    <constraint firstAttribute="trailing" secondItem="hxs-Ao-ieK" secondAttribute="trailing" id="AsJ-g3-3jA"/>
-                    <constraint firstItem="hxs-Ao-ieK" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="ipm-qC-f1C"/>
-                    <constraint firstItem="hxs-Ao-ieK" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="k3t-b3-Yh5"/>
-                </constraints>
-            </view>
-            <connections>
-                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
-            </connections>
-            <point key="canvasLocation" x="-609" y="12"/>
-        </window>
-    </objects>
-</document>

+ 0 - 193
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/KMComparativeOutlineView.swift

@@ -1,193 +0,0 @@
-//
-//  KMComparativeOutlineView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/3/22.
-//
-
-import Cocoa
-class KMComparativeOutlineView: BaseXibView {
-    @IBOutlet var titleTextView: NSTextView!
-    @IBOutlet weak var optionTitleLabel: NSTextField!
-    @IBOutlet weak var optionTitleLabel2: NSTextField!
-    @IBOutlet weak var outlineView: KMOutlineView!
-    @IBOutlet weak var scrollView: NSScrollView!
-    
-    var data: KMComparativeModel?
-    
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    func setup() {
-        
-        self.scrollView.backgroundColor(NSColor.km_init(hex: "#F2F9FF"))
-        
-        self.outlineView.delegate = self
-        self.outlineView.dataSource = self
-        self.outlineView.selectionHighlightStyle = NSTableView.SelectionHighlightStyle.none;
-    }
-    
-    func reloadData() {
-        KMComparativeManager.manager.fetchData { [weak self] result in
-            KMPrint(result)
-            if result != nil {
-                self?.data = result
-                self?.outlineView.reloadData()
-                
-                for section in self?.data?.content ?? [] {
-                    section.select = true
-                }
-                self?.outlineView.expandItem(nil, expandChildren: true)
-            }
-        }
-    }
-    
-    func updateUI() {
-        
-        self.optionTitleLabel.textColor = NSColor.km_init(hex: "#616469")
-        self.optionTitleLabel.font = NSFont.SFProTextBoldFont(14.0)
-        
-        self.optionTitleLabel2.textColor = NSColor.km_init(hex: "#616469")
-        self.optionTitleLabel2.font = NSFont.SFProTextBoldFont(14.0)
-    }
-    
-    func updateLanguage() {
-        
-        self.optionTitleLabel.stringValue = NSLocalizedString("Unregistered", comment: "")
-        self.optionTitleLabel2.stringValue = NSLocalizedString("Registered", comment: "")
-        
-        let string = NSLocalizedString("Log in to  Free Use", comment: "")
-        let attributedString = NSMutableAttributedString.init(string: string)
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.alignment = .left
-        attributedString.addAttributes([NSAttributedString.Key.font : NSFont.SFProTextBoldFont(26.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#273C62"),
-                                        NSAttributedString.Key.paragraphStyle : paragraphStyle],
-                                    range: NSRange(location: 0, length: string.count))
-        
-        let range = string.range(of: NSLocalizedString("Free Use", comment: ""))
-        attributedString.setAttributes([NSAttributedString.Key.font : NSFont.SFProTextBoldFont(26.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#1770F4"),
-                                        NSAttributedString.Key.underlineColor : NSColor.clear,
-                                        NSAttributedString.Key.link : "register://"],
-                                       range: string.nsRange(from: range!)!)
-        
-        self.titleTextView.textStorage?.setAttributedString(attributedString)
-    }
-    
-}
-
-//MARK: NSOutlineViewDataSource,NSOutlineViewDelegate
-extension KMComparativeOutlineView : NSOutlineViewDataSource,NSOutlineViewDelegate {
-    func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -> Int {
-        if item is KMComparativeModelSection {
-            let section = item as? KMComparativeModelSection
-            return section!.content?.count ?? 0
-        } else {
-            guard let data = self.data else { return 0 }
-            return data.content?.count ?? 0
-        }
-    }
-    
-    func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -> Any {
-        guard let data = self.data else { return 0 }
-        
-        let section = item as? KMComparativeModelSection
-        if section?.content != nil {
-            if (section?.content!.count)! > index {
-                let modelItem = section?.content?[index] as? KMComparativeModelItem
-                return modelItem as Any
-            }
-        } else {
-            return data.content?[index] as Any
-        }
-        return item as Any
-    }
-    
-    func outlineView(_ outlineView: NSOutlineView, isItemExpandable item: Any) -> Bool {
-        if item is KMComparativeModelItem {
-            return false
-        } else if item is KMComparativeModelSection {
-            let section = item as? KMComparativeModelSection
-            return section!.content?.count ?? 0 > 0
-        }
-        return false
-    }
-    
-    func outlineView(_ outlineView: NSOutlineView, shouldExpandItem item: Any) -> Bool {
-        if let item = item as? KMComparativeModelSection {
-            if !item.select! {
-                item.select = true
-                outlineView.animator().expandItem(item, expandChildren: true)
-                return false
-            }
-        }
-        return true
-    }
-
-    func outlineView(_ outlineView: NSOutlineView, shouldCollapseItem item: Any) -> Bool {
-        if let item = item as? KMComparativeModelSection {
-            if item.select! {
-                item.select = false
-                outlineView.animator().collapseItem(item, collapseChildren: true)
-                return false
-            }
-        }
-        return true
-    }
-    
-    func outlineView(_ outlineView: NSOutlineView, viewFor tableColumn: NSTableColumn?, item: Any) -> NSView? {
-        if item is KMComparativeModelItem {
-            let cell : KMComparativeOutlineCell = KMComparativeOutlineCell.init()
-            cell.model = item as? KMComparativeModelItem
-            return cell
-        } else if item is KMComparativeModelSection {
-            let cell : KMComparativeOutlineSectionCell = KMComparativeOutlineSectionCell.init()
-            cell.model = item as? KMComparativeModelSection
-            return cell
-        }
-        return NSTableCellView()
-    }
-    
-    func outlineView(_ outlineView: NSOutlineView, rowViewForItem item: Any) -> NSTableRowView? {
-        let rowView = KMComparativeOutlineRowView()
-        if item is KMComparativeModelItem {
-            rowView.item = (item as? KMComparativeModelItem)
-        } else if item is KMComparativeModelSection {
-            rowView.section = (item as? KMComparativeModelSection)
-        }
-        rowView.mouseDownCallback = { [weak self] view, event in
-            if rowView.section != nil {
-                let item = outlineView.selectedRowIndexes.first
-                let expanded = outlineView.isItemExpanded(outlineView.item(atRow: outlineView.selectedRow))
-                if expanded {
-                    outlineView.collapseItem(outlineView.item(atRow: outlineView.selectedRow), collapseChildren: true)
-                    rowView.section.select = false
-                    outlineView.reloadItem(outlineView.item(atRow: outlineView.selectedRow))
-                } else {
-                    outlineView.expandItem(outlineView.item(atRow: outlineView.selectedRow), expandChildren: true)
-                    rowView.section.select = true
-                    outlineView.reloadItem(outlineView.item(atRow: outlineView.selectedRow))
-                }
-            }
-        }
-
-        return rowView
-    }
-    
-    func outlineView(_ outlineView: NSOutlineView, heightOfRowByItem item: Any) -> CGFloat {
-        if item is KMComparativeModelItem {
-            return 46
-        } else if item is KMComparativeModelSection {
-            return 30
-        }
-        return 0
-    }
-    
-//    func outlineView(_ outlineView: NSOutlineView, isGroupItem item: Any) -> Bool {
-//        return true
-//    }
-}

+ 0 - 170
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/KMComparativeOutlineView.xib

@@ -1,170 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMComparativeOutlineView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="optionTitleLabel" destination="v3A-gL-7XA" id="1nW-Vc-r0G"/>
-                <outlet property="optionTitleLabel2" destination="1Wx-Ri-paS" id="h5t-tN-Lsg"/>
-                <outlet property="outlineView" destination="Sw7-bL-PDy" id="ei1-sf-m6A"/>
-                <outlet property="scrollView" destination="W8B-CX-tUt" id="goO-Rq-akd"/>
-                <outlet property="titleTextView" destination="IGM-6s-tJt" id="QkL-u9-hQa"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="788" height="473"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <scrollView borderType="none" horizontalLineScroll="17" horizontalPageScroll="10" verticalLineScroll="17" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W8B-CX-tUt">
-                    <rect key="frame" x="0.0" y="0.0" width="788" height="393"/>
-                    <clipView key="contentView" copiesOnScroll="NO" id="Co1-JU-Vbe">
-                        <rect key="frame" x="0.0" y="0.0" width="788" height="393"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="fullWidth" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" viewBased="YES" indentationPerLevel="13" outlineTableColumn="vYw-qT-E7W" id="Sw7-bL-PDy" customClass="KMOutlineView" customModule="PDF_Master" customModuleProvider="target">
-                                <rect key="frame" x="0.0" y="0.0" width="788" height="393"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <size key="intercellSpacing" width="17" height="0.0"/>
-                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                <color key="gridColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                <tableColumns>
-                                    <tableColumn identifier="AutomaticTableColumnIdentifier.0" width="776" minWidth="40" maxWidth="1000" id="vYw-qT-E7W">
-                                        <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
-                                            <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
-                                        </tableHeaderCell>
-                                        <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="mbE-mh-0Su">
-                                            <font key="font" metaFont="system"/>
-                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                        </textFieldCell>
-                                        <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                    </tableColumn>
-                                </tableColumns>
-                            </outlineView>
-                        </subviews>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                    </clipView>
-                    <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="LQh-PX-JDh">
-                        <rect key="frame" x="-100" y="-100" width="356" height="15"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </scroller>
-                    <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="Uxm-vx-1UG">
-                        <rect key="frame" x="-100" y="-100" width="15" height="197"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </scroller>
-                </scrollView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Ghz-qe-Po3">
-                    <rect key="frame" x="0.0" y="393" width="788" height="80"/>
-                    <subviews>
-                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0ia-Gx-eHc">
-                            <rect key="frame" x="0.0" y="0.0" width="788" height="80"/>
-                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="background_comparative_Rectangle" id="1XB-m0-aem"/>
-                        </imageView>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Day-pV-XEE">
-                            <rect key="frame" x="646" y="16" width="126" height="22"/>
-                            <subviews>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1Wx-Ri-paS">
-                                    <rect key="frame" x="28" y="3" width="70" height="16"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Registered" id="tEL-FU-hD1">
-                                        <font key="font" usesAppearanceFont="YES"/>
-                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
-                            </subviews>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="126" id="Dum-E8-M1Y"/>
-                                <constraint firstItem="1Wx-Ri-paS" firstAttribute="centerX" secondItem="Day-pV-XEE" secondAttribute="centerX" id="Fg0-32-WYh"/>
-                                <constraint firstAttribute="height" constant="22" id="Ul6-XK-vzS"/>
-                                <constraint firstItem="1Wx-Ri-paS" firstAttribute="centerY" secondItem="Day-pV-XEE" secondAttribute="centerY" id="ePa-Sf-cQP"/>
-                            </constraints>
-                        </customView>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="IbW-xH-P0o">
-                            <rect key="frame" x="520" y="16" width="126" height="22"/>
-                            <subviews>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="v3A-gL-7XA">
-                                    <rect key="frame" x="22" y="3" width="83" height="16"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Unregistered" id="kIf-38-Jua">
-                                        <font key="font" usesAppearanceFont="YES"/>
-                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
-                            </subviews>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="126" id="IDt-4x-UV9"/>
-                                <constraint firstAttribute="height" constant="22" id="rRe-db-Dnb"/>
-                                <constraint firstItem="v3A-gL-7XA" firstAttribute="centerX" secondItem="IbW-xH-P0o" secondAttribute="centerX" id="t05-nt-Sw1"/>
-                                <constraint firstItem="v3A-gL-7XA" firstAttribute="centerY" secondItem="IbW-xH-P0o" secondAttribute="centerY" id="zNw-4Q-8Aj"/>
-                            </constraints>
-                        </customView>
-                        <scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DtQ-39-p1Z">
-                            <rect key="frame" x="24" y="16" width="472" height="30"/>
-                            <clipView key="contentView" drawsBackground="NO" id="jtP-Il-qZX">
-                                <rect key="frame" x="0.0" y="0.0" width="472" height="30"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <subviews>
-                                    <textView wantsLayer="YES" editable="NO" selectable="NO" drawsBackground="NO" importsGraphics="NO" richText="NO" verticallyResizable="YES" spellingCorrection="YES" smartInsertDelete="YES" id="IGM-6s-tJt">
-                                        <rect key="frame" x="0.0" y="0.0" width="472" height="30"/>
-                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                        <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                        <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                        <size key="minSize" width="472" height="30"/>
-                                        <size key="maxSize" width="472" height="10000000"/>
-                                        <color key="insertionPointColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                    </textView>
-                                </subviews>
-                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                            </clipView>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="30" id="6E9-QN-s0W"/>
-                            </constraints>
-                            <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="VED-6y-UWx">
-                                <rect key="frame" x="-100" y="-100" width="225" height="15"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                            </scroller>
-                            <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="gY8-DJ-ZRB">
-                                <rect key="frame" x="-100" y="-100" width="15" height="28"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                            </scroller>
-                        </scrollView>
-                    </subviews>
-                    <constraints>
-                        <constraint firstAttribute="trailing" secondItem="Day-pV-XEE" secondAttribute="trailing" constant="16" id="357-29-JyF"/>
-                        <constraint firstAttribute="bottom" secondItem="0ia-Gx-eHc" secondAttribute="bottom" id="KPi-Ya-oDe"/>
-                        <constraint firstAttribute="height" constant="80" id="OFV-Kr-oND"/>
-                        <constraint firstItem="Day-pV-XEE" firstAttribute="leading" secondItem="IbW-xH-P0o" secondAttribute="trailing" id="QCP-eT-1ZM"/>
-                        <constraint firstItem="0ia-Gx-eHc" firstAttribute="top" secondItem="Ghz-qe-Po3" secondAttribute="top" id="Va3-Ae-Mc6"/>
-                        <constraint firstAttribute="bottom" secondItem="DtQ-39-p1Z" secondAttribute="bottom" constant="16" id="aTE-Rw-Kmt"/>
-                        <constraint firstItem="DtQ-39-p1Z" firstAttribute="leading" secondItem="Ghz-qe-Po3" secondAttribute="leading" constant="24" id="qOm-Kb-kuG"/>
-                        <constraint firstAttribute="trailing" secondItem="0ia-Gx-eHc" secondAttribute="trailing" id="tcV-RA-VeW"/>
-                        <constraint firstItem="IbW-xH-P0o" firstAttribute="leading" secondItem="DtQ-39-p1Z" secondAttribute="trailing" constant="24" id="uy1-8I-slr"/>
-                        <constraint firstItem="0ia-Gx-eHc" firstAttribute="leading" secondItem="Ghz-qe-Po3" secondAttribute="leading" id="uyH-bw-ugG"/>
-                        <constraint firstAttribute="bottom" secondItem="Day-pV-XEE" secondAttribute="bottom" constant="16" id="wsT-cX-rJM"/>
-                        <constraint firstAttribute="bottom" secondItem="IbW-xH-P0o" secondAttribute="bottom" constant="16" id="yq0-Xn-Nlh"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstAttribute="trailing" secondItem="W8B-CX-tUt" secondAttribute="trailing" id="3hX-NN-MQg"/>
-                <constraint firstItem="W8B-CX-tUt" firstAttribute="top" secondItem="Ghz-qe-Po3" secondAttribute="bottom" id="T6f-o4-smq"/>
-                <constraint firstAttribute="trailing" secondItem="Ghz-qe-Po3" secondAttribute="trailing" id="fhc-fN-zRA"/>
-                <constraint firstAttribute="bottom" secondItem="W8B-CX-tUt" secondAttribute="bottom" id="gQE-rm-laR"/>
-                <constraint firstItem="Ghz-qe-Po3" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="oPl-fE-WGY"/>
-                <constraint firstItem="W8B-CX-tUt" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="obR-lc-vMB"/>
-                <constraint firstItem="Ghz-qe-Po3" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="vzw-Xa-LnD"/>
-            </constraints>
-            <point key="canvasLocation" x="166" y="-227.5"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="background_comparative_Rectangle" width="788" height="80"/>
-    </resources>
-</document>

+ 0 - 46
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/Manager/KMComparativeManager.swift

@@ -1,46 +0,0 @@
-//
-//  KMComparativeManager.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/3/22.
-//
-
-import Cocoa
-
-class KMComparativeManager: NSObject {
-    public static let manager = KMComparativeManager()
-    
-    func fetchData(completion:(_ result: KMComparativeModel) -> Void) {
-        
-        let filePath = Bundle.main.path(forResource: "KMComparative", ofType: "plist")
-        if filePath?.count != 0 {
-            self.parseData(filePath: filePath!) { result in
-                completion(result)
-            }
-        }
-    }
-    
-    public func parseData(filePath: String ,completion:(_ result: KMComparativeModel) -> Void) -> Void {
-        var dictionary = NSDictionary(contentsOfFile: filePath)
-        
-        if(!JSONSerialization.isValidJSONObject(dictionary as Any)) {
-            KMPrint("无法解析出JSONString")
-            return
-        }
-        let data : NSData! = try? JSONSerialization.data(withJSONObject: dictionary as Any, options: []) as NSData?
-        
-        let jsonString: String = (NSString(data: data as Data, encoding: String.Encoding.utf8.rawValue) ?? "") as String
-        let jsonData: Data = jsonString.data(using: .utf8)!
-        
-        let decoder = JSONDecoder()
-        decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "+∞", negativeInfinity: "-∞", nan: "NaN")
-        
-        var comparativeModel: KMComparativeModel
-#if DEBUG
-        comparativeModel = try! decoder.decode(KMComparativeModel.self, from: jsonData)
-#else
-        comparativeModel = try! decoder.decode(KMComparativeModel.self, from: jsonData)
-#endif
-        completion(comparativeModel)
-    }
-}

+ 0 - 44
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/Model/KMComparativeModel.swift

@@ -1,44 +0,0 @@
-//
-//  KMComparativeModel.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/3/22.
-//
-
-import Cocoa
-struct KMComparativeModelOptions: OptionSet, Codable {
-    let rawValue: Int
-    
-    static let none = KMComparativeModelOptions(rawValue: 1 << 0) //无
-    static let unregistered = KMComparativeModelOptions(rawValue: 1 << 1) //未注册
-    static let registered = KMComparativeModelOptions(rawValue: 1 << 2) //注册
-    static let subscribed = KMComparativeModelOptions(rawValue: 1 << 3) //已订阅
-
-    static let all: KMComparativeModelOptions = [.unregistered, .registered]
-}
-
-class KMComparativeModel: NSObject, Codable {
-    var title: String?
-    var subTitle: String?
-    var optionTitle: String?
-    var optionTitle2: String?
-    var content: [KMComparativeModelSection]?
-}
-
-class KMComparativeModelSection: Codable {
-    var title: String?
-    var select: Bool?
-    var content: [KMComparativeModelItem]?
-}
-
-class KMComparativeModelItem: Codable {
-    var title: String?
-    var state: KMComparativeModelOptions?
-    var content: KMComparativeModelItemContent?
-}
-
-class KMComparativeModelItemContent: Codable {
-    var title1: String
-    var title2: String
-    var title3: String
-}

+ 0 - 116
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/View/KMComparativeOutlineCell.swift

@@ -1,116 +0,0 @@
-//
-//  KMComparativeOutlineCell.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/3/22.
-//
-
-import Cocoa
-
-class KMComparativeOutlineCell: NSTableCellView {
-
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet var contentView: NSView!
-    
-    @IBOutlet weak var optionLabel: NSTextField!
-    @IBOutlet weak var optionImage: NSImageView!
-    
-    @IBOutlet weak var optionLabel2: NSTextField!
-    @IBOutlet weak var optionImage2: NSImageView!
-    
-    @IBOutlet weak var optionLabel3: NSTextField!
-    @IBOutlet weak var optionImage3: NSImageView!
-    
-    var model: KMComparativeModelItem? {
-        didSet {
-            self.reloadData()
-        }
-    }
-    // MARK: 初始化
-    override init(frame frameRect: NSRect) {
-        super.init(frame: frameRect)
-        initContentView()
-        setup()
-    }
-    
-    required init?(coder decoder: NSCoder) {
-        super.init(coder: decoder)
-        initContentView()
-        setup()
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-    private func initContentView() {
-        //绑定xib
-        let resource = NSNib(nibNamed: String(describing: self.classForCoder.self),
-                             bundle: Bundle(for: self.classForCoder.self))!
-        resource.instantiate(withOwner: self, topLevelObjects: nil)
-        addSubview(contentView)
-        contentView.translatesAutoresizingMaskIntoConstraints = false
-        NSLayoutConstraint.activate([
-            contentView.topAnchor.constraint(equalTo: topAnchor),
-            contentView.leftAnchor.constraint(equalTo: leftAnchor),
-            contentView.rightAnchor.constraint(equalTo: rightAnchor),
-            contentView.bottomAnchor.constraint(equalTo: bottomAnchor)])
-        contentView.updateConstraintsForSubtreeIfNeeded()
-    }
-    
-    func setup() {
-        
-    }
-    
-    func reloadData() {
-        guard let data = self.model else { return }
-        
-        self.titleLabel.stringValue = data.title ?? ""
-
-        self.optionLabel.stringValue = data.content?.title1 ?? ""
-        self.optionLabel2.stringValue = data.content?.title2 ?? ""
-        self.optionLabel3.stringValue = data.content?.title3 ?? ""
-        
-        self.optionImage.image = NSImage(named: "icon_comparative_fork")
-        self.optionImage2.image = NSImage(named: "icon_comparative_fork")
-        self.optionImage3.image = NSImage(named: "icon_comparative_fork")
-        if data.state!.contains(.unregistered) {
-            let string = self.optionLabel.stringValue
-            if string.count > 0 {
-                self.optionImage.image = NSImage()
-            } else {
-                self.optionImage.image = NSImage(named: "icon_comparative_hook")
-            }
-        } else {
-            self.optionLabel.stringValue = ""
-        }
-        
-        if data.state!.contains(.registered) {
-            let string = self.optionLabel2.stringValue
-            if string.count > 0 {
-                self.optionImage2.image = NSImage()
-            } else {
-                self.optionImage2.image = NSImage(named: "icon_comparative_hook")
-            }
-        } else {
-            self.optionLabel2.stringValue = ""
-        }
-        
-        if data.state!.contains(.subscribed) {
-            let string = self.optionLabel3.stringValue
-            if string.count > 0 {
-                self.optionImage3.image = NSImage()
-            } else {
-                self.optionImage3.image = NSImage(named: "icon_comparative_hook")
-            }
-        } else {
-            self.optionLabel3.stringValue = ""
-        }
-    }
-    
-    func updateUI() {
-        self.titleLabel.textColor = NSColor.km_init(hex: "#000000")
-        self.titleLabel.font = NSFont.SFProTextRegularFont(14.0)
-    }
-    
-    func updateLanguage() {
-        self.reloadData()
-    }
-}

+ 0 - 146
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/View/KMComparativeOutlineCell.xib

@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMComparativeOutlineCell" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="contentView" destination="c22-O7-iKe" id="0Tg-hb-xgN"/>
-                <outlet property="optionImage" destination="lqb-EW-MkO" id="E7M-RC-3fd"/>
-                <outlet property="optionImage2" destination="9Ol-6a-0R8" id="7ta-Kj-CZF"/>
-                <outlet property="optionImage3" destination="t5Q-5X-AdQ" id="wKO-ja-y7F"/>
-                <outlet property="optionLabel" destination="Jzd-Mg-rfa" id="Cbu-n5-TKN"/>
-                <outlet property="optionLabel2" destination="NrT-Ja-To6" id="rG5-1u-6g5"/>
-                <outlet property="optionLabel3" destination="kLh-ev-nDz" id="Jqg-9Q-bDK"/>
-                <outlet property="titleLabel" destination="u22-yU-gpo" id="PfH-Qt-hB3"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="784" height="44"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="u22-yU-gpo">
-                    <rect key="frame" x="6" y="14" width="394" height="16"/>
-                    <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="Oah-fo-Tas">
-                        <font key="font" usesAppearanceFont="YES"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="MZK-3R-AFq">
-                    <rect key="frame" x="532" y="-1" width="126" height="46"/>
-                    <subviews>
-                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9Ol-6a-0R8">
-                            <rect key="frame" x="54" y="14" width="18" height="18"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="18" id="R1W-lN-U8E"/>
-                                <constraint firstAttribute="width" constant="18" id="icm-Nq-anQ"/>
-                            </constraints>
-                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="icon_comparative_hook" id="gbd-gH-Kp4"/>
-                        </imageView>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NrT-Ja-To6">
-                            <rect key="frame" x="6" y="15" width="114" height="16"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Label" id="rII-xy-11h">
-                                <font key="font" metaFont="system"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="NrT-Ja-To6" firstAttribute="centerY" secondItem="MZK-3R-AFq" secondAttribute="centerY" id="2Cq-bn-nzq"/>
-                        <constraint firstItem="NrT-Ja-To6" firstAttribute="centerX" secondItem="MZK-3R-AFq" secondAttribute="centerX" id="GMc-Lt-h21"/>
-                        <constraint firstAttribute="trailing" secondItem="NrT-Ja-To6" secondAttribute="trailing" constant="8" id="UwS-8f-Bvp"/>
-                        <constraint firstAttribute="width" constant="126" id="ajR-e5-BhX"/>
-                        <constraint firstItem="9Ol-6a-0R8" firstAttribute="centerX" secondItem="MZK-3R-AFq" secondAttribute="centerX" id="da5-N1-NcV"/>
-                        <constraint firstAttribute="height" constant="46" id="ec9-Pj-Um8"/>
-                        <constraint firstItem="NrT-Ja-To6" firstAttribute="leading" secondItem="MZK-3R-AFq" secondAttribute="leading" constant="8" id="jpy-mf-XMT"/>
-                        <constraint firstItem="9Ol-6a-0R8" firstAttribute="centerY" secondItem="MZK-3R-AFq" secondAttribute="centerY" id="sXe-Ns-XKE"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Lxu-5r-sY9">
-                    <rect key="frame" x="406" y="-1" width="126" height="46"/>
-                    <subviews>
-                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="lqb-EW-MkO">
-                            <rect key="frame" x="54" y="14" width="18" height="18"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="18" id="iRL-ne-7ym"/>
-                                <constraint firstAttribute="width" constant="18" id="ttM-Fb-h9P"/>
-                            </constraints>
-                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="icon_comparative_hook" id="zYa-4Q-cE2"/>
-                        </imageView>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Jzd-Mg-rfa">
-                            <rect key="frame" x="6" y="15" width="114" height="16"/>
-                            <textFieldCell key="cell" alignment="center" title="Label" id="46S-yl-Zwl">
-                                <font key="font" metaFont="system"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="Jzd-Mg-rfa" firstAttribute="centerX" secondItem="Lxu-5r-sY9" secondAttribute="centerX" id="MCh-HM-oUp"/>
-                        <constraint firstAttribute="width" constant="126" id="Mmh-Ng-bHq"/>
-                        <constraint firstAttribute="trailing" secondItem="Jzd-Mg-rfa" secondAttribute="trailing" constant="8" id="Vcy-Uh-qxp"/>
-                        <constraint firstItem="Jzd-Mg-rfa" firstAttribute="leading" secondItem="Lxu-5r-sY9" secondAttribute="leading" constant="8" id="YBb-Og-2i2"/>
-                        <constraint firstItem="lqb-EW-MkO" firstAttribute="centerY" secondItem="Lxu-5r-sY9" secondAttribute="centerY" id="lpL-7p-oqN"/>
-                        <constraint firstItem="lqb-EW-MkO" firstAttribute="centerX" secondItem="Lxu-5r-sY9" secondAttribute="centerX" id="oFI-8W-RcF"/>
-                        <constraint firstAttribute="height" constant="46" id="u57-nJ-USg"/>
-                        <constraint firstItem="Jzd-Mg-rfa" firstAttribute="centerY" secondItem="Lxu-5r-sY9" secondAttribute="centerY" id="ydy-AK-0vk"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="v52-Tq-tui">
-                    <rect key="frame" x="658" y="-1" width="126" height="46"/>
-                    <subviews>
-                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="t5Q-5X-AdQ">
-                            <rect key="frame" x="54" y="14" width="18" height="18"/>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="18" id="JyY-gH-j3e"/>
-                                <constraint firstAttribute="height" constant="18" id="MAP-bJ-tEk"/>
-                            </constraints>
-                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="icon_comparative_hook" id="IYc-dA-3hY"/>
-                        </imageView>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="kLh-ev-nDz">
-                            <rect key="frame" x="6" y="15" width="114" height="16"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Label" id="oTb-sT-L9u">
-                                <font key="font" metaFont="system"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="kLh-ev-nDz" firstAttribute="leading" secondItem="v52-Tq-tui" secondAttribute="leading" constant="8" id="8NN-F7-iJG"/>
-                        <constraint firstItem="t5Q-5X-AdQ" firstAttribute="centerX" secondItem="v52-Tq-tui" secondAttribute="centerX" id="CPB-Ui-O56"/>
-                        <constraint firstAttribute="width" constant="126" id="FQa-iL-BZX"/>
-                        <constraint firstItem="kLh-ev-nDz" firstAttribute="centerY" secondItem="v52-Tq-tui" secondAttribute="centerY" id="Hkt-CV-tgF"/>
-                        <constraint firstItem="t5Q-5X-AdQ" firstAttribute="centerY" secondItem="v52-Tq-tui" secondAttribute="centerY" id="TMJ-6q-VoI"/>
-                        <constraint firstAttribute="height" constant="46" id="tb5-pI-YiU"/>
-                        <constraint firstAttribute="trailing" secondItem="kLh-ev-nDz" secondAttribute="trailing" constant="8" id="vX1-hd-Yqg"/>
-                        <constraint firstItem="kLh-ev-nDz" firstAttribute="centerX" secondItem="v52-Tq-tui" secondAttribute="centerX" id="xfW-Ln-DC0"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstItem="u22-yU-gpo" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="8" id="3xU-aP-ezl"/>
-                <constraint firstItem="MZK-3R-AFq" firstAttribute="leading" secondItem="Lxu-5r-sY9" secondAttribute="trailing" id="JNF-ww-vEg"/>
-                <constraint firstAttribute="trailing" secondItem="v52-Tq-tui" secondAttribute="trailing" id="N2h-A6-vS1"/>
-                <constraint firstItem="MZK-3R-AFq" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="QjN-FH-ZkA"/>
-                <constraint firstItem="Lxu-5r-sY9" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="Wed-Ko-ACz"/>
-                <constraint firstItem="Lxu-5r-sY9" firstAttribute="leading" secondItem="u22-yU-gpo" secondAttribute="trailing" constant="8" id="XVq-B0-Dxl"/>
-                <constraint firstItem="u22-yU-gpo" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="fhC-tT-JkD"/>
-                <constraint firstItem="v52-Tq-tui" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="wpu-0S-b1q"/>
-                <constraint firstItem="v52-Tq-tui" firstAttribute="leading" secondItem="MZK-3R-AFq" secondAttribute="trailing" id="wsx-eu-GJ6"/>
-            </constraints>
-            <point key="canvasLocation" x="95" y="232"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="icon_comparative_hook" width="18" height="18"/>
-    </resources>
-</document>

+ 0 - 117
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/View/KMComparativeOutlineRowView.swift

@@ -1,117 +0,0 @@
-//
-//  KMComparativeOutlineRowView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/3/22.
-//
-
-import Cocoa
-typealias KMComparativeOutlineRowViewHoverCallback = (_ mouseEntered: Bool, _ mouseBox: KMBox) -> Void
-typealias KMComparativeOutlineRowViewMouseCallback = (_ view: KMComparativeOutlineRowView, _ event: NSEvent) -> Void
-typealias KMComparativeOutlineRowViewDownCallback = (_ view: KMComparativeOutlineRowView, _ event: NSEvent) -> Void
-
-class KMComparativeOutlineRowView: NSTableRowView {
-    var item: KMComparativeModelItem! {
-        didSet {
-            self.reloadData()
-        }
-    }
-    var section: KMComparativeModelSection! {
-        didSet {
-            self.reloadData()
-        }
-    }
-    var box: KMBox?
-    var hoverCallback: KMComparativeOutlineRowViewHoverCallback?
-    var rightMouseCallback: KMComparativeOutlineRowViewMouseCallback?
-    var mouseDownCallback: KMComparativeOutlineRowViewDownCallback?
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-        // Drawing code here.
-        self.wantsLayer = true
-        self.addBox()
-        self.drawLine(dirtyRect)
-    }
-    
-    func addBox() {
-        if self.box == nil {
-            self.box?.wantsLayer = true
-            self.box = KMBox(frame: self.bounds)
-            self.box?.borderWidth = 0
-            self.box?.boxType = .custom
-            self.addSubview(self.box!)
-//            self.box?.moveCallback = { [unowned self] (mouseEntered, mouseBox) in
-//                if mouseEntered {
-//                    self.backgroundColor(NSColor.km_init(hex: "#CED0D4", alpha: 0.6))
-//                } else {
-//                    if self.model != nil {
-//                        if model.content.count != 0 {
-//                            self.backgroundColor(NSColor.km_init(hex: "FFFFFF"))
-//                        } else {
-//                            self.backgroundColor(NSColor.km_init(hex: "#F7F8FA"))
-//                        }
-//                    }
-//                }
-//                if self.hoverCallback != nil {
-//                    self.hoverCallback!(mouseEntered, self.box!)
-//                }
-//            }
-        } else {
-            self.box!.frame = self.bounds
-        }
-    }
-    
-    override func drawSelection(in dirtyRect: NSRect) {
-        self.drawView()
-    }
-    
-    func drawView(_ color: NSColor = NSColor.km_init(hex: "#CED0D4", alpha: 0.6)) {
-        color.withAlphaComponent(0.6).setFill()
-        let path = NSBezierPath(roundedRect: NSInsetRect(self.bounds, 1, 1), xRadius: 0, yRadius: 0)
-        path.fill()
-    }
-    
-    func drawLine(_ dirtyRect: NSRect) {
-        // The line width is arbitrary, but our path really should be mitered.
-        let arrow = NSBezierPath()
-        arrow.lineWidth = 1
-        arrow.move(to: CGPoint(x: 16, y: 0))
-        arrow.line(to: CGPoint(x: dirtyRect.width - 16, y: 0))
-        arrow.close()
-        NSColor.km_init(hex: "#000000").withAlphaComponent(0.1).set()
-        arrow.stroke()
-        NSColor.green.setFill()
-        arrow.fill()
-    }
-    
-    //MARK: mouse
-    override func rightMouseUp(with event: NSEvent) {
-        super.rightMouseUp(with: event)
-        
-//        if self.rightMouseCallback != nil {
-//            self.rightMouseCallback!(self, event)
-//        }
-    }
-    
-    override func mouseDown(with event: NSEvent) {
-        super.mouseDown(with: event)
-        
-        if self.mouseDownCallback != nil {
-            self.mouseDownCallback!(self, event)
-        }
-    }
-    
-    //MARK: data
-    func reloadData() {
-//        if self.item != nil {
-//            self.box?.frame = CGRectMake(16, 0, self.frame.size.width - 32, self.frame.size.height)
-//            self.box?.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-//        }
-//
-//        if self.section != nil {
-//            self.box?.frame = CGRectMake(16, 0, self.frame.size.width - 32, self.frame.size.height)
-//            self.box?.backgroundColor(NSColor.km_init(hex: "#E4E9ED"))
-//        }
-    }
-    
-}

+ 0 - 83
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/View/KMComparativeOutlineSectionCell.swift

@@ -1,83 +0,0 @@
-//
-//  KMComparativeOutlineSectionCell.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/3/22.
-//
-
-import Cocoa
-
-class KMComparativeOutlineSectionCell: NSTableCellView {
-    
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet var contentView: NSView!
-    @IBOutlet var iconImageView: NSImageView!
-    @IBOutlet var contentBackgroundView: NSView!
-    
-    var model: KMComparativeModelSection? {
-        didSet {
-            self.reloadData()
-        }
-    }
-    // MARK: 初始化
-    override init(frame frameRect: NSRect) {
-        super.init(frame: frameRect)
-        initContentView()
-        setup()
-    }
-    
-    required init?(coder decoder: NSCoder) {
-        super.init(coder: decoder)
-        initContentView()
-        setup()
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-    private func initContentView() {
-        //绑定xib
-        let resource = NSNib(nibNamed: String(describing: self.classForCoder.self),
-                             bundle: Bundle(for: self.classForCoder.self))!
-        resource.instantiate(withOwner: self, topLevelObjects: nil)
-        addSubview(contentView)
-        contentView.translatesAutoresizingMaskIntoConstraints = false
-        NSLayoutConstraint.activate([
-            contentView.topAnchor.constraint(equalTo: topAnchor),
-            contentView.leftAnchor.constraint(equalTo: leftAnchor),
-            contentView.rightAnchor.constraint(equalTo: rightAnchor),
-            contentView.bottomAnchor.constraint(equalTo: bottomAnchor)])
-        contentView.updateConstraintsForSubtreeIfNeeded()
-    }
-    
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-        
-        self.contentBackgroundView.backgroundColor(NSColor.km_init(hex: "#E4E9ED"))
-    }
-    
-    func setup() {
-        
-    }
-    
-    func reloadData() {
-        guard let data = self.model else { return }
-        
-        self.titleLabel.stringValue = self.model?.title ?? ""
-        if  self.model?.select == false {
-            self.iconImageView.image = NSImage(named: "icon_comparative_close")
-        } else {
-            self.iconImageView.image = NSImage(named: "icon_comparative_ expansion")
-        }
-        
-    }
-    
-    func updateUI() {
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-        self.titleLabel.font = NSFont.SFProTextSemiboldFont(14.0)
-    }
-    
-    func updateLanguage() {
-        self.reloadData()
-    }
-
-}
-

+ 0 - 59
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/View/KMComparativeOutlineSectionCell.xib

@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMComparativeOutlineSectionCell" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="contentBackgroundView" destination="aem-7E-JBQ" id="3Y0-bk-4zw"/>
-                <outlet property="contentView" destination="c22-O7-iKe" id="vpl-xz-be2"/>
-                <outlet property="iconImageView" destination="64N-be-mvX" id="jMd-Ev-nL3"/>
-                <outlet property="titleLabel" destination="HbL-ea-j04" id="4Rr-5l-Vrs"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="480" height="30"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="aem-7E-JBQ">
-                    <rect key="frame" x="0.0" y="0.0" width="472" height="30"/>
-                </customView>
-                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="64N-be-mvX">
-                    <rect key="frame" x="16" y="5" width="20" height="20"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="20" id="BAT-LQ-zuB"/>
-                        <constraint firstAttribute="width" constant="20" id="WEF-eR-T7c"/>
-                    </constraints>
-                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="icon_comparative_close" id="qD5-Gu-Eaf"/>
-                </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="HbL-ea-j04">
-                    <rect key="frame" x="42" y="7" width="37" height="16"/>
-                    <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="2k6-oB-4UN">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-            </subviews>
-            <constraints>
-                <constraint firstItem="HbL-ea-j04" firstAttribute="leading" secondItem="64N-be-mvX" secondAttribute="trailing" constant="8" id="12q-aw-wVb"/>
-                <constraint firstAttribute="bottom" secondItem="aem-7E-JBQ" secondAttribute="bottom" id="29H-CG-Pzd"/>
-                <constraint firstItem="HbL-ea-j04" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="TCh-b5-zQ5"/>
-                <constraint firstAttribute="trailing" secondItem="aem-7E-JBQ" secondAttribute="trailing" constant="8" id="Wku-Dn-oLg"/>
-                <constraint firstItem="64N-be-mvX" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="16" id="b7q-Wb-QoF"/>
-                <constraint firstItem="64N-be-mvX" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="lbg-MU-Qws"/>
-                <constraint firstItem="aem-7E-JBQ" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="nRz-cS-tgp"/>
-                <constraint firstItem="aem-7E-JBQ" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="z0x-Bc-KWC"/>
-            </constraints>
-            <point key="canvasLocation" x="75" y="154"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="icon_comparative_close" width="20" height="20"/>
-    </resources>
-</document>

+ 0 - 117
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeTableView.swift

@@ -1,117 +0,0 @@
-//
-//  KMComparativeTableView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/24.
-//
-
-import Cocoa
-
-typealias KMComparativeTableViewCloseAction = (_ view: KMComparativeTableView) -> Void
-typealias KMComparativeTableViewLoginAction = (_ view: KMComparativeTableView) -> Void
-typealias KMComparativeTableViewSignUpAction = (_ view: KMComparativeTableView) -> Void
-typealias KMComparativeTableViewSubscriptionAction = (_ view: KMComparativeTableView) -> Void
-typealias KMComparativeTableViewRestoreAction = (_ view: KMComparativeTableView) -> Void
-
-class KMComparativeTableView: BaseXibView {
-
-    @IBOutlet weak var closeBox: KMBox!
-    @IBOutlet weak var closeButton: NSButton!
-    @IBOutlet weak var signUpButton: NSButton!
-    @IBOutlet weak var loginButton: NSButton!
-    @IBOutlet weak var outlineView: KMComparativeOutlineView!
-    @IBOutlet weak var restoreButton: NSButton!
-    @IBOutlet weak var waterMarkButton: NSButton!
-    
-    var closeAction: KMComparativeTableViewCloseAction?
-    var loginAction: KMComparativeTableViewLoginAction?
-    var signUpAction: KMComparativeTableViewSignUpAction?
-    var subscriptionAction: KMComparativeTableViewSubscriptionAction?
-    var restoreAction: KMComparativeTableViewRestoreAction?
-    
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    func setup() {
-        
-        self.closeBox.moveCallback = { [weak self] (mouseEntered, mouseBox) in
-            if mouseEntered {
-                self?.closeButton.image = NSImage(named: "control_btn_icon_close_hov")
-            } else {
-                self?.closeButton.image = NSImage(named: "control_btn_icon_close")
-            }
-        }
-    }
-    
-    func updateUI() {
-        
-        #if VERSION_FREE
-        self.restoreButton.isHidden = false
-        #endif
-        
-        if KMPurchaseManager.manager.state == .subscription {
-            self.waterMarkButton.isHidden = true
-        }
-        
-        self.backgroundColor(NSColor.km_init(hex: "#F2F9FF"))
-        
-        self.loginButton.backgroundColor(NSColor.km_init(hex: "#1770F4"))
-        self.loginButton.border(NSColor.km_init(hex: "#1770F4"), 1, 4)
-        self.loginButton.contentTintColor = NSColor.km_init(hex: "FFFFFF")
-        
-        self.signUpButton.contentTintColor = NSColor.km_init(hex: "#1770F4")
-    }
-    
-    func reloadData() {
-        
-    }
-    
-    func updateLanguage() {
-        
-        self.signUpButton.title = NSLocalizedString("Sign Up", comment: "")
-        
-        self.loginButton.title = NSLocalizedString("Log In", comment: "")
-    }
-}
-
-protocol KMComparativeTableViewAction {}
-extension KMComparativeTableView: KMComparativeTableViewAction {
-    @IBAction func closeButtonAction(_ sender: Any) {
-        guard let callBack = closeAction else { return }
-        
-        callBack(self)
-    }
-    
-    @IBAction func signUpButtonAction(_ sender: Any) {
-        guard let callBack = signUpAction else { return }
-        
-        callBack(self)
-    }
-    
-    @IBAction func loginButtonAction(_ sender: Any) {
-        guard let callBack = loginAction else { return }
-        
-        callBack(self)
-    }
-    
-    @IBAction func subscriptionButtonAction(_ sender: Any) {
-        guard let callBack = subscriptionAction else { return }
-        
-        callBack(self)
-    }
-    
-    @IBAction func restoreButtonAction(_ sender: Any) {
-        guard let callBack = restoreAction else { return }
-        
-        callBack(self)
-    }
-    
-    @IBAction func waterMarkButtonAction(_ sender: Any) {
-        KMSubscribeWaterMarkWindowController.show(window: self.window ?? NSWindow()) { isSubscribeSuccess, isWaterMark, isClose in
-            
-        }
-    }
-}

+ 0 - 194
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeTableView.xib

@@ -1,194 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMComparativeTableView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="closeBox" destination="kR4-GT-aNn" id="tBA-Rf-ccI"/>
-                <outlet property="closeButton" destination="mcR-xz-9a9" id="gSm-yL-iMe"/>
-                <outlet property="loginButton" destination="fi1-h8-mNt" id="eeV-Kv-xJB"/>
-                <outlet property="outlineView" destination="250-TH-Pzl" id="WmQ-q5-EBr"/>
-                <outlet property="restoreButton" destination="rf9-Sg-aXn" id="rpk-vX-SYw"/>
-                <outlet property="restoreButtonAction" destination="GMX-4d-zo7" id="Kep-bj-VFm"/>
-                <outlet property="signUpButton" destination="hvx-14-OVC" id="mdc-AX-SMX"/>
-                <outlet property="waterMarkButton" destination="lzO-7S-puN" id="a06-ct-JlX"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="836" height="659"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <subviews>
-                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="63a-JO-IUQ">
-                    <rect key="frame" x="0.0" y="485" width="836" height="174"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="174" id="1gV-NR-Wce"/>
-                    </constraints>
-                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="background_comparative_top_Rectangle" id="HV7-RO-QX5"/>
-                </imageView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="6CF-gV-7MZ">
-                    <rect key="frame" x="0.0" y="631" width="836" height="28"/>
-                    <subviews>
-                        <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="kR4-GT-aNn" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                            <rect key="frame" x="8" y="8" width="12" height="12"/>
-                            <view key="contentView" id="5CB-Yf-q5e">
-                                <rect key="frame" x="0.0" y="0.0" width="12" height="12"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            </view>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="12" id="Z4t-b4-3bG"/>
-                                <constraint firstAttribute="height" constant="12" id="ttL-ew-HB2"/>
-                            </constraints>
-                        </box>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mcR-xz-9a9">
-                            <rect key="frame" x="8" y="8" width="12" height="12"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="12" id="42J-B2-tLj"/>
-                                <constraint firstAttribute="width" constant="12" id="D1w-8R-Sru"/>
-                            </constraints>
-                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="control_btn_icon_close" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="Vge-tb-mMf">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="closeButtonAction:" target="-2" id="UMK-NT-whA"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="kR4-GT-aNn" firstAttribute="leading" secondItem="6CF-gV-7MZ" secondAttribute="leading" constant="8" id="GmV-ur-68A"/>
-                        <constraint firstAttribute="height" constant="28" id="PXq-v2-Mga"/>
-                        <constraint firstItem="mcR-xz-9a9" firstAttribute="centerY" secondItem="6CF-gV-7MZ" secondAttribute="centerY" id="SS3-LC-457"/>
-                        <constraint firstItem="kR4-GT-aNn" firstAttribute="centerY" secondItem="6CF-gV-7MZ" secondAttribute="centerY" id="eIH-Wo-hlH"/>
-                        <constraint firstItem="mcR-xz-9a9" firstAttribute="leading" secondItem="6CF-gV-7MZ" secondAttribute="leading" constant="8" id="s9Z-O5-G4l"/>
-                        <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="28" id="x5L-Gj-IjQ"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="250-TH-Pzl" customClass="KMComparativeOutlineView" customModule="PDF_Master" customModuleProvider="target">
-                    <rect key="frame" x="24" y="120" width="788" height="497"/>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="uVY-kS-Rql">
-                    <rect key="frame" x="0.0" y="0.0" width="836" height="120"/>
-                    <subviews>
-                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="adY-Q0-Zuk">
-                            <rect key="frame" x="0.0" y="0.0" width="836" height="120"/>
-                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="background_comparative_bottom_Rectangle" id="U04-um-UqT"/>
-                        </imageView>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fi1-h8-mNt">
-                            <rect key="frame" x="274" y="54" width="288" height="44"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="44" id="AIN-Cj-LFB"/>
-                                <constraint firstAttribute="width" constant="288" id="pzt-Mx-zXb"/>
-                            </constraints>
-                            <buttonCell key="cell" type="bevel" title="Login" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="ujH-rs-1q9">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="loginButtonAction:" target="-2" id="ujI-7l-k23"/>
-                            </connections>
-                        </button>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hvx-14-OVC">
-                            <rect key="frame" x="392" y="22" width="52" height="24"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="24" id="yc8-Aa-4ha"/>
-                            </constraints>
-                            <buttonCell key="cell" type="bevel" title="Sign Up" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="eYc-59-jUj">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="signUpButtonAction:" target="-2" id="Ita-WR-WQ6"/>
-                            </connections>
-                        </button>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Cip-dW-2mZ">
-                            <rect key="frame" x="762" y="48" width="58" height="24"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="24" id="cGv-k2-ROw"/>
-                            </constraints>
-                            <buttonCell key="cell" type="bevel" title="免费试用" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="baR-fT-SZ9">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <color key="contentTintColor" name="systemRedColor" catalog="System" colorSpace="catalog"/>
-                            <connections>
-                                <action selector="subscriptionButtonAction:" target="-2" id="pih-Pt-3Qj"/>
-                            </connections>
-                        </button>
-                        <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rf9-Sg-aXn">
-                            <rect key="frame" x="16" y="48" width="47" height="24"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="24" id="5ab-Xu-37e"/>
-                            </constraints>
-                            <buttonCell key="cell" type="bevel" title="restore" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="ZbB-oU-XZq">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <color key="contentTintColor" name="systemRedColor" catalog="System" colorSpace="catalog"/>
-                            <connections>
-                                <action selector="restoreButtonAction:" target="-2" id="6gU-Py-cTE"/>
-                            </connections>
-                        </button>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lzO-7S-puN">
-                            <rect key="frame" x="706" y="80" width="114" height="24"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="24" id="rbq-8v-TU7"/>
-                            </constraints>
-                            <buttonCell key="cell" type="bevel" title="Export WaterMark" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="EDo-V2-kUR">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <color key="contentTintColor" name="systemRedColor" catalog="System" colorSpace="catalog"/>
-                            <connections>
-                                <action selector="waterMarkButtonAction:" target="-2" id="T59-qG-Cv0"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <constraints>
-                        <constraint firstAttribute="bottom" secondItem="hvx-14-OVC" secondAttribute="bottom" constant="22" id="EXk-h2-DK8"/>
-                        <constraint firstItem="rf9-Sg-aXn" firstAttribute="centerY" secondItem="uVY-kS-Rql" secondAttribute="centerY" id="GMX-4d-zo7"/>
-                        <constraint firstAttribute="bottom" secondItem="adY-Q0-Zuk" secondAttribute="bottom" id="HC8-xU-IlX"/>
-                        <constraint firstAttribute="trailing" secondItem="adY-Q0-Zuk" secondAttribute="trailing" id="IKa-1o-bn5"/>
-                        <constraint firstItem="adY-Q0-Zuk" firstAttribute="top" secondItem="uVY-kS-Rql" secondAttribute="top" id="ORU-WH-Sm0"/>
-                        <constraint firstItem="hvx-14-OVC" firstAttribute="centerX" secondItem="uVY-kS-Rql" secondAttribute="centerX" id="Pfx-hV-0be"/>
-                        <constraint firstAttribute="height" constant="120" id="Ru4-VK-y7n"/>
-                        <constraint firstItem="adY-Q0-Zuk" firstAttribute="leading" secondItem="uVY-kS-Rql" secondAttribute="leading" id="UoO-9M-ij4"/>
-                        <constraint firstItem="hvx-14-OVC" firstAttribute="top" secondItem="fi1-h8-mNt" secondAttribute="bottom" constant="8" id="WDd-cy-gRk"/>
-                        <constraint firstItem="fi1-h8-mNt" firstAttribute="centerX" secondItem="uVY-kS-Rql" secondAttribute="centerX" id="lek-Ly-yJ3"/>
-                        <constraint firstAttribute="trailing" secondItem="lzO-7S-puN" secondAttribute="trailing" constant="16" id="lhV-5A-etC"/>
-                        <constraint firstItem="rf9-Sg-aXn" firstAttribute="leading" secondItem="uVY-kS-Rql" secondAttribute="leading" constant="16" id="nI7-V3-u76"/>
-                        <constraint firstItem="lzO-7S-puN" firstAttribute="top" secondItem="uVY-kS-Rql" secondAttribute="top" constant="16" id="pUz-uG-MqV"/>
-                        <constraint firstItem="Cip-dW-2mZ" firstAttribute="centerY" secondItem="uVY-kS-Rql" secondAttribute="centerY" id="qur-XV-XlU"/>
-                        <constraint firstAttribute="trailing" secondItem="Cip-dW-2mZ" secondAttribute="trailing" constant="16" id="znD-2V-jLI"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstAttribute="trailing" secondItem="uVY-kS-Rql" secondAttribute="trailing" id="04Y-kJ-UPZ"/>
-                <constraint firstAttribute="trailing" secondItem="250-TH-Pzl" secondAttribute="trailing" constant="24" id="7Ly-N8-kPI"/>
-                <constraint firstItem="uVY-kS-Rql" firstAttribute="top" secondItem="250-TH-Pzl" secondAttribute="bottom" id="9RP-R9-IeX"/>
-                <constraint firstItem="250-TH-Pzl" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="24" id="AOD-P0-nZJ"/>
-                <constraint firstItem="250-TH-Pzl" firstAttribute="top" secondItem="6CF-gV-7MZ" secondAttribute="bottom" constant="14" id="Iot-B9-7wZ"/>
-                <constraint firstAttribute="trailing" secondItem="63a-JO-IUQ" secondAttribute="trailing" id="JN3-DF-ZEj"/>
-                <constraint firstItem="63a-JO-IUQ" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="MN3-Kj-Bpx"/>
-                <constraint firstItem="6CF-gV-7MZ" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="UQJ-ov-Azv"/>
-                <constraint firstAttribute="trailing" secondItem="6CF-gV-7MZ" secondAttribute="trailing" id="W13-GX-Vcf"/>
-                <constraint firstItem="uVY-kS-Rql" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="kyo-w7-YRC"/>
-                <constraint firstItem="63a-JO-IUQ" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="qTO-NW-Qe0"/>
-                <constraint firstAttribute="bottom" secondItem="uVY-kS-Rql" secondAttribute="bottom" id="qh9-Pu-H47"/>
-                <constraint firstItem="6CF-gV-7MZ" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="xT0-4X-aRa"/>
-            </constraints>
-            <point key="canvasLocation" x="63" y="98"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="background_comparative_bottom_Rectangle" width="836" height="120"/>
-        <image name="background_comparative_top_Rectangle" width="836" height="174"/>
-        <image name="control_btn_icon_close" width="12" height="12"/>
-    </resources>
-</document>

+ 0 - 314
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/KMComparativeView.swift

@@ -1,314 +0,0 @@
-//
-//  KMComparativeView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/6/25.
-//
-
-import Cocoa
-
-typealias KMComparativeViewCloseAction = (_ view: KMComparativeView) -> Void
-typealias KMComparativeViewSignUpAction = (_ view: KMComparativeView) -> Void
-typealias KMComparativeViewSubscriptionAction = (_ view: KMComparativeView) -> Void
-typealias KMComparativeViewRestoreAction = (_ view: KMComparativeView) -> Void
-
-class KMComparativeView: BaseXibView {
-    @IBOutlet weak var topView: NSView!
-    @IBOutlet weak var collectionContentView: NSView!
-    @IBOutlet weak var collectionView: NSCollectionView!
-    @IBOutlet weak var closeButton: NSButton!
-    @IBOutlet weak var closeBox: KMBox!
-//    @IBOutlet var textView: NSTextView!
-    @IBOutlet weak var imageView: NSImageView!
-    @IBOutlet weak var restoreButton: NSButton!
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var infoButton: NSButton!
-    @IBOutlet weak var privacyPolicyButton: NSButton!
-    @IBOutlet weak var termsServiceButton: NSButton!
-    @IBOutlet weak var lineView: NSView!
-    
-    
-    var closeAction: KMComparativeViewCloseAction?
-    var signUpAction: KMComparativeViewSignUpAction?
-    var subscriptionAction: KMComparativeViewSubscriptionAction?
-    var restoreAction: KMComparativeViewRestoreAction?
-    
-    var dataArray: [NSDictionary] = [
-        [
-            "type": 0,
-            "title": "Registered",
-            "subtitle": "Free Plan",
-            "describe": "Simply log in and get benefits.",
-            "content": [
-                ["title": "AI translate",
-                 "state": 1,
-                 "color": "#551CCD"],
-                ["title": "AI rewrite, AI correction (5 times per month for each function)",
-                 "state": 1,
-                 "color": "#551CCD"],
-                ["title": "Save without watermark",
-                 "state": 0,
-                 "color": "#F3465B"],
-                ["title": "Convert PDF to Office (Only first 10 pages), unlimited times",
-                 "state": 2,
-                 "color": "#252629"],
-                ["title": "Merge 2 files at once, unlimited times",
-                 "state": 2,
-                 "color": "#252629"],
-                ["title": "Basic functions like annotation and viewing",
-                 "state": 2,
-                 "color": "#252629"],
-                ["title": "",
-                 "state": 0,
-                 "color": "#252629"]
-            ],
-            "buttonTitle": "Free Trial"
-        ],
-        [
-            "type": 1,
-            "title": "Yearly Plan",
-            "subtitle": "$79.99",
-            "describe": "Save 50%@ for the first year, auto-renew at %@. Billed yearly.",
-            "productId": PRODUCT_1,
-            "content": [
-                ["title": "AI translate",
-                 "state": 1,
-                 "color": "#551CCD"],
-                ["title": "AI rewrite, AI correction (5 times per month for each function)",
-                 "state": 1,
-                 "color": "#551CCD"],
-                ["title": "Save without watermark",
-                 "state": 1,
-                 "color": "#252629"],
-                ["title": "Convert PDF to Office without any limitation",
-                 "state": 1,
-                 "color": "#252629"],
-                ["title": "Batch merge files without any limitation",
-                 "state": 1,
-                 "color": "#252629"],
-                ["title": "Unlock all premium features",
-                 "state": 1,
-                 "color": "#252629"],
-                ["title": "",
-                 "state": 0,
-                 "color": "#252629"]
-            ],
-            "buttonTitle": "Subscribe"
-        ]
-    ]
-    
-    let popover = NSPopover()
-    
-    var isSubscription: Bool = false
-    
-    func setup() {
-        
-        // 创建布局对象
-        let layout = NSCollectionViewFlowLayout()
-        layout.scrollDirection = .horizontal
-        // 设置布局到 NSCollectionView
-        self.collectionView.collectionViewLayout = layout
-        //设置代理
-        self.collectionView.delegate = self
-        self.collectionView.dataSource = self
-        //是否可选中
-        self.collectionView.isSelectable = true
-        //注册cell
-        self.collectionView.register(KMComparativeViewCollectionItem.self, forItemWithIdentifier: NSUserInterfaceItemIdentifier(rawValue: "KMComparativeViewCollectionItem"))
-        
-        self.closeBox.moveCallback = { [weak self] (mouseEntered, mouseBox) in
-            if mouseEntered {
-                self?.closeButton.image = NSImage(named: "control_btn_icon_close_hov")
-            } else {
-                self?.closeButton.image = NSImage(named: "control_btn_icon_close")
-            }
-        }
-        
-//        self.textView.delegate = self
-//        self.textView.isEditable = false
-//        self.textView.frame = (self.textView.enclosingScrollView?.contentView.bounds)!
-//        self.textView.autoresizingMask = [.width, .height]
-        
-        self.imageView.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-        
-        self.contentView.addSubview(self.imageView, positioned: .below, relativeTo: self.collectionContentView)
-        self.contentView.addSubview(self.imageView, positioned: .below, relativeTo: self.topView)
-        
-        self.restoreButton.contentTintColor = NSColor.km_init(hex: "#1770F4")
-        self.restoreButton.font = NSFont.SFProTextRegularFont(16)
-        
-        self.privacyPolicyButton.contentTintColor = NSColor.km_init(hex: "#1770F4")
-        self.privacyPolicyButton.font = NSFont.SFProTextRegularFont(12)
-        
-        self.lineView.backgroundColor(NSColor.km_init(hex: "#000000").withAlphaComponent(0.1))
-        
-        self.termsServiceButton.contentTintColor = NSColor.km_init(hex: "#1770F4")
-        self.termsServiceButton.font = NSFont.SFProTextRegularFont(12)
-        
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-        self.titleLabel.font = NSFont.SFProTextSemiboldFont(24)
-        
-        self.setupPopover()
-    }
-    
-    func updateLanguage() {
-        self.restoreButton.title = NSLocalizedString("Restore Purchases", comment: "")
-        self.titleLabel.stringValue = NSLocalizedString("Upgrade to Use All Features", comment: "")
-    }
-    
-    func reloadData() {
-        self.beginLoading(backgroundColor: NSColor.black.withAlphaComponent(0.2))
-        KMInAppPurchaseManager.manager.fetchProducts { [weak self] isSuccess, products, error in
-            KMPurchaseManager.manager.checkSubscriptionStatus({ [weak self] isSubscription in
-                self?.isSubscription = isSubscription
-                self?.endLoading()
-                self?.collectionView.reloadData()
-            })
-        }
-    }
-    
-    @IBAction func infoButtonAction(_ sender: Any) {
-        self.showPopover(sender)
-    }
-    
-    @IBAction func privacyPolicyButtonAction(_ sender: Any) {
-        NSWorkspace.shared.open(URL(string: "https://www.pdfreaderpro.com/privacy-policy")!)
-    }
-    
-    @IBAction func termsServiceButtonAction(_ sender: Any) {
-        NSWorkspace.shared.open(URL(string: "https://www.pdfreaderpro.com/terms_of_service")!)
-    }
-    
-    func setupPopover() {
-        let string: NSString = NSLocalizedString(
-"""
-Payment will be charged to your Apple ID account at the confirmation of purchase.\nSubscription automatically renews unless it is canceled at least 24 hours before the end of the current period. Your account will be charged for renewal within 24 hours prior to the end of the current period. You can manage and cancel your subscriptions by going to your account settings on the App Store after purchase.
-"""
-            , comment: "") as NSString
-        
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.lineHeightMultiple = 1.4
-        paragraphStyle.alignment = .left
-        let attributes = [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12), NSAttributedString.Key.paragraphStyle : paragraphStyle]
-        var size: NSSize = string.boundingRect(with: NSSize(width: 420, height: 600), options: NSString.DrawingOptions(rawValue: 3), attributes: attributes).size
-        size = CGSize(width: size.width, height: size.height + 30)
-        
-        popover.behavior = .transient
-        popover.setValue(true, forKey: "shouldHideAnchor")
-        popover.contentViewController = NSViewController()
-        popover.contentViewController?.view = NSView(frame: NSRect(x: 0, y: 0, width: size.width, height: size.height))
-        popover.contentViewController?.view.wantsLayer = true
-        popover.contentViewController?.view.layer?.backgroundColor = NSColor.km_init(hex:"#000000").cgColor
-        
-        let textField = NSTextField(frame: NSRect(x: 16, y: 8, width: size.width - 32, height: size.height - 16))
-        textField.attributedStringValue = NSMutableAttributedString(string: NSLocalizedString(string as String, comment: ""), attributes: attributes)
-        textField.backgroundColor(NSColor.km_init(hex: "#000000"))
-        textField.drawsBackground = false
-        textField.isEditable = false
-        textField.isSelectable = false
-        textField.lineBreakMode = .byCharWrapping
-        textField.textColor = NSColor.km_init(hex: "#FFFFFF")
-        
-        popover.contentViewController?.view.addSubview(textField)
-    }
-    
-    @objc func showPopover(_ sender: Any?) {
-        if popover.isShown {
-            popover.performClose(sender)
-        } else {
-            let button = sender as? NSButton
-            popover.show(relativeTo: button?.bounds ?? NSZeroRect, of: button ?? NSView(), preferredEdge: NSRectEdge.maxX)
-        }
-    }
-}
-
-extension KMComparativeView: NSCollectionViewDataSource {
-    public func numberOfSections(in collectionView: NSCollectionView) -> Int {
-        return self.dataArray.count
-    }
-    
-    public func collectionView(_ collectionView: NSCollectionView, numberOfItemsInSection section: Int) -> Int {
-        return 1
-    }
-    
-    //返回对应的item自定义个体
-    public func collectionView(_ collectionView: NSCollectionView, itemForRepresentedObjectAt indexPath: IndexPath) -> NSCollectionViewItem {
-//        let data = self.dataArray[indexPath.item]
-        let view = collectionView.makeItem(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "KMComparativeViewCollectionItem"), for: indexPath) as! KMComparativeViewCollectionItem
-        view.isSubscription = isSubscription
-        view.data = self.dataArray[indexPath.section] as! [String : Any]
-        view.doneAction = { [unowned self] view, data in
-            if data["type"] as! Int == 0 {
-                guard let callBack = signUpAction else { return }
-                callBack(self)
-            } else if data ["type"] as! Int == 1 {
-                guard let callBack = subscriptionAction else { return }
-                callBack(self)
-            }
-        }
-        return view
-    }
-}
-
-extension KMComparativeView: NSCollectionViewDelegate {
-    //当item被选中
-    public func collectionView(_ collectionView: NSCollectionView, didSelectItemsAt indexPaths: Set<IndexPath>) {
-        KMPrint("点击")
-    }
-    
-   //当item取消选中
-    public func collectionView(_ collectionView: NSCollectionView, didDeselectItemsAt indexPaths: Set<IndexPath>) {
-        
-    }
-}
-
-extension KMComparativeView: NSCollectionViewDelegateFlowLayout {
-    
-    public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> NSSize {
-        return NSSize(width: 348, height: 467)
-    }
-    
-//    public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
-//        return 30
-//    }
-    
-    public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, insetForSectionAt section: Int) -> NSEdgeInsets {
-        if section == 0 {
-            return NSEdgeInsets(top: 0, left: 0, bottom: 0, right: 30)
-        } else {
-            return NSEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
-        }
-    }
-
-//    public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
-//        return 30
-//    }
-}
-
-//MARK: Action
-extension KMComparativeView {
-    @IBAction func closeButtonAction(_ sender: Any) {
-        guard let callBack = closeAction else { return }
-        
-        callBack(self)
-    }
-}
-
-extension KMComparativeView: NSTextViewDelegate {
-    func textView(_ textView: NSTextView, clickedOnLink link: Any, at charIndex: Int) -> Bool {
-        if link as! String == "register://" {
-//            guard let callBack = self.subscribeAction else { return true }
-            
-            KMPrint("链接点击")
-//            callBack(self)
-        }
-        return true
-    }
-    
-    @IBAction func restoreButtonAction(_ sender: Any) {
-        guard let callBack = restoreAction else { return }
-        
-        callBack(self)
-    }
-    
-}

+ 0 - 248
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/KMComparativeView.xib

@@ -1,248 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMComparativeView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="closeBox" destination="IE1-YG-Yg7" id="ahV-nI-WGz"/>
-                <outlet property="closeButton" destination="eN5-5g-Ftd" id="Qdz-7u-frx"/>
-                <outlet property="collectionContentView" destination="yhM-ic-Qb1" id="jLH-k3-At6"/>
-                <outlet property="collectionView" destination="tXY-fl-8XY" id="YW7-b3-uXQ"/>
-                <outlet property="imageView" destination="Rwo-sa-TEc" id="6uM-hc-EtN"/>
-                <outlet property="infoButton" destination="t36-hD-ZhM" id="DwB-cP-2Yj"/>
-                <outlet property="lineView" destination="WwB-fr-JGi" id="Xfb-VP-YWA"/>
-                <outlet property="privacyPolicyButton" destination="hY1-Tk-GCi" id="cFV-Cm-cEz"/>
-                <outlet property="restoreButton" destination="BFl-PZ-fp3" id="hG2-in-77d"/>
-                <outlet property="termsServiceButton" destination="rP2-sO-AA6" id="wT7-Li-jS9"/>
-                <outlet property="titleLabel" destination="MnS-Io-H7L" id="S60-8o-pk7"/>
-                <outlet property="topView" destination="fSi-Nh-UBK" id="Cui-Cv-WgW"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="807" height="659"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <subviews>
-                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Rwo-sa-TEc">
-                    <rect key="frame" x="0.0" y="465" width="807" height="194"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="194" id="sy7-2v-Bmz"/>
-                    </constraints>
-                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="background_comparative_Badge" id="kcu-Za-GN1"/>
-                </imageView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="fSi-Nh-UBK">
-                    <rect key="frame" x="0.0" y="631" width="807" height="28"/>
-                    <subviews>
-                        <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="IE1-YG-Yg7" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                            <rect key="frame" x="8" y="8" width="12" height="12"/>
-                            <view key="contentView" id="SwN-cs-s3V">
-                                <rect key="frame" x="0.0" y="0.0" width="12" height="12"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            </view>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="12" id="3gx-Gk-tmI"/>
-                                <constraint firstAttribute="width" constant="12" id="7dn-zU-W9I"/>
-                            </constraints>
-                        </box>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="eN5-5g-Ftd">
-                            <rect key="frame" x="8" y="8" width="12" height="12"/>
-                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="control_btn_icon_close" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="x0u-hh-567">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="12" id="hHP-Pp-ky2"/>
-                                <constraint firstAttribute="height" constant="12" id="mIP-CG-QlM"/>
-                            </constraints>
-                            <connections>
-                                <action selector="closeButtonAction:" target="-2" id="ugN-d6-a63"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="IE1-YG-Yg7" firstAttribute="centerY" secondItem="fSi-Nh-UBK" secondAttribute="centerY" id="qFW-LK-I1w"/>
-                        <constraint firstAttribute="height" constant="28" id="tOS-4n-agG"/>
-                        <constraint firstItem="eN5-5g-Ftd" firstAttribute="leading" secondItem="fSi-Nh-UBK" secondAttribute="leading" constant="8" id="tta-DT-paA"/>
-                        <constraint firstItem="eN5-5g-Ftd" firstAttribute="centerY" secondItem="fSi-Nh-UBK" secondAttribute="centerY" id="x4z-sB-E87"/>
-                        <constraint firstItem="IE1-YG-Yg7" firstAttribute="leading" secondItem="fSi-Nh-UBK" secondAttribute="leading" constant="8" id="zX2-P6-1Dk"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="yhM-ic-Qb1">
-                    <rect key="frame" x="0.0" y="0.0" width="807" height="631"/>
-                    <subviews>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="cMm-TO-WQD">
-                            <rect key="frame" x="40" y="20" width="727" height="20"/>
-                            <subviews>
-                                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rP2-sO-AA6">
-                                    <rect key="frame" x="384" y="2" width="106" height="16"/>
-                                    <buttonCell key="cell" type="square" title="Terms of Service" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="ply-Hb-Jcv">
-                                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                        <font key="font" metaFont="system"/>
-                                    </buttonCell>
-                                    <connections>
-                                        <action selector="termsServiceButtonAction:" target="-2" id="Yps-Fj-s1b"/>
-                                    </connections>
-                                </button>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="WwB-fr-JGi">
-                                    <rect key="frame" x="363" y="2" width="1" height="16"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="16" id="NaH-2F-rQ9"/>
-                                        <constraint firstAttribute="width" constant="1" id="ikC-DO-ZFL"/>
-                                    </constraints>
-                                </customView>
-                                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hY1-Tk-GCi">
-                                    <rect key="frame" x="255" y="2" width="88" height="16"/>
-                                    <buttonCell key="cell" type="square" title="Privacy Policy" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="Z32-Nt-dbF">
-                                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                        <font key="font" metaFont="system"/>
-                                    </buttonCell>
-                                    <connections>
-                                        <action selector="privacyPolicyButtonAction:" target="-2" id="m6t-Bc-zCD"/>
-                                    </connections>
-                                </button>
-                            </subviews>
-                            <constraints>
-                                <constraint firstItem="hY1-Tk-GCi" firstAttribute="centerY" secondItem="cMm-TO-WQD" secondAttribute="centerY" id="GvB-xo-Yz2"/>
-                                <constraint firstItem="rP2-sO-AA6" firstAttribute="leading" secondItem="WwB-fr-JGi" secondAttribute="trailing" constant="20" id="ScB-mG-orL"/>
-                                <constraint firstItem="WwB-fr-JGi" firstAttribute="leading" secondItem="hY1-Tk-GCi" secondAttribute="trailing" constant="20" id="TuP-nN-pZr"/>
-                                <constraint firstItem="rP2-sO-AA6" firstAttribute="centerY" secondItem="cMm-TO-WQD" secondAttribute="centerY" id="XLD-a4-Icg"/>
-                                <constraint firstItem="WwB-fr-JGi" firstAttribute="centerX" secondItem="cMm-TO-WQD" secondAttribute="centerX" id="nxh-og-xDu"/>
-                                <constraint firstAttribute="height" constant="20" id="t0M-RP-8Q7"/>
-                                <constraint firstItem="WwB-fr-JGi" firstAttribute="centerY" secondItem="cMm-TO-WQD" secondAttribute="centerY" id="uzh-xR-FTa"/>
-                            </constraints>
-                        </customView>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="nXE-h3-HLH">
-                            <rect key="frame" x="0.0" y="581" width="807" height="32"/>
-                            <subviews>
-                                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="hbn-Vp-scG">
-                                    <rect key="frame" x="40" y="-2" width="36" height="36"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="36" id="TU5-4O-3gD"/>
-                                        <constraint firstAttribute="width" constant="36" id="iQD-1K-ZP3"/>
-                                    </constraints>
-                                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="Upgrade your plan" id="Qxe-i0-Wsc"/>
-                                </imageView>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MnS-Io-H7L">
-                                    <rect key="frame" x="82" y="8" width="116" height="16"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Upgrade your plan" id="YKh-hc-g1N">
-                                        <font key="font" metaFont="system"/>
-                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
-                                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BFl-PZ-fp3">
-                                    <rect key="frame" x="716" y="8" width="51" height="16"/>
-                                    <buttonCell key="cell" type="square" title="Restore" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="TEv-sn-Oqu">
-                                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                        <font key="font" metaFont="system"/>
-                                    </buttonCell>
-                                    <connections>
-                                        <action selector="restoreButtonAction:" target="-2" id="Bzc-zn-scx"/>
-                                    </connections>
-                                </button>
-                                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="t36-hD-ZhM">
-                                    <rect key="frame" x="204" y="8" width="16" height="16"/>
-                                    <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="icon_info" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="bFX-Ce-vIG">
-                                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                        <font key="font" metaFont="system"/>
-                                    </buttonCell>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="16" id="ANF-bC-Abf"/>
-                                        <constraint firstAttribute="width" constant="16" id="YSy-2J-4ZD"/>
-                                    </constraints>
-                                    <connections>
-                                        <action selector="infoButtonAction:" target="-2" id="XeA-K0-PqQ"/>
-                                    </connections>
-                                </button>
-                            </subviews>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="32" id="2L4-Ai-nKn"/>
-                                <constraint firstItem="t36-hD-ZhM" firstAttribute="centerY" secondItem="nXE-h3-HLH" secondAttribute="centerY" id="AzW-3Z-umn"/>
-                                <constraint firstItem="MnS-Io-H7L" firstAttribute="centerY" secondItem="nXE-h3-HLH" secondAttribute="centerY" id="MND-pN-vv2"/>
-                                <constraint firstItem="MnS-Io-H7L" firstAttribute="leading" secondItem="hbn-Vp-scG" secondAttribute="trailing" constant="8" id="Mb7-Yn-VJ2"/>
-                                <constraint firstAttribute="trailing" secondItem="BFl-PZ-fp3" secondAttribute="trailing" constant="40" id="jYO-IV-l6b"/>
-                                <constraint firstItem="hbn-Vp-scG" firstAttribute="leading" secondItem="nXE-h3-HLH" secondAttribute="leading" constant="40" id="jZs-7I-kLE"/>
-                                <constraint firstItem="hbn-Vp-scG" firstAttribute="centerY" secondItem="nXE-h3-HLH" secondAttribute="centerY" id="kIR-8I-3T2"/>
-                                <constraint firstItem="BFl-PZ-fp3" firstAttribute="centerY" secondItem="nXE-h3-HLH" secondAttribute="centerY" id="van-IL-ofw"/>
-                                <constraint firstItem="t36-hD-ZhM" firstAttribute="leading" secondItem="MnS-Io-H7L" secondAttribute="trailing" constant="8" id="vjX-vN-gb2"/>
-                            </constraints>
-                        </customView>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="tuB-UO-PhU">
-                            <rect key="frame" x="0.0" y="76" width="807" height="485"/>
-                            <subviews>
-                                <scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ScA-aL-r0P">
-                                    <rect key="frame" x="40" y="0.0" width="727" height="485"/>
-                                    <clipView key="contentView" drawsBackground="NO" id="O9C-OM-ue0">
-                                        <rect key="frame" x="0.0" y="0.0" width="727" height="485"/>
-                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                        <subviews>
-                                            <collectionView allowsEmptySelection="NO" id="tXY-fl-8XY">
-                                                <rect key="frame" x="0.0" y="0.0" width="727" height="485"/>
-                                                <autoresizingMask key="autoresizingMask" heightSizable="YES"/>
-                                                <collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" scrollDirection="horizontal" id="cPd-fj-JkJ">
-                                                    <size key="itemSize" width="50" height="50"/>
-                                                </collectionViewFlowLayout>
-                                                <color key="primaryBackgroundColor" red="0.96862745100000003" green="0.97254901959999995" blue="0.98039215690000003" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                            </collectionView>
-                                        </subviews>
-                                        <color key="backgroundColor" red="0.96862745100000003" green="0.97254901959999995" blue="0.98039215690000003" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                    </clipView>
-                                    <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="uTi-tM-xkJ">
-                                        <rect key="frame" x="-100" y="-100" width="712" height="15"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                    </scroller>
-                                    <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="8fj-hc-piQ">
-                                        <rect key="frame" x="-100" y="-100" width="15" height="450"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                    </scroller>
-                                </scrollView>
-                            </subviews>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="485" id="LRq-ib-ghz"/>
-                                <constraint firstAttribute="trailing" secondItem="ScA-aL-r0P" secondAttribute="trailing" constant="40" id="bke-OZ-98o"/>
-                                <constraint firstAttribute="bottom" secondItem="ScA-aL-r0P" secondAttribute="bottom" id="hcN-ec-kQR"/>
-                                <constraint firstItem="ScA-aL-r0P" firstAttribute="leading" secondItem="tuB-UO-PhU" secondAttribute="leading" constant="40" id="igv-8h-OSz"/>
-                                <constraint firstItem="ScA-aL-r0P" firstAttribute="top" secondItem="tuB-UO-PhU" secondAttribute="top" id="vcq-J1-chq"/>
-                            </constraints>
-                        </customView>
-                    </subviews>
-                    <constraints>
-                        <constraint firstAttribute="trailing" secondItem="nXE-h3-HLH" secondAttribute="trailing" id="4he-uf-tjb"/>
-                        <constraint firstItem="tuB-UO-PhU" firstAttribute="top" secondItem="nXE-h3-HLH" secondAttribute="bottom" constant="20" id="RR2-l8-5UO"/>
-                        <constraint firstItem="cMm-TO-WQD" firstAttribute="leading" secondItem="yhM-ic-Qb1" secondAttribute="leading" constant="40" id="VTx-Ir-6RI"/>
-                        <constraint firstItem="nXE-h3-HLH" firstAttribute="leading" secondItem="yhM-ic-Qb1" secondAttribute="leading" id="Xvu-rI-QaT"/>
-                        <constraint firstItem="tuB-UO-PhU" firstAttribute="leading" secondItem="yhM-ic-Qb1" secondAttribute="leading" id="eEl-FA-8R5"/>
-                        <constraint firstItem="nXE-h3-HLH" firstAttribute="top" secondItem="yhM-ic-Qb1" secondAttribute="top" constant="18" id="lGc-GC-1Su"/>
-                        <constraint firstAttribute="trailing" secondItem="tuB-UO-PhU" secondAttribute="trailing" id="n6Q-O3-lV8"/>
-                        <constraint firstAttribute="trailing" secondItem="cMm-TO-WQD" secondAttribute="trailing" constant="40" id="toi-NO-WCW"/>
-                        <constraint firstAttribute="bottom" secondItem="cMm-TO-WQD" secondAttribute="bottom" constant="20" id="yKQ-fN-Zha"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstAttribute="trailing" secondItem="fSi-Nh-UBK" secondAttribute="trailing" id="7yD-IT-lHJ"/>
-                <constraint firstItem="Rwo-sa-TEc" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="9mH-CT-wcA"/>
-                <constraint firstItem="yhM-ic-Qb1" firstAttribute="top" secondItem="fSi-Nh-UBK" secondAttribute="bottom" id="Lgk-tg-RDL"/>
-                <constraint firstItem="yhM-ic-Qb1" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="MnF-QR-iWe"/>
-                <constraint firstAttribute="trailing" secondItem="yhM-ic-Qb1" secondAttribute="trailing" id="cVG-Nf-aGs"/>
-                <constraint firstAttribute="trailing" secondItem="Rwo-sa-TEc" secondAttribute="trailing" id="dEa-MX-iiu"/>
-                <constraint firstItem="fSi-Nh-UBK" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="hw6-ZC-zGR"/>
-                <constraint firstItem="Rwo-sa-TEc" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="pue-qC-itf"/>
-                <constraint firstItem="fSi-Nh-UBK" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="rcb-q6-GcL"/>
-                <constraint firstAttribute="bottom" secondItem="yhM-ic-Qb1" secondAttribute="bottom" id="vCq-1u-aGk"/>
-            </constraints>
-            <point key="canvasLocation" x="-4.5" y="241.5"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="Upgrade your plan" width="37" height="36"/>
-        <image name="background_comparative_Badge" width="807" height="194"/>
-        <image name="control_btn_icon_close" width="12" height="12"/>
-        <image name="icon_info" width="16" height="16"/>
-    </resources>
-</document>

+ 0 - 31
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/View/KMComparativeGradientView.swift

@@ -1,31 +0,0 @@
-//
-//  KMComparativeGradientView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/8/4.
-//
-
-import Cocoa
-
-class KMComparativeGradientView: NSView {
-
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-        
-        // Create a CAGradientLayer
-        let gradientLayer = CAGradientLayer()
-        
-        // Set the colors of the gradient (from transparent to white)
-        gradientLayer.colors = [NSColor.white.withAlphaComponent(0).cgColor, NSColor.white.withAlphaComponent(1).cgColor]
-        
-        // Set the start and end points of the gradient (left to right in this case)
-        gradientLayer.startPoint = CGPoint(x: 0.5, y: 1.0)
-        gradientLayer.endPoint = CGPoint(x: 0.5, y: 0.0)
-        
-        // Set the frame of the gradient layer to fill the view
-        gradientLayer.frame = self.bounds
-        
-        // Add the gradient layer to the layer hierarchy of the view
-        self.layer?.addSublayer(gradientLayer)
-    }
-}

+ 0 - 274
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/View/KMComparativeViewCollectionItem.swift

@@ -1,274 +0,0 @@
-//
-//  KMComparativeViewCollectionItem.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/6/25.
-//
-
-import Cocoa
-import StoreKit
-
-typealias KMComparativeViewCollectionItemDoneAction = (_ view: KMComparativeViewCollectionItem, _ data: [String: Any]) -> Void
-class KMComparativeViewCollectionItem: NSCollectionViewItem {
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var subtitleLabel: NSTextField!
-    @IBOutlet weak var lineView: NSView!
-    @IBOutlet weak var collectionViewContentView: NSView!
-    @IBOutlet weak var scrollView: NSScrollView!
-    @IBOutlet weak var contentCollectionView: NSCollectionView!
-    @IBOutlet weak var doneBox: KMBox!
-    @IBOutlet weak var doneContentView: NSView!
-    //    @IBOutlet weak var doneButton: NSButton!
-    @IBOutlet weak var doneButton: NSTextField!
-    
-    @IBOutlet weak var describeLabel: NSTextField!
-    @IBOutlet weak var iconImageView: NSImageView!
-    
-    var doneAction: KMComparativeViewCollectionItemDoneAction?
-    var isSubscription: Bool = false
-    var data: [String: Any] = [:] {
-        didSet {
-            self.reloadData()
-        }
-    }
-    
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        // Do view setup here.
-        
-        self.setup()
-    }
-    
-    func setup() {
-        self.view.border(NSColor.km_init(hex: "#E2E2E2"), 1, 10)
-        
-        self.titleLabel.font = NSFont.SFProTextSemiboldFont(20)
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-        
-        self.subtitleLabel.font = NSFont.SFProTextSemiboldFont(32)
-        self.subtitleLabel.textColor = NSColor.km_init(hex: "#616469")
-        
-        self.describeLabel.font = NSFont.SFProTextRegularFont(14)
-        self.describeLabel.textColor = NSColor.km_init(hex: "#616469")
-        
-        self.lineView.backgroundColor(NSColor.km_init(hex: "#ECECEC"))
-        
-        self.scrollView.scrollerStyle = .overlay
-        
-        //设置代理
-        self.contentCollectionView.delegate = self
-        self.contentCollectionView.dataSource = self
-        //是否可选中
-        self.contentCollectionView.isSelectable = true
-        //注册cell
-        self.contentCollectionView.register(KMComparativeViewCollectionItemItem.self, forItemWithIdentifier: NSUserInterfaceItemIdentifier(rawValue: "KMComparativeViewCollectionItemItem"))
-        
-        self.doneBox.moveCallback = { [unowned self] mouseEntered, mouseBox in
-            if data.count != 0 {
-                if data["type"] as! Int == 1 {
-                    if mouseEntered {
-                        self.doneContentView.backgroundColor(NSColor.km_init(hex: "#FFA153"))
-                    } else {
-                        self.doneContentView.backgroundColor(NSColor.km_init(hex: "#FF852E"))
-                    }
-                }  else {
-                    if mouseEntered {
-                        self.doneContentView.backgroundColor(NSColor.km_init(hex: "#EDEEF0"))
-                    } else {
-                        self.doneContentView.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-                    }
-                }
-            }
-        }
-        
-        self.doneBox.downCallback = { [unowned self] mouseEntered, mouseBox, event in
-            if data.count != 0 {
-                if data["type"] as! Int == 1 {
-                    if mouseEntered {
-                        self.doneContentView.backgroundColor(NSColor.km_init(hex: "#D2621C"))
-                    } else {
-                        self.doneContentView.backgroundColor(NSColor.km_init(hex: "#FF852E"))
-                        self.doneAction(self.doneButton)
-                    }
-                } else {
-                    if mouseEntered {
-                        self.doneContentView.backgroundColor(NSColor.km_init(hex: "#DFE1E5"))
-                    } else {
-                        self.doneContentView.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-                        self.doneAction(self.doneButton)
-                    }
-                }
-            }
-        }
-        
-        // 获取包含 NSCollectionView 的 NSScrollView
-        if let scrollView = contentCollectionView.enclosingScrollView {
-            scrollView.hasHorizontalScroller = true
-            scrollView.horizontalScroller?.alphaValue = 0
-            
-            scrollView.hasVerticalScroller = true
-            scrollView.verticalScroller?.alphaValue = 0
-        }
-    }
-    
-    func updateLanguage() {
-        
-    }
-    
-    func reloadData() {
-        if data.count != 0 {
-            let title = NSLocalizedString(data["title"] as! String, comment: "")
-            let subtitle = NSLocalizedString(data["subtitle"] as! String, comment: "")
-            let describe = NSLocalizedString(data["describe"] as? String ?? "", comment: "")
-            self.titleLabel.stringValue = title
-            self.subtitleLabel.stringValue = subtitle
-//            self.describeLabel.stringValue = "$79.9 \(describe)"
-            self.describeLabel.stringValue = describe
-            self.doneButton.stringValue = NSLocalizedString(data["buttonTitle"] as! String, comment: "")
-            self.doneContentView.isHidden = false
-            
-            if data["type"] as! Int == 1 {
-                self.describeLabel.isHidden = false
-                self.iconImageView.isHidden = true
-                
-                self.subtitleLabel.textColor = NSColor.km_init(hex: "#252629")
-                self.doneContentView.backgroundColor(NSColor.km_init(hex: "#FF852E"))
-                self.doneContentView.border(NSColor.km_init(hex: "#FF852E"), 0, 20)
-                self.doneButton.textColor = NSColor.km_init(hex: "#FFFFFF")
-                self.doneButton.font = NSFont.SFProTextSemiboldFont(16)
-                self.describeLabel.stringValue = "Save 50% for the first year, auto-renew at $79.9. Billed yearly."
-                
-                self.updatePrice()
-                
-            } else {
-                self.describeLabel.isHidden = true
-                self.iconImageView.isHidden = true
-                
-                self.subtitleLabel.textColor = NSColor.km_init(hex: "#616469")
-                self.doneContentView.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-                self.doneContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 20)
-                self.doneButton.textColor = NSColor.km_init(hex: "#252629")
-                self.doneButton.font = NSFont.SFProTextRegularFont(16)
-                if KMLightMemberManager.manager.isLogin() {
-                    self.doneContentView.isHidden = true
-                } else {
-                    self.doneContentView.isHidden = false
-                }
-            }
-            self.contentCollectionView.reloadData()
-        }
-        
-//        self.collectionViewContentView.addSubview(blurImageView, positioned: .above, relativeTo: scrollView)
-    }
-    
-    func updatePrice() {
-        for product in KMInAppPurchaseManager.manager.availableProducts {
-            let productId: String = self.data["productId"] as! String
-            let describe = NSLocalizedString(data["describe"] as? String ?? "", comment: "")
-            
-            if product.productIdentifier == productId {
-                KMPrint("-----------------------------")
-                KMPrint(product.priceLocale.currencyCode)
-                KMPrint(product.priceLocale.currencySymbol)
-                KMPrint(product.introductoryPrice?.price)
-                KMPrint(product.price)
-                KMPrint("-----------------------------")
-        
-                let currencySymbol: String = product.priceLocale.currencySymbol ?? "$"
-                let currencyCode: String = product.priceLocale.currencyCode ?? "$"
-                let price: String = product.introductoryPrice?.price.description ?? "39.9"
-                let originPrice: String = product.price.description
-                
-                if self.isSubscription {
-                    self.iconImageView.isHidden = true
-                    self.subtitleLabel.stringValue = "\(currencyCode) \(originPrice)"
-                } else {
-                    self.iconImageView.isHidden = false
-                    self.subtitleLabel.stringValue = "\(currencyCode)\(price)"
-                }
-                
-                let paragraphStyle = NSMutableParagraphStyle()
-                paragraphStyle.lineHeightMultiple = 1.32
-                paragraphStyle.alignment = .left
-                
-                let priceString = "\(currencyCode)\(originPrice)"
-                let describeString = NSString(format: describe as NSString, "%",priceString)
-                let attributedString = NSMutableAttributedString(string: describeString as String)
-                let range = (describeString as NSString).range(of: priceString)
-//                attributedString.addAttribute(NSAttributedString.Key.strikethroughStyle, value: NSNumber(value: NSUnderlineStyle.single.rawValue), range: range)
-                attributedString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: describeString.length))
-                self.describeLabel.attributedStringValue = attributedString
-            }
-        }
-    }
-}
-
-extension KMComparativeViewCollectionItem {
-    @IBAction func doneAction(_ sender: Any) {
-        guard let callBack = doneAction else { return }
-        
-        callBack(self, data)
-    }
-}
-
-extension KMComparativeViewCollectionItem: NSCollectionViewDataSource {
-    public func numberOfSections(in collectionView: NSCollectionView) -> Int {
-        let array: [[String: Any]] = self.data["content"] as! [[String : Any]]
-        return array.count
-    }
-    
-    public func collectionView(_ collectionView: NSCollectionView, numberOfItemsInSection section: Int) -> Int {
-        return 1
-    }
-    
-    //返回对应的item自定义个体
-    public func collectionView(_ collectionView: NSCollectionView, itemForRepresentedObjectAt indexPath: IndexPath) -> NSCollectionViewItem {
-        let view = collectionView.makeItem(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "KMComparativeViewCollectionItemItem"), for: indexPath) as! KMComparativeViewCollectionItemItem
-        let array: [[String: Any]] = self.data["content"] as! [[String : Any]]
-        view.data = array[indexPath.section]
-        return view
-    }
-}
-
-extension KMComparativeViewCollectionItem: NSCollectionViewDelegate {
-    //当item被选中
-    public func collectionView(_ collectionView: NSCollectionView, didSelectItemsAt indexPaths: Set<IndexPath>) {
-        KMPrint("点击")
-    }
-    
-   //当item取消选中
-    public func collectionView(_ collectionView: NSCollectionView, didDeselectItemsAt indexPaths: Set<IndexPath>) {
-        
-    }
-}
-
-extension KMComparativeViewCollectionItem: NSCollectionViewDelegateFlowLayout {
-    public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> NSSize {
-        let array: [[String: Any]] = self.data["content"] as! [[String : Any]]
-        let data = array[indexPath.section]
-        let string: NSString = data["title"] as! NSString
-        
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.lineHeightMultiple = 1.32
-        paragraphStyle.alignment = .left
-        let size: NSSize = string.boundingRect(with: NSSize(width: 260, height: 100), options: NSString.DrawingOptions(rawValue: 3), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12), NSAttributedString.Key.paragraphStyle : paragraphStyle]).size
-        return NSSize(width: 284, height: max(20, size.height))
-    }
-    
-//    public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
-//        return 12
-//    }
-    
-    public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, insetForSectionAt section: Int) -> NSEdgeInsets {
-        let array: [[String: Any]] = self.data["content"] as! [[String : Any]]
-        if section == array.count - 1 {
-            return NSEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
-        } else {
-            return NSEdgeInsets(top: 0, left: 0, bottom: 12, right: 0)
-        }
-    }
-
-//    public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
-//        return 12
-//    }
-}

+ 0 - 169
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/View/KMComparativeViewCollectionItem.xib

@@ -1,169 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMComparativeViewCollectionItem" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="collectionViewContentView" destination="JU3-B0-lwD" id="CDu-IW-nP6"/>
-                <outlet property="contentCollectionView" destination="9Pp-ih-jEG" id="z5w-fy-VHk"/>
-                <outlet property="describeLabel" destination="3TK-IO-Uc2" id="KKA-ma-4Aj"/>
-                <outlet property="doneBox" destination="jrx-sF-eiw" id="QsK-zK-ZTG"/>
-                <outlet property="doneButton" destination="tFQ-Lt-4na" id="bW3-ff-EoV"/>
-                <outlet property="doneContentView" destination="BFX-df-wDy" id="31A-xT-gx3"/>
-                <outlet property="iconImageView" destination="sHp-vc-P9l" id="LzG-we-xUT"/>
-                <outlet property="lineView" destination="hz2-8h-p3M" id="nww-hG-0H5"/>
-                <outlet property="scrollView" destination="2qF-pT-dP8" id="nWA-5x-xKU"/>
-                <outlet property="subtitleLabel" destination="y61-y9-dAw" id="2IR-Co-cbj"/>
-                <outlet property="titleLabel" destination="Aal-EW-4N2" id="8XP-Ds-d4a"/>
-                <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="Hz6-mo-xeY">
-            <rect key="frame" x="0.0" y="0.0" width="348" height="467"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Aal-EW-4N2">
-                    <rect key="frame" x="30" y="419" width="288" height="16"/>
-                    <textFieldCell key="cell" lineBreakMode="clipping" title="Register Member" id="u25-eB-jIR">
-                        <font key="font" usesAppearanceFont="YES"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="y61-y9-dAw">
-                    <rect key="frame" x="30" y="387" width="31" height="16"/>
-                    <textFieldCell key="cell" lineBreakMode="clipping" title="Free" id="Nmm-Ii-aJs">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="JU3-B0-lwD">
-                    <rect key="frame" x="32" y="118" width="284" height="180"/>
-                    <subviews>
-                        <scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2qF-pT-dP8">
-                            <rect key="frame" x="0.0" y="0.0" width="284" height="180"/>
-                            <clipView key="contentView" drawsBackground="NO" id="3rY-ai-zIH">
-                                <rect key="frame" x="0.0" y="0.0" width="284" height="180"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <subviews>
-                                    <collectionView id="9Pp-ih-jEG">
-                                        <rect key="frame" x="0.0" y="0.0" width="284" height="180"/>
-                                        <autoresizingMask key="autoresizingMask" widthSizable="YES"/>
-                                        <collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" id="qH9-lA-K1b">
-                                            <size key="itemSize" width="50" height="50"/>
-                                        </collectionViewFlowLayout>
-                                        <color key="primaryBackgroundColor" red="0.96862745100000003" green="0.97254901959999995" blue="0.98039215690000003" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                    </collectionView>
-                                </subviews>
-                                <color key="backgroundColor" red="0.96862745100000003" green="0.97254901959999995" blue="0.98039215690000003" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                            </clipView>
-                            <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="mw6-lw-zx6">
-                                <rect key="frame" x="-100" y="-100" width="269" height="15"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                            </scroller>
-                            <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="OYB-Vn-iBU">
-                                <rect key="frame" x="-100" y="-100" width="15" height="180"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                            </scroller>
-                        </scrollView>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="gkc-pg-xk3" customClass="KMComparativeGradientView" customModule="PDF_Master" customModuleProvider="target">
-                            <rect key="frame" x="0.0" y="0.0" width="284" height="40"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="40" id="k6w-lh-S8U"/>
-                            </constraints>
-                        </customView>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="2qF-pT-dP8" firstAttribute="top" secondItem="JU3-B0-lwD" secondAttribute="top" id="19V-04-40u"/>
-                        <constraint firstItem="gkc-pg-xk3" firstAttribute="leading" secondItem="JU3-B0-lwD" secondAttribute="leading" id="5qG-ZN-HSb"/>
-                        <constraint firstAttribute="bottom" secondItem="gkc-pg-xk3" secondAttribute="bottom" id="eyR-Va-GWE"/>
-                        <constraint firstAttribute="trailing" secondItem="2qF-pT-dP8" secondAttribute="trailing" id="g5f-fd-e2B"/>
-                        <constraint firstItem="2qF-pT-dP8" firstAttribute="leading" secondItem="JU3-B0-lwD" secondAttribute="leading" id="pHP-gP-r3J"/>
-                        <constraint firstAttribute="height" constant="180" id="sUt-m6-Pqi"/>
-                        <constraint firstAttribute="trailing" secondItem="gkc-pg-xk3" secondAttribute="trailing" id="yrx-L3-QeM"/>
-                        <constraint firstAttribute="bottom" secondItem="2qF-pT-dP8" secondAttribute="bottom" id="zna-H1-Nwa"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="hz2-8h-p3M">
-                    <rect key="frame" x="32" y="318" width="284" height="1"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="1" id="lCq-vv-wv7"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="BFX-df-wDy">
-                    <rect key="frame" x="32" y="28" width="284" height="40"/>
-                    <subviews>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tFQ-Lt-4na">
-                            <rect key="frame" x="122" y="12" width="41" height="16"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" enabled="NO" alignment="center" title="Label" id="91P-uq-jcS">
-                                <font key="font" metaFont="system"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                        <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="jrx-sF-eiw" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                            <rect key="frame" x="0.0" y="0.0" width="284" height="40"/>
-                            <view key="contentView" id="9hd-Dk-a1S">
-                                <rect key="frame" x="0.0" y="0.0" width="284" height="40"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            </view>
-                        </box>
-                    </subviews>
-                    <constraints>
-                        <constraint firstAttribute="trailing" secondItem="jrx-sF-eiw" secondAttribute="trailing" id="EpS-Yk-4xM"/>
-                        <constraint firstItem="jrx-sF-eiw" firstAttribute="top" secondItem="BFX-df-wDy" secondAttribute="top" id="P50-3T-npJ"/>
-                        <constraint firstAttribute="height" constant="40" id="Zxt-97-SSn"/>
-                        <constraint firstItem="tFQ-Lt-4na" firstAttribute="centerY" secondItem="BFX-df-wDy" secondAttribute="centerY" id="g35-cr-T7D"/>
-                        <constraint firstItem="tFQ-Lt-4na" firstAttribute="centerX" secondItem="BFX-df-wDy" secondAttribute="centerX" id="kb7-cW-t9q"/>
-                        <constraint firstAttribute="bottom" secondItem="jrx-sF-eiw" secondAttribute="bottom" id="kdp-wr-TOB"/>
-                        <constraint firstItem="jrx-sF-eiw" firstAttribute="leading" secondItem="BFX-df-wDy" secondAttribute="leading" id="qvq-Mx-kLI"/>
-                    </constraints>
-                </customView>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3TK-IO-Uc2">
-                    <rect key="frame" x="30" y="367" width="288" height="16"/>
-                    <textFieldCell key="cell" alignment="left" title="Label" id="tUs-FK-WKB">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <imageView hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="sHp-vc-P9l">
-                    <rect key="frame" x="67" y="383" width="80" height="24"/>
-                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="Badge" id="aiz-s6-Vnu"/>
-                </imageView>
-            </subviews>
-            <constraints>
-                <constraint firstItem="3TK-IO-Uc2" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="32" id="2ov-ky-djW"/>
-                <constraint firstItem="sHp-vc-P9l" firstAttribute="leading" secondItem="y61-y9-dAw" secondAttribute="trailing" constant="8" id="BmZ-jv-VhC"/>
-                <constraint firstAttribute="trailing" secondItem="hz2-8h-p3M" secondAttribute="trailing" constant="32" id="DOy-GW-3OQ"/>
-                <constraint firstItem="Aal-EW-4N2" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="32" id="IJ3-VJ-Emz"/>
-                <constraint firstAttribute="trailing" secondItem="BFX-df-wDy" secondAttribute="trailing" constant="32" id="KAG-DU-qiH"/>
-                <constraint firstItem="3TK-IO-Uc2" firstAttribute="top" secondItem="y61-y9-dAw" secondAttribute="bottom" constant="4" id="LOW-rs-eQG"/>
-                <constraint firstAttribute="trailing" secondItem="JU3-B0-lwD" secondAttribute="trailing" constant="32" id="Lcg-Da-ur1"/>
-                <constraint firstAttribute="trailing" secondItem="Aal-EW-4N2" secondAttribute="trailing" constant="32" id="M6k-Zs-OeN"/>
-                <constraint firstItem="sHp-vc-P9l" firstAttribute="centerY" secondItem="y61-y9-dAw" secondAttribute="centerY" id="P2i-yi-eGm"/>
-                <constraint firstItem="Aal-EW-4N2" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="32" id="UUF-tu-jje"/>
-                <constraint firstItem="y61-y9-dAw" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="32" id="XgI-xM-8WU"/>
-                <constraint firstItem="BFX-df-wDy" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="32" id="act-gs-xBl"/>
-                <constraint firstItem="hz2-8h-p3M" firstAttribute="top" secondItem="y61-y9-dAw" secondAttribute="bottom" constant="68" id="cQa-Sy-L12"/>
-                <constraint firstItem="y61-y9-dAw" firstAttribute="top" secondItem="Aal-EW-4N2" secondAttribute="bottom" constant="16" id="fYz-ls-H9I"/>
-                <constraint firstAttribute="trailing" secondItem="3TK-IO-Uc2" secondAttribute="trailing" constant="32" id="l9l-rM-6KK"/>
-                <constraint firstAttribute="bottom" secondItem="BFX-df-wDy" secondAttribute="bottom" constant="28" id="mN6-oW-yS9"/>
-                <constraint firstItem="JU3-B0-lwD" firstAttribute="top" secondItem="hz2-8h-p3M" secondAttribute="bottom" constant="20" id="mk3-nP-iYQ"/>
-                <constraint firstItem="hz2-8h-p3M" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="32" id="uN3-zv-arS"/>
-                <constraint firstItem="JU3-B0-lwD" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="32" id="wYj-HX-NA2"/>
-            </constraints>
-            <point key="canvasLocation" x="-51" y="16.5"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="Badge" width="80" height="24"/>
-    </resources>
-</document>

+ 0 - 52
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/View/KMComparativeViewCollectionItemItem.swift

@@ -1,52 +0,0 @@
-//
-//  KMComparativeViewCollectionItemItem.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/6/25.
-//
-
-import Cocoa
-
-class KMComparativeViewCollectionItemItem: NSCollectionViewItem {
-    @IBOutlet weak var iconImageView: NSImageView!
-    @IBOutlet weak var titleLabel: NSTextField!
-    
-    var data: [String: Any] = [:] {
-        didSet {
-            self.reloadData()
-        }
-    }
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        // Do view setup here.
-        self.titleLabel.font = NSFont.SFProTextRegularFont(12)
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-    }
-    
-    func reloadData() {
-        if data.count != 0 {
-            let color = NSColor.km_init(hex: data["color"] as! String)
-            let state: Int = data["state"] as? Int ?? 0
-            let string = NSLocalizedString(data["title"] as! String, comment: "")
-            
-            if string.count > 0 {
-                if state == 2 {
-                    self.iconImageView.image = NSImage(named: "icon_info")
-                } else if state == 1 {
-                    self.iconImageView.image = NSImage(named: "tips")
-                } else if state == 0 {
-                    self.iconImageView.image = NSImage(named: "tips 1")
-                }
-            } else {
-                self.iconImageView.image = NSImage(named: "")
-            }
-            
-            self.titleLabel.textColor = color
-            
-            let paragraphStyle = NSMutableParagraphStyle()
-            paragraphStyle.lineHeightMultiple = 1.32
-            paragraphStyle.alignment = .left
-            self.titleLabel.attributedStringValue = NSMutableAttributedString(string: NSLocalizedString(string, comment: ""), attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle])
-        }
-    }
-}

+ 0 - 49
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/View/KMComparativeViewCollectionItemItem.xib

@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMComparativeViewCollectionItemItem" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="iconImageView" destination="nge-K8-16k" id="qcM-fB-1cz"/>
-                <outlet property="titleLabel" destination="77S-IT-dI0" id="Yeb-ZB-Yyo"/>
-                <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="Hz6-mo-xeY">
-            <rect key="frame" x="0.0" y="0.0" width="284" height="43"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="nge-K8-16k">
-                    <rect key="frame" x="0.0" y="14" width="16" height="16"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="16" id="0QS-mA-sq8"/>
-                        <constraint firstAttribute="height" constant="16" id="Cgv-RJ-y6k"/>
-                    </constraints>
-                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="2Ns-FZ-peU"/>
-                </imageView>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="77S-IT-dI0">
-                    <rect key="frame" x="22" y="14" width="264" height="16"/>
-                    <textFieldCell key="cell" title="Label" id="6Xk-Wh-SL6">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-            </subviews>
-            <constraints>
-                <constraint firstAttribute="trailing" secondItem="77S-IT-dI0" secondAttribute="trailing" id="3b9-75-SyX"/>
-                <constraint firstItem="nge-K8-16k" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="Ceq-9s-k9T"/>
-                <constraint firstItem="77S-IT-dI0" firstAttribute="centerY" secondItem="Hz6-mo-xeY" secondAttribute="centerY" id="gIs-hi-VkU"/>
-                <constraint firstItem="nge-K8-16k" firstAttribute="centerY" secondItem="Hz6-mo-xeY" secondAttribute="centerY" id="jEN-N8-daK"/>
-                <constraint firstItem="77S-IT-dI0" firstAttribute="leading" secondItem="nge-K8-16k" secondAttribute="trailing" constant="8" id="rev-ow-42d"/>
-            </constraints>
-            <point key="canvasLocation" x="44" y="236.5"/>
-        </customView>
-    </objects>
-</document>

+ 0 - 396
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/KMLoginWindowController.swift

@@ -1,396 +0,0 @@
-//
-//  KMLoginWindowController.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/22.
-//
-
-import Cocoa
-
-var loginWindowController: KMLoginWindowController?
-var loginMainWindow: NSWindow?
-
-typealias KMLoginWindowControllerLoginAction = (_ controller: KMLoginWindowController, _ isSuccess: Bool) -> Void
-typealias KMLoginWindowControllerRegisterAction = (_ controller: KMLoginWindowController, _ isSuccess: Bool) -> Void
-
-class KMLoginWindowController: NSWindowController {
-    @IBOutlet weak var noNetworkView: KMLightNoNetworkView!
-    @IBOutlet weak var loginView: KMLoginView!
-    @IBOutlet weak var leftView: KMLoginLeftImageView!
-    @IBOutlet weak var registerView: KMRegisterView!
-    @IBOutlet weak var verificationCodeView: KMVerificationCodeView!
-    
-    @IBOutlet weak var loginInputPasswordView: KMLoginInputPasswordView!
-    @IBOutlet weak var registerSuccessView: KMRegisterSuccessView!
-    
-    @IBOutlet weak var resetPasswordView: KMResetPasswordView!
-    
-    @IBOutlet weak var rightContentView: NSView!
-    
-    var loginAction: KMLoginWindowControllerLoginAction?
-    var registerAction: KMLoginWindowControllerRegisterAction?
-    
-    var inputType: DataNavigationViewButtonActionType?
-    var model: KMRegisterModel = KMRegisterModel()
-    
-    var currentView: NSView?
-    var logType: KMRegisterLogType = .login {
-        didSet {
-            self.reloadData()
-        }
-    }
-    
-    deinit {
-        KMPrint("KMLoginWindowController 释放")
-    }
-    
-    override func windowDidLoad() {
-        super.windowDidLoad()
-
-        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-        self.setup()
-    }
-    
-    //MARK: 打开文件
-    static func show(window: NSWindow, _ type: DataNavigationViewButtonActionType = .Batch, _ logType: KMRegisterLogType = .login) -> KMLoginWindowController? {
-        
-        var logType = logType
-//        let count = UserDefaults.standard.value(forKey: "kFirstOpenAppCount")
-//
-//        if (count as? Int == 1) {
-//            if logType == .login  {
-//                logType = .register
-//            }
-//        }
-        
-        let controller: KMLoginWindowController = KMLoginWindowController.init(windowNibName: "KMLoginWindowController")
-        controller.inputType = type
-        controller.logType = logType
-        window.beginSheet(controller.window!)
-        loginMainWindow = window
-        loginWindowController = controller
-        return controller
-    }
-    
-    override func mouseDown(with event: NSEvent) {
-        super.mouseDown(with: event)
-        self.window?.makeFirstResponder(self)
-    }
-    
-    func setup() {
-        self.window?.contentView?.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-        KMRequestServer.requestServer.reachabilityStatusChange { [weak self] status in
-            if status == .notReachable {
-                KMPrint("无网络")
-                self?.noNetworkView.isHidden = false
-            } else {
-                KMPrint("有网络")
-                self?.noNetworkView.isHidden = true
-            }
-        }
-        
-        //MARK: - 左侧订阅相关
-        self.leftView.cancelAction = { [weak self] view in
-            self?.closeWindow()
-            
-            if self?.inputType == .ComparativeTable {
-                //跳转订阅比较表
-                let _ = KMComparativeTableViewController.show(window: NSApp.mainWindow ?? NSWindow(),.loginCancel)
-            }
-        }
-        
-        self.leftView.subscriptionAction = { [weak self] view in
-            self?.closeWindow()
-            
-            //跳转订阅比较表
-            let _ = KMComparativeTableViewController.show(window: NSApp.mainWindow ?? NSWindow())
-        }
-        
-        //MARK: - 登录界面
-        //登录界面点击注册按钮
-        self.loginView.registerAction = { [weak self] (view, data) in
-            self?.logType = .register
-        }
-
-        //登录界面点击下一步按钮
-        self.loginView.nextAction = { [weak self] (view, data, sender) in
-            KMRequestServerManager.manager.verificationEmail(userName: data.email, verifyEmailType: .login) { [weak self] success, result in
-                if success {
-                    self?.model.email = data.email
-                    self?.logType = .loginInputPassword
-                } else {
-                    self?.loginView.showAlert(result: result)
-                }
-                self?.loginView.changeNextButtonState(enable: true)
-            }
-        }
-        
-        //MARK: - 注册界面
-        //注册界面点击登录按钮
-        self.registerView.loginAction = { [weak self] (view, data) in
-            self?.logType = .login
-        }
-
-        //注册界面点击下一步按钮
-        self.registerView.nextAction = { [weak self] (view, data, sender) in
-            KMRequestServerManager.manager.verificationEmail(userName: data.email, verifyEmailType: .register) { [weak self] success, result in
-                if success {
-                    self?.verificationCodeView.inputType = .register
-                    self?.verificationCodeView.model.email = data.email
-                    self?.verificationCodeView.model.password = data.password
-                    self?.verificationCodeView.cleanTimer()
-                    self?.logType = .verificationCode
-                    self?.verificationCodeView.sendVerificationCode()
-                } else {
-                    self?.registerView.showEmailAlert(result: result!)
-                }
-                self?.registerView.changeNextButtonState(enable: true)
-            }
-        }
-        
-        //注册成功界面点击完成按钮
-        self.registerSuccessView.doneAction = { [weak self] view in
-            self?.closeWindow()
-            KMPrint("注册成功")
-            //跳转订阅比较表
-            let _ = KMComparativeTableViewController.show(window: NSApp.mainWindow ?? NSWindow())
-        }
-        
-        self.registerSuccessView.subscribeAction = { [weak self] view in
-            self?.closeWindow()
-            KMComparativeTableViewController.show(window: NSApp.mainWindow ?? NSWindow())
-            KMPrint("注册成功")
-        }
-        
-        //MARK: - 验证码界面
-        //验证码界面点击取消按钮
-        self.verificationCodeView.cancelAction = { [weak self] view in
-            self?.logType = view.inputType
-        }
-        
-        //验证码界面点击完成按钮
-        self.verificationCodeView.doneAction = { [weak self] (view, data, sender) in
-            if view.inputType == .register {
-                KMRequestServerManager.manager.register(userName: data.email, password: data.password, verifyCode: data.verifyCode) { [weak self] (success, requestData, result) in
-                    if success {
-                        KMRequestServerManager.manager.getUserInfo { success, data, error, isLocal in
-                            if success {
-                                self?.logType = .registerSuccess
-                            } else {
-                                self?.verificationCodeView.showAlert(result: result)
-                            }
-                        }
-                        
-                        //restore 注册成功后校验权益
-//                        KMPurchaseManager.manager.restorePurchases { isSuccess, error in
-//                            
-//                        }
-                    } else {
-                        self?.verificationCodeView.showAlert(result: result)
-                    }
-                    self?.verificationCodeView.changeDoneButtonState(enable: true)
-                }
-            } else if view.inputType == .loginInputPassword {
-                KMRequestServerManager.manager.verificationCode(account: data.email, verifyCode: data.verifyCode, verifyCodeType: .resetPassword) { [weak self] success, result in
-                    if success {
-                        self?.resetPasswordView.model.verifyCode = data.verifyCode
-                        self?.resetPasswordView.model.email = data.email
-                        self?.logType = .resetPassword
-                    } else {
-                        self?.verificationCodeView.showAlert(result: result)
-                    }
-                    self?.verificationCodeView.changeDoneButtonState(enable: true)
-                }
-            }
-        }
-        
-        self.verificationCodeView.verificationCodeAction = { [weak self] (view, data, codeString) in
-            KMRequestServerManager.manager.verificationCode(account: data.email, verifyCode: codeString, verifyCodeType: view.verifyCodeType) { [weak self] success, result in
-                if success {
-                    self?.verificationCodeView.updateNetworkingState(complete: true, codeIsTure: true)
-                    if view.inputType == .register {
-                        KMRequestServerManager.manager.register(userName: data.email, password: data.password, verifyCode: data.verifyCode) { [weak self] (success, requestData, result) in
-                            if success {
-                                KMRequestServerManager.manager.getUserInfo { [weak self] success, data, error, isLocal in
-                                    if success {
-                                        self?.logType = .registerSuccess
-                                    } else {
-                                        self?.verificationCodeView.showAlert(result: result)
-                                    }
-                                }
-                                
-                                //restore 注册成功后校验权益
-//                                KMPurchaseManager.manager.restorePurchases { isSuccess, error in
-//                                    
-//                                }
-                            } else {
-                                self?.verificationCodeView.showAlert(result: result)
-                            }
-                            self?.verificationCodeView.changeDoneButtonState(enable: true)
-                        }
-                    } else if view.inputType == .loginInputPassword {
-                        KMRequestServerManager.manager.verificationCode(account: data.email, verifyCode: data.verifyCode, verifyCodeType: .resetPassword) { [weak self] success, result in
-                            if success {
-                                self?.resetPasswordView.model.verifyCode = data.verifyCode
-                                self?.resetPasswordView.model.email = data.email
-                                self?.logType = .resetPassword
-                            } else {
-                                self?.verificationCodeView.showAlert(result: result)
-                            }
-                            self?.verificationCodeView.changeDoneButtonState(enable: true)
-                        }
-                    }
-                } else {
-                    self?.verificationCodeView.updateNetworkingState(complete: true, codeIsTure: false)
-                    self?.verificationCodeView.showAlert(result: result)
-                }
-            }
-        }
-        
-        //验证码界面点击重新发送验证码按钮
-        self.verificationCodeView.reSendAction = { [unowned self] (view, textView) in
-            KMRequestServerManager.manager.getVerifyCode(verifyCodeType: self.verificationCodeView.verifyCodeType, email: self.verificationCodeView.model.email) { [weak self] success, result in
-                if success {
-                    self?.verificationCodeView.resetTimer()
-                } else {
-                    self?.verificationCodeView.showAlert(result: result!)
-                }
-                textView.isSelectable = true
-                textView.alphaValue = 1
-            }
-        }
-        
-        
-        //MARK: - 输入密码界面
-        //登录输入密码界面点击登录按钮
-        self.loginInputPasswordView.loginAction = { [weak self] (view, data, sender) in
-            KMRequestServerManager.manager.login(email: data.email, password: data.password) { [weak self] success, requestData, result in
-                if success {
-                    KMRequestServerManager.manager.getUserInfo { success, data, error, isLocal in
-                        if success {
-                            self?.closeWindow()
-                            if self?.inputType == .ComparativeTable && (KMLightMemberManager.manager.purchaseState != .subscription &&
-                                                                  KMLightMemberManager.manager.purchaseState != .trial) {
-                                //跳转订阅比较表
-                                let _ = KMComparativeTableViewController.show(window: NSApp.mainWindow ?? NSWindow(), .loginSuccess)
-                            }
-                            //restore 登录成功后校验权益
-//                            KMPurchaseManager.manager.restorePurchases { isSuccess, error in
-//                                
-//                            }
-                        }
-                    }
-                } else {
-                    self?.loginInputPasswordView.showAlert(result: result)
-                }
-                self?.loginInputPasswordView.changeLoginButtonState(enable: true)
-            }
-        }
-        
-        //登录输入密码界面点击忘记密码按钮
-        self.loginInputPasswordView.forgotPasswordAction = { [weak self] (view, data) in
-//            KMRequestServerManager.manager.getVerifyCode(verifyCodeType: .resetPassword, email: data.email) { success, result in
-//                if success {
-                    self?.verificationCodeView.inputType = .loginInputPassword
-                    self?.verificationCodeView.model.email = data.email
-                    self?.verificationCodeView.cleanTimer()
-                    self?.logType = .verificationCode
-                    self?.verificationCodeView.sendVerificationCode()
-//                } else {
-//                    self.loginInputPasswordView.showAlert(result: result)
-//                }
-//            }
-        }
-        
-        //登录输入密码界面点击调整邮箱按钮
-        self.loginInputPasswordView.changeEmailAction = { [weak self] view in
-            self?.logType = .login
-        }
-        
-        //MARK: - 重置密码界面
-        //重置密码界面点击完成按钮
-        self.resetPasswordView.doneAction = { [weak self] (view, data, sender) in
-            KMRequestServerManager.manager.resetPassword(account: data.email, firstPassword: data.password, secondPassword: data.rePassword, verifyCode: data.verifyCode) {[weak self] (success, result) in
-                if success {
-                    self?.model.email = data.email
-                    self?.logType = .login
-                } else {
-                    self?.verificationCodeView.showAlert(result: result!)
-                }
-                self?.resetPasswordView.changeDoneButtonState(enable: true)
-            }
-        }
-        
-        self.reloadData()
-    }
-    
-    func reloadData() {
-        guard self.rightContentView != nil else {
-            return
-        }
-        
-        for view in self.rightContentView.subviews {
-            view.isHidden = true
-        }
-        
-        self.leftView.logType = self.logType
-        
-        switch self.logType {
-        case .login:
-            self.loginView.isHidden = false
-            self.loginView.model.email = self.model.email
-            self.window?.makeFirstResponder(self.loginView.emailTextField)
-        case .register:
-            self.registerView.isHidden = false
-            self.window?.makeFirstResponder(self.registerView.emailTextField)
-        case .resetPassword:
-//            self.resetPasswordView.resetData()
-            self.resetPasswordView.email = self.model.email
-            self.resetPasswordView.isHidden = false
-            self.window?.makeFirstResponder(self.resetPasswordView.passwordSecureTextField)
-        case .verificationCode:
-            self.verificationCodeView.isHidden = false
-            self.window?.makeFirstResponder(self.verificationCodeView.code1TextField.textField)
-        case .registerSuccess:
-            self.registerSuccessView.isHidden = false
-        case .loginInputPassword:
-            self.loginInputPasswordView.email = self.model.email
-            self.loginInputPasswordView.isHidden = false
-            if self.loginInputPasswordView.model.secure {
-                self.window?.makeFirstResponder(self.loginInputPasswordView.passwordSecureTextField)
-            } else {
-                self.window?.makeFirstResponder(self.loginInputPasswordView.passwordTextField)
-            }
-        default:
-            break
-        }
-    }
-    
-    func closeWindow() {
-        if loginWindowController != nil && loginMainWindow != nil {
-            loginWindowController!.window!.close()
-            loginMainWindow?.endSheet(loginWindowController!.window!)
-        }
-        
-        loginWindowController = nil
-        loginMainWindow = nil
-    }
-    
-    static func fetchSampleController() -> KMLoginWindowController? {
-        for window in NSApp.windows {
-            let controller = window.windowController
-            if controller is KMLoginWindowController {
-                return controller as! KMLoginWindowController
-            }
-        }
-        
-        return nil
-    }
-}
-
-
-protocol KMLoginWindowControllerNetworking: KMLoginWindowController {}
-
-extension KMLoginWindowController: KMLoginWindowControllerNetworking {
-    
-}

+ 0 - 113
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/KMLoginWindowController.xib

@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22154" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22154"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMLoginWindowController" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="leftView" destination="QLc-m8-vVs" id="giL-d7-2ml"/>
-                <outlet property="loginInputPasswordView" destination="mj9-5T-uMF" id="JQC-FQ-FlJ"/>
-                <outlet property="loginView" destination="X8l-4v-zsK" id="93E-eu-ceB"/>
-                <outlet property="noNetworkView" destination="U3b-CL-heW" id="1pP-dd-hn6"/>
-                <outlet property="registerSuccessView" destination="CZn-YG-gkh" id="wHR-SV-gaW"/>
-                <outlet property="registerView" destination="L2I-Hq-i6b" id="EVh-D3-fN3"/>
-                <outlet property="resetPasswordView" destination="OAY-pB-NyQ" id="nR5-8a-3kI"/>
-                <outlet property="rightContentView" destination="nmT-zT-r6u" id="7BM-dz-S5q"/>
-                <outlet property="verificationCodeView" destination="qVo-uP-AF7" id="zgt-Wp-9mX"/>
-                <outlet property="window" destination="F0z-JX-Cv5" id="JNd-m7-L56"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="F0z-JX-Cv5">
-            <windowStyleMask key="styleMask" titled="YES"/>
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="664" height="420"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
-            <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="664" height="420"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="QLc-m8-vVs" customClass="KMLoginLeftImageView" customModule="PDF_Master" customModuleProvider="target">
-                        <rect key="frame" x="0.0" y="0.0" width="260" height="420"/>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="260" id="cS8-vT-Pxf"/>
-                        </constraints>
-                    </customView>
-                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="nmT-zT-r6u">
-                        <rect key="frame" x="260" y="0.0" width="404" height="420"/>
-                        <subviews>
-                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="X8l-4v-zsK" customClass="KMLoginView" customModule="PDF_Master" customModuleProvider="target">
-                                <rect key="frame" x="0.0" y="0.0" width="404" height="420"/>
-                            </customView>
-                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="OAY-pB-NyQ" customClass="KMResetPasswordView" customModule="PDF_Master" customModuleProvider="target">
-                                <rect key="frame" x="0.0" y="0.0" width="404" height="420"/>
-                            </customView>
-                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="mj9-5T-uMF" customClass="KMLoginInputPasswordView" customModule="PDF_Master" customModuleProvider="target">
-                                <rect key="frame" x="0.0" y="0.0" width="404" height="420"/>
-                            </customView>
-                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="CZn-YG-gkh" customClass="KMRegisterSuccessView" customModule="PDF_Master" customModuleProvider="target">
-                                <rect key="frame" x="0.0" y="0.0" width="404" height="420"/>
-                            </customView>
-                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="qVo-uP-AF7" customClass="KMVerificationCodeView" customModule="PDF_Master" customModuleProvider="target">
-                                <rect key="frame" x="0.0" y="0.0" width="404" height="420"/>
-                            </customView>
-                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="L2I-Hq-i6b" customClass="KMRegisterView" customModule="PDF_Master" customModuleProvider="target">
-                                <rect key="frame" x="0.0" y="0.0" width="404" height="420"/>
-                            </customView>
-                        </subviews>
-                        <constraints>
-                            <constraint firstItem="X8l-4v-zsK" firstAttribute="leading" secondItem="nmT-zT-r6u" secondAttribute="leading" id="0os-F2-USs"/>
-                            <constraint firstAttribute="trailing" secondItem="OAY-pB-NyQ" secondAttribute="trailing" id="2Nj-ey-ppu"/>
-                            <constraint firstItem="mj9-5T-uMF" firstAttribute="leading" secondItem="nmT-zT-r6u" secondAttribute="leading" id="4zn-mp-bTa"/>
-                            <constraint firstAttribute="bottom" secondItem="CZn-YG-gkh" secondAttribute="bottom" id="5ZP-5I-DKk"/>
-                            <constraint firstItem="L2I-Hq-i6b" firstAttribute="leading" secondItem="nmT-zT-r6u" secondAttribute="leading" id="9fU-vO-VqB"/>
-                            <constraint firstItem="mj9-5T-uMF" firstAttribute="top" secondItem="nmT-zT-r6u" secondAttribute="top" id="By9-kK-PbR"/>
-                            <constraint firstItem="L2I-Hq-i6b" firstAttribute="top" secondItem="nmT-zT-r6u" secondAttribute="top" id="Bys-y5-SQH"/>
-                            <constraint firstAttribute="trailing" secondItem="CZn-YG-gkh" secondAttribute="trailing" id="FGs-rP-Dg9"/>
-                            <constraint firstAttribute="bottom" secondItem="X8l-4v-zsK" secondAttribute="bottom" id="H2G-UC-1Un"/>
-                            <constraint firstItem="X8l-4v-zsK" firstAttribute="top" secondItem="nmT-zT-r6u" secondAttribute="top" id="IHs-E9-4U8"/>
-                            <constraint firstAttribute="trailing" secondItem="mj9-5T-uMF" secondAttribute="trailing" id="JcY-GB-Ued"/>
-                            <constraint firstAttribute="trailing" secondItem="X8l-4v-zsK" secondAttribute="trailing" id="Pa2-vc-ns3"/>
-                            <constraint firstItem="CZn-YG-gkh" firstAttribute="top" secondItem="nmT-zT-r6u" secondAttribute="top" id="Ptj-lD-uFQ"/>
-                            <constraint firstAttribute="bottom" secondItem="L2I-Hq-i6b" secondAttribute="bottom" id="V6E-RP-LxZ"/>
-                            <constraint firstItem="OAY-pB-NyQ" firstAttribute="leading" secondItem="nmT-zT-r6u" secondAttribute="leading" id="W3m-l4-2Vg"/>
-                            <constraint firstAttribute="trailing" secondItem="qVo-uP-AF7" secondAttribute="trailing" id="Xdo-Nd-vqM"/>
-                            <constraint firstAttribute="bottom" secondItem="mj9-5T-uMF" secondAttribute="bottom" id="Yhy-fs-7ZS"/>
-                            <constraint firstAttribute="bottom" secondItem="OAY-pB-NyQ" secondAttribute="bottom" id="cZG-nL-0m3"/>
-                            <constraint firstAttribute="trailing" secondItem="L2I-Hq-i6b" secondAttribute="trailing" id="fKB-pZ-MR8"/>
-                            <constraint firstItem="CZn-YG-gkh" firstAttribute="leading" secondItem="nmT-zT-r6u" secondAttribute="leading" id="m1b-ct-jll"/>
-                            <constraint firstItem="qVo-uP-AF7" firstAttribute="leading" secondItem="nmT-zT-r6u" secondAttribute="leading" id="q9G-TN-KJx"/>
-                            <constraint firstItem="qVo-uP-AF7" firstAttribute="top" secondItem="nmT-zT-r6u" secondAttribute="top" id="rAT-aT-nY8"/>
-                            <constraint firstAttribute="bottom" secondItem="qVo-uP-AF7" secondAttribute="bottom" id="s1f-Vm-Esh"/>
-                            <constraint firstItem="OAY-pB-NyQ" firstAttribute="top" secondItem="nmT-zT-r6u" secondAttribute="top" id="xSj-tB-sPq"/>
-                        </constraints>
-                    </customView>
-                    <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="U3b-CL-heW" customClass="KMLightNoNetworkView" customModule="PDF_Master" customModuleProvider="target">
-                        <rect key="frame" x="260" y="0.0" width="404" height="420"/>
-                    </customView>
-                </subviews>
-                <constraints>
-                    <constraint firstAttribute="trailing" secondItem="U3b-CL-heW" secondAttribute="trailing" id="GIf-rb-z5Y"/>
-                    <constraint firstAttribute="bottom" secondItem="QLc-m8-vVs" secondAttribute="bottom" id="J9K-Gf-Rj2"/>
-                    <constraint firstAttribute="bottom" secondItem="nmT-zT-r6u" secondAttribute="bottom" id="Uxm-nC-FIV"/>
-                    <constraint firstItem="U3b-CL-heW" firstAttribute="leading" secondItem="QLc-m8-vVs" secondAttribute="trailing" id="W8x-ED-m7x"/>
-                    <constraint firstItem="QLc-m8-vVs" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="Xdj-hv-Ia0"/>
-                    <constraint firstItem="nmT-zT-r6u" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="gco-0q-uOm"/>
-                    <constraint firstItem="nmT-zT-r6u" firstAttribute="leading" secondItem="QLc-m8-vVs" secondAttribute="trailing" id="h6Y-bw-QOc"/>
-                    <constraint firstAttribute="bottom" secondItem="U3b-CL-heW" secondAttribute="bottom" id="kzs-D4-7EX"/>
-                    <constraint firstAttribute="trailing" secondItem="nmT-zT-r6u" secondAttribute="trailing" id="oAq-ne-yC7"/>
-                    <constraint firstItem="U3b-CL-heW" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="ose-pe-h4g"/>
-                    <constraint firstItem="QLc-m8-vVs" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="yMx-Vz-uyR"/>
-                </constraints>
-            </view>
-            <connections>
-                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
-            </connections>
-            <point key="canvasLocation" x="51" y="-86"/>
-        </window>
-    </objects>
-</document>

+ 0 - 178
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/Presenter/KMRegisterPresenter.swift

@@ -1,178 +0,0 @@
-//
-//  KMRegisterPresenter.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/23.
-//
-
-import Cocoa
-
-class KMRegisterPresenter: NSObject {
-    lazy var model: KMRegisterModel = KMRegisterModel()
-    var view: NSView?
-    fileprivate weak var delegate: KMRegisterPresenterDelegate?
-    
-}
-
-extension KMRegisterPresenter: KMRegisterPresenterProtocol {
-    /**
-     初始化presenter
-     */
-    func initPresenter(view: KMRegisterPresenterDelegate, data: KMRegisterModel) {
-        self.delegate = view
-        self.model = data
-        
-        self.delegate?.showData(presenter: self, data: self.model)
-    }
-    
-    func changePassword(string: String) {
-        self.model.password = string
-        self.refreshNextState()
-        
-        self.delegate?.showData(presenter: self, data: self.model)
-    }
-    
-    func changeEmail(string: String) {
-        self.model.email = string
-        self.refreshNextState()
-        
-        self.delegate?.showData(presenter: self, data: self.model)
-    }
-    
-    func changeSecure(secure: Bool) {
-        self.model.secure = secure
-        
-        self.delegate?.showData(presenter: self, data: self.model)
-    }
-    
-    func changeRePassword(string: String) {
-        self.model.rePassword = string
-        self.refreshNextState()
-        
-        self.delegate?.showData(presenter: self, data: self.model)
-    }
-    
-    func changeReSecure(secure: Bool) {
-        self.model.reSecure = secure
-        
-        self.delegate?.showData(presenter: self, data: self.model)
-    }
-    
-    func refreshNextState() {
-        let isEmailSuccess = KMRegisterPresenter.verificationEmail(self.model.email)
-        let isPasswordSuccess = self.model.password.count >= 6 && self.model.password.count <= 24 && !self.model.password.contains(" ")
-        let isRePasswordSuccess = self.model.rePassword.count >= 6 && self.model.rePassword.count <= 24 && !self.model.rePassword.contains(" ")
-        
-        if isEmailSuccess || self.model.email.count == 0 {
-            self.model.emailAlertType = .unknown
-        } else {
-            self.model.emailAlertType = .EXCEPTION_MSG_EMAIL_INVALID
-        }
-        
-        
-        if self.model.password.count == 0 {
-            self.model.passwordAlertType = .unknown
-        } else if self.model.password.count < 6 && self.model.password.count != 0 {
-            self.model.passwordAlertType = .EXCEPTION_MSG_PASSWORD_SIZE_MIN
-        } else if self.model.password.count > 24 {
-            self.model.passwordAlertType = .EXCEPTION_MSG_PASSWORD_SIZE_MAX
-        } else if self.model.password.contains(" ") {
-            self.model.passwordAlertType = .EXCEPTION_MSG_PASSWORD_CONTAIN_EMRTY
-        } else {
-            self.model.passwordAlertType = .unknown
-        }
-        
-        if self.model.rePassword.count == 0 {
-            self.model.rePasswordAlertType = .unknown
-        } else if self.model.rePassword.count < 6 && self.model.rePassword.count != 0 {
-            self.model.rePasswordAlertType = .EXCEPTION_MSG_PASSWORD_SIZE_MIN
-        } else if self.model.rePassword.count > 24 {
-            self.model.rePasswordAlertType = .EXCEPTION_MSG_PASSWORD_SIZE_MAX
-        } else if self.model.rePassword.contains(" ") {
-            self.model.rePasswordAlertType = .EXCEPTION_MSG_PASSWORD_CONTAIN_EMRTY
-        } else {
-            self.model.rePasswordAlertType = .unknown
-        }
-        
-        
-        var canNext = false
-        switch self.model.logType {
-        case .login:
-            canNext = isEmailSuccess && isPasswordSuccess
-        case .register:
-            canNext = isEmailSuccess && isPasswordSuccess
-        case .resetPassword:
-            canNext = isRePasswordSuccess && isPasswordSuccess && (self.model.password == self.model.rePassword)
-        default:
-            break
-        }
-        self.model.canNext = canNext
-    }
-    
-    func cleanAll() {
-        self.delegate?.showData(presenter: self, data: self.model)
-    }
-    
-    func free() {
-        view = nil
-        delegate = nil
-    }
-}
-
-
-protocol KMRegisterPresenterDelegate: AnyObject {
-    /**
-     @abstract 回调,返回处理后的数据<KMBatchProcessingViewModel>类型
-     @param presenter
-     @param data 返回数据
-     */
-    func showData(presenter: KMRegisterPresenter, data: KMRegisterModel)
-    
-    //警告
-    func showAlert(presenter: KMRegisterPresenter, data: KMRegisterModel)
-}
-
-protocol KMRegisterPresenterProtocol {
-    /**
-     @abstract 绑定视图与数据
-     @param view 视图
-     @param data 资源 <KMBatchProcessingViewModel>类型
-     */
-    func initPresenter(view: KMRegisterPresenterDelegate, data: KMRegisterModel)
-    
-    func changePassword(string: String)
-    func changeRePassword(string: String)
-    
-    func changeEmail(string: String)
-    
-    func changeSecure(secure: Bool)
-    func changeReSecure(secure: Bool)
-    
-
-    func refreshNextState()
-    /**
-     @abstract 解除绑定
-     */
-    func free()
-}
-
-
-extension KMRegisterPresenter {
-    /**
-     邮箱验证
-     */
-    static func verificationEmail(_ email: String ) -> Bool {
-        do {
-            let pattern = "^([a-z0-9_\\.-]+)@([\\da-z\\.-]+)\\.([a-z\\.]{2,6})$"
-            let regex = try? NSRegularExpression(pattern: pattern, options: NSRegularExpression.Options.caseInsensitive)
-            let res = regex?.matches(in: email, range: NSRange(location: 0, length: email.count))
-            
-            if (res?.count != 0) {
-                return true
-            } else {
-                return false
-            }
-        }
-    }
-}
-

+ 0 - 50
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLightNoNetworkView.swift

@@ -1,50 +0,0 @@
-//
-//  KMLightNoNetworkView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/3/9.
-//
-
-import Cocoa
-
-class KMLightNoNetworkView: BaseXibView {
-
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var subtitleLabel: NSTextField!
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    
-    func setup() {
-       
-        
-        self.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-        
-        self.titleLabel.font = NSFont.SFProTextRegularFont(14.0)
-        self.titleLabel.textColor = NSColor.km_init(hex: "#616469")
-        
-        self.subtitleLabel.font = NSFont.SFProTextRegularFont(12.0)
-        self.subtitleLabel.textColor = NSColor.km_init(hex: "#94989C")
-    }
-    
-    func updateLanguage() {
- 
-        self.titleLabel.stringValue = NSLocalizedString("No network detected", comment: "")
-        
-        let title = NSLocalizedString("To access your files, please connect to the Internet and try again.", comment: "")
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.lineHeightMultiple = 1.32
-        paragraphStyle.alignment = .center
-        self.subtitleLabel.attributedStringValue = NSMutableAttributedString(string: title, attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle, .foregroundColor : NSColor.km_init(hex: "#94989C")])
-        
-    }
-    
-    func reloadData() {
- 
-    }
-    
-    
-}

+ 0 - 63
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLightNoNetworkView.xib

@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMLightNoNetworkView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="subtitleLabel" destination="uX9-qS-yeu" id="VD3-VH-B2K"/>
-                <outlet property="titleLabel" destination="fMD-gC-2Kk" id="AVZ-R6-AOM"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="404" height="420"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="yMm-1P-aWD">
-                    <rect key="frame" x="138" y="188" width="128" height="128"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="128" id="CvG-tr-jGf"/>
-                        <constraint firstAttribute="height" constant="128" id="OGo-hL-cj6"/>
-                    </constraints>
-                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="icon_noInternet" id="Fe0-18-nxh"/>
-                </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fMD-gC-2Kk">
-                    <rect key="frame" x="136" y="156" width="132" height="16"/>
-                    <textFieldCell key="cell" lineBreakMode="clipping" title="No network detected" id="sjO-4C-29a">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uX9-qS-yeu">
-                    <rect key="frame" x="30" y="122" width="344" height="32"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="340" id="DBk-tQ-DfQ"/>
-                    </constraints>
-                    <textFieldCell key="cell" alignment="center" title="To access your files, please connect to the Internet and try again." id="ozE-uV-43P">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-            </subviews>
-            <constraints>
-                <constraint firstItem="yMm-1P-aWD" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" multiplier="0.8" id="9HH-Gt-xl0"/>
-                <constraint firstItem="fMD-gC-2Kk" firstAttribute="top" secondItem="yMm-1P-aWD" secondAttribute="bottom" constant="16" id="DeD-A6-1re"/>
-                <constraint firstItem="uX9-qS-yeu" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="N3V-gD-AoM"/>
-                <constraint firstItem="fMD-gC-2Kk" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="eix-vD-jb9"/>
-                <constraint firstItem="uX9-qS-yeu" firstAttribute="top" secondItem="fMD-gC-2Kk" secondAttribute="bottom" constant="2" id="sVt-ID-mSS"/>
-                <constraint firstItem="yMm-1P-aWD" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="xLv-Gs-iLI"/>
-            </constraints>
-            <point key="canvasLocation" x="32" y="233"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="icon_noInternet" width="128" height="128"/>
-    </resources>
-</document>

+ 0 - 265
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginInputPasswordView.swift

@@ -1,265 +0,0 @@
-//
-//  KMLoginInputPasswordView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/25.
-//
-
-import Cocoa
-
-typealias KMLoginInputPasswordViewChangeEmailAction = (_ view: KMLoginInputPasswordView) -> Void
-typealias KMLoginInputPasswordViewLoginAction = (_ view: KMLoginInputPasswordView, _ data: KMRegisterModel, _ sender: NSButton) -> Void
-typealias KMLoginInputPasswordViewforgotPasswordAction = (_ view: KMLoginInputPasswordView, _ data: KMRegisterModel) -> Void
-class KMLoginInputPasswordView: BaseXibView {
-
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var describeLable: NSTextField!
-    @IBOutlet weak var passwordContentView: NSView!
-    @IBOutlet weak var passwordTextField: FocusAwareTextField!
-    @IBOutlet weak var passwordSecureTextField: FocusAwareSecureTextField!
-    @IBOutlet weak var showButton: NSButton!
-    @IBOutlet weak var passwordAlertLabel: NSTextField!
-    @IBOutlet weak var loginButton: NSButton!
-    @IBOutlet weak var forgotPasswordButton: NSButton!
-    @IBOutlet weak var alertView: KMLightMemberAlertView!
-    @IBOutlet var emailTextView: NSTextView!
-    
-    var loginButtonVC: KMDesignButton!
-    
-    var changeEmailAction: KMLoginInputPasswordViewChangeEmailAction?
-    var loginAction: KMLoginInputPasswordViewLoginAction?
-    var forgotPasswordAction: KMLoginInputPasswordViewforgotPasswordAction?
-    
-    var presenter: KMRegisterPresenter = KMRegisterPresenter()
-    var email: String = "" {
-        didSet {
-            self.model.email = self.email
-            self.passwordTextField.stringValue = ""
-            self.passwordSecureTextField.stringValue = ""
-            self.updateLanguage()
-        }
-    }
-    var model: KMRegisterModel = KMRegisterModel()
-
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    func setup() {
-        
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-        self.titleLabel.font = NSFont.SFProTextSemiboldFont(20.0)
-        
-        self.emailTextView.delegate = self
-        self.emailTextView.isEditable = false
-        self.emailTextView.frame = (self.emailTextView.enclosingScrollView?.contentView.bounds)!
-        self.emailTextView.autoresizingMask = [.width, .height]
-        
-        self.describeLable.textColor = NSColor.km_init(hex: "#252629")
-        self.describeLable.font = NSFont.SFProTextRegularFont(14.0)
-        
-        self.passwordAlertLabel.textColor = NSColor.km_init(hex: "#F3465B")
-        self.passwordAlertLabel.font = NSFont.SFProTextRegularFont(12.0)
-        
-        self.forgotPasswordButton.font = NSFont.SFProTextRegularFont(12.0)
-        self.forgotPasswordButton.contentTintColor = NSColor.km_init(hex: "#1770F4")
-        
-        self.passwordTextField.delegate = self
-        self.passwordTextField.onFocus = {
-            self.passwordContentView.border(NSColor.km_init(hex: "#1770F4"), 1, 4)
-        }
-        
-        self.passwordSecureTextField.delegate = self
-        self.passwordSecureTextField.onFocus = {
-            self.passwordContentView.border(NSColor.km_init(hex: "#1770F4"), 1, 4)
-        }
-        
-        self.loginButtonVC = KMDesignButton(withType: .Text)
-        self.loginButton.addSubview(self.loginButtonVC.view)
-        self.loginButtonVC?.view.frame = self.loginButton.bounds
-        self.loginButtonVC.target = self
-        self.loginButtonVC.action = #selector(loginButtonAction)
-        self.loginButtonVC.button(type: .Cta, size: .m)
-        self.loginButtonVC.button.keyEquivalent = KMKeyEquivalent.enter
-        
-        self.emailTextView.delegate = self
-        self.presenter.initPresenter(view: self, data: self.model)
-        self.passwordTextField.becomeFirstResponder()
-    }
-    
-    func reloadData() {
-        
-        if self.model.secure {
-            self.showButton.image = NSImage(named: "icon_btn_hide")
-            self.passwordTextField.isHidden = true
-            self.passwordSecureTextField.isHidden = false
-        } else {
-            self.showButton.image = NSImage(named: "icon_btn_show")
-            self.passwordTextField.isHidden = false
-            self.passwordSecureTextField.isHidden = true
-        }
-        
-        if self.model.canNext {
-            self.loginButtonVC.enabled = true
-        } else {
-            self.loginButtonVC.enabled = false
-        }
-    
-        
-        self.passwordTextField.stringValue = self.model.password
-        self.passwordSecureTextField.stringValue = self.model.password
-        self.passwordAlertLabel.stringValue = NSLocalizedString(KMRequestServerErrorCodeType.typeOfMessage(type: self.model.passwordAlertType), comment: "")
-    }
-    
-    func updateUI() {
-       
-        //password
-        self.passwordContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
-        self.passwordTextField.textColor = NSColor.km_init(hex: "#252629")
-        self.passwordTextField.font = NSFont.SFProTextRegularFont(14.0)
-        self.passwordTextField.border(NSColor.km_init(hex: "#FFFFFF"), 1, 0)
-        
-        self.passwordSecureTextField.textColor = NSColor.km_init(hex: "#252629")
-        self.passwordSecureTextField.font = NSFont.SFProTextRegularFont(14.0)
-        self.passwordSecureTextField.border(NSColor.km_init(hex: "#FFFFFF"), 1, 0)
-        
-        self.passwordAlertLabel.textColor = NSColor.km_init(hex: "#F3465B")
-        self.passwordAlertLabel.font = NSFont.SFProTextRegularFont(12.0)
-    }
-    
-    func updateLanguage() {
-        
-        self.titleLabel.stringValue = NSLocalizedString("Log In", comment: "")
-        
-       
-        self.describeLable.stringValue = NSLocalizedString("Enter password", comment: "")
-        
-        self.loginButtonVC.stringValue = NSLocalizedString("Log In", comment: "")
-        self.passwordTextField.placeholderAttributedString = NSAttributedString(string: NSLocalizedString("Enter your password", comment: ""), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(14.0), NSAttributedString.Key.foregroundColor: NSColor.km_init(hex: "#94989C") ])
-        
-
-        self.passwordSecureTextField.placeholderAttributedString = NSAttributedString(string: NSLocalizedString("Enter your password", comment: ""), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(14.0), NSAttributedString.Key.foregroundColor: NSColor.km_init(hex: "#94989C") ])
-    
-        self.passwordAlertLabel.stringValue = NSLocalizedString(KMRequestServerErrorCodeType.typeOfMessage(type: self.model.passwordAlertType), comment: "")
-        
-        self.forgotPasswordButton.title = NSLocalizedString("Forgot your password?", comment: "")
-        
-        
-        //singin
-        let string = self.model.email + "  " + NSLocalizedString("Change Email", comment: "")
-        let attributedString = NSMutableAttributedString.init(string: string)
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.alignment = .left;
-        attributedString.addAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#252629"),
-                                        NSAttributedString.Key.paragraphStyle : paragraphStyle],
-                                    range: NSRange(location: 0, length: string.count))
-
-        let range = string.range(of: NSLocalizedString("Change Email", comment: ""))
-        attributedString.setAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#1770F4"),
-                                        NSAttributedString.Key.underlineColor : NSColor.clear,
-                                        NSAttributedString.Key.link : "changeEmail://"],
-                                       range: string.nsRange(from: range!)!)
-
-        self.emailTextView.textStorage?.setAttributedString(attributedString)
-    }
-}
-
-protocol KMLoginInputPasswordViewAction {}
-extension KMLoginInputPasswordView: KMLoginInputPasswordViewAction  {
-    @IBAction func loginButtonAction(_ sender: NSButton) {
-        guard let callBack = loginAction else { return }
-        
-        self.changeLoginButtonState(enable: false)
-        callBack(self, self.model, sender)
-    }
-    
-    @IBAction func forgotPasswordButtonAction(_ sender: Any) {
-        guard let callBack = forgotPasswordAction else { return }
-        
-        callBack(self, self.model)
-    }
-    
-    @IBAction func showButton(_ sender: Any) {
-        self.presenter.changeSecure(secure: !self.model.secure)
-        if self.model.secure {
-            self.passwordSecureTextField.becomeFirstResponder()
-        } else {
-            self.passwordTextField.becomeFirstResponder()
-        }
-        self.reloadData()
-    }
-    
-    func showAlert(result: Result?) {
-        if result != nil {
-            self.alertView.result = result!
-        }
-    }
-    
-    func changeLoginButtonState(enable: Bool) {
-        self.loginButtonVC.enabled = enable
-    }
-}
-
-extension KMLoginInputPasswordView: NSTextFieldDelegate {
-    func controlTextDidEndEditing(_ obj: Notification) {
-        let textField = obj.object as? NSTextField
-        if (textField == self.passwordTextField ||
-            textField == self.passwordSecureTextField) {
-            self.passwordContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
-        }
-    }
-    
-    func controlTextDidChange(_ obj: Notification) {
-        let textField = obj.object as? NSTextField
-        if (textField == self.passwordSecureTextField ||
-            textField == self.passwordTextField) {
-            self.presenter.changePassword(string: textField!.stringValue)
-        }
-    }
-    
-    func control(_ control: NSControl, textView: NSTextView, doCommandBy commandSelector: Selector) -> Bool {
-        switch commandSelector {
-        case #selector(NSResponder.insertNewline(_:)):
-            if let inputView = control as? NSTextField {
-                //当当前TextField按下enter
-                if (textView.string == self.model.password) {
-                    KMPrint("按下 enter")
-                    
-                    if self.model.canNext {
-                        self.loginButtonAction(self.loginButton)
-                    }
-                }
-            }
-            return true
-        default:
-            return false
-        }
-    }
-}
-
-extension KMLoginInputPasswordView: NSTextViewDelegate {
-    func textView(_ textView: NSTextView, clickedOnLink link: Any, at charIndex: Int) -> Bool {
-        if link as! String == "changeEmail://" {
-            guard let callBack = self.changeEmailAction else { return true }
-
-            KMPrint("链接点击")
-            callBack(self)
-        }
-        return true
-    }
-}
-
-
-extension KMLoginInputPasswordView: KMRegisterPresenterDelegate {
-    func showData(presenter: KMRegisterPresenter, data: KMRegisterModel) {
-        self.reloadData()
-    }
-    
-    func showAlert(presenter: KMRegisterPresenter, data: KMRegisterModel) {
-        
-    }
-}

+ 0 - 233
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginInputPasswordView.xib

@@ -1,233 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMLoginInputPasswordView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="alertView" destination="ff5-IQ-deE" id="WgJ-Fd-6aV"/>
-                <outlet property="describeLable" destination="v1H-K3-lim" id="ikz-9Z-zWf"/>
-                <outlet property="emailTextView" destination="Kci-hg-np7" id="QeP-v6-Da8"/>
-                <outlet property="forgotPasswordButton" destination="cWe-4o-FbE" id="aOb-EX-9Xr"/>
-                <outlet property="loginButton" destination="Fiq-Tb-FhO" id="hrP-yA-WJw"/>
-                <outlet property="passwordAlertLabel" destination="ozx-O2-GQT" id="egV-cQ-3ZP"/>
-                <outlet property="passwordContentView" destination="fBp-l6-nG8" id="dMG-qn-eZr"/>
-                <outlet property="passwordSecureTextField" destination="jtV-xD-84b" id="auf-5b-mzl"/>
-                <outlet property="passwordTextField" destination="6Vy-iH-Gtq" id="FOu-hw-1r8"/>
-                <outlet property="showButton" destination="xHV-vC-qRK" id="lyy-q9-J9r"/>
-                <outlet property="titleLabel" destination="HEe-ho-aMd" id="AV3-ho-RlB"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="404" height="420"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="foZ-Fi-vvJ">
-                    <rect key="frame" x="48" y="192" width="308" height="180"/>
-                    <subviews>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="HEe-ho-aMd">
-                            <rect key="frame" x="-2" y="156" width="53" height="24"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" title="Login" id="1TY-0X-TvG">
-                                <font key="font" metaFont="system" size="20"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                            <connections>
-                                <action selector="titleLabel:" target="-1" id="gs2-d9-C6M"/>
-                            </connections>
-                        </textField>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="ya0-iW-x0m">
-                            <rect key="frame" x="0.0" y="24" width="308" height="60"/>
-                            <subviews>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="v1H-K3-lim">
-                                    <rect key="frame" x="-2" y="44" width="98" height="16"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Enter password" id="L7J-ZU-D7U">
-                                        <font key="font" metaFont="system"/>
-                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="fBp-l6-nG8">
-                                    <rect key="frame" x="0.0" y="4" width="308" height="32"/>
-                                    <subviews>
-                                        <textField verticalHuggingPriority="750" contentType="password" translatesAutoresizingMaskIntoConstraints="NO" id="6Vy-iH-Gtq" customClass="FocusAwareTextField" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="8" y="5" width="268" height="22"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="22" id="opq-pU-Cxs"/>
-                                            </constraints>
-                                            <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="border" placeholderString="Enter your password" id="gdA-OW-XHt">
-                                                <font key="font" metaFont="system"/>
-                                                <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <allowedInputSourceLocales>
-                                                    <string>NSAllRomanInputSourcesLocaleIdentifier</string>
-                                                </allowedInputSourceLocales>
-                                            </textFieldCell>
-                                        </textField>
-                                        <secureTextField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jtV-xD-84b" customClass="FocusAwareSecureTextField" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="8" y="6" width="268" height="20"/>
-                                            <secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="border" usesSingleLineMode="YES" id="UlY-us-n8s">
-                                                <font key="font" metaFont="system"/>
-                                                <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <allowedInputSourceLocales>
-                                                    <string>NSAllRomanInputSourcesLocaleIdentifier</string>
-                                                </allowedInputSourceLocales>
-                                            </secureTextFieldCell>
-                                        </secureTextField>
-                                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xHV-vC-qRK">
-                                            <rect key="frame" x="284" y="8" width="16" height="16"/>
-                                            <constraints>
-                                                <constraint firstAttribute="width" constant="16" id="nvV-aB-5NN"/>
-                                                <constraint firstAttribute="height" constant="16" id="pgM-OG-2zP"/>
-                                            </constraints>
-                                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="icon_btn_show" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="Na6-O8-jpZ">
-                                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                                <font key="font" metaFont="system"/>
-                                            </buttonCell>
-                                            <connections>
-                                                <action selector="showButton:" target="-2" id="Mgv-hf-UpD"/>
-                                            </connections>
-                                        </button>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="32" id="08T-y7-euD"/>
-                                        <constraint firstItem="jtV-xD-84b" firstAttribute="leading" secondItem="fBp-l6-nG8" secondAttribute="leading" constant="8" id="0O6-sh-EIr"/>
-                                        <constraint firstAttribute="trailing" secondItem="xHV-vC-qRK" secondAttribute="trailing" constant="8" id="1uD-XY-sKB"/>
-                                        <constraint firstItem="6Vy-iH-Gtq" firstAttribute="leading" secondItem="fBp-l6-nG8" secondAttribute="leading" constant="8" id="2tO-xH-ViD"/>
-                                        <constraint firstItem="xHV-vC-qRK" firstAttribute="leading" secondItem="jtV-xD-84b" secondAttribute="trailing" constant="8" id="HTH-Ou-A4C"/>
-                                        <constraint firstItem="6Vy-iH-Gtq" firstAttribute="centerY" secondItem="fBp-l6-nG8" secondAttribute="centerY" id="XdE-rE-4Aj"/>
-                                        <constraint firstItem="jtV-xD-84b" firstAttribute="centerY" secondItem="fBp-l6-nG8" secondAttribute="centerY" id="jPj-Sx-IGa"/>
-                                        <constraint firstItem="xHV-vC-qRK" firstAttribute="centerY" secondItem="fBp-l6-nG8" secondAttribute="centerY" id="ykY-Nn-ZRF"/>
-                                        <constraint firstItem="xHV-vC-qRK" firstAttribute="leading" secondItem="6Vy-iH-Gtq" secondAttribute="trailing" constant="8" id="z9i-Ze-wrp"/>
-                                    </constraints>
-                                </customView>
-                            </subviews>
-                            <constraints>
-                                <constraint firstItem="v1H-K3-lim" firstAttribute="leading" secondItem="ya0-iW-x0m" secondAttribute="leading" id="Fcs-ee-5aZ"/>
-                                <constraint firstItem="fBp-l6-nG8" firstAttribute="top" secondItem="v1H-K3-lim" secondAttribute="bottom" constant="8" id="NuE-WR-S2h"/>
-                                <constraint firstItem="v1H-K3-lim" firstAttribute="top" secondItem="ya0-iW-x0m" secondAttribute="top" id="QJn-SN-ebB"/>
-                                <constraint firstAttribute="trailing" secondItem="fBp-l6-nG8" secondAttribute="trailing" id="T4d-ur-XKM"/>
-                                <constraint firstAttribute="height" constant="60" id="lCc-i1-TLp"/>
-                                <constraint firstItem="fBp-l6-nG8" firstAttribute="leading" secondItem="ya0-iW-x0m" secondAttribute="leading" id="seN-ez-xpv"/>
-                            </constraints>
-                        </customView>
-                        <scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="j6W-JS-n65">
-                            <rect key="frame" x="0.0" y="100" width="308" height="24"/>
-                            <clipView key="contentView" drawsBackground="NO" id="5A4-34-oQ2">
-                                <rect key="frame" x="0.0" y="0.0" width="308" height="24"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <subviews>
-                                    <textView wantsLayer="YES" editable="NO" drawsBackground="NO" importsGraphics="NO" richText="NO" verticallyResizable="YES" spellingCorrection="YES" smartInsertDelete="YES" id="Kci-hg-np7">
-                                        <rect key="frame" x="0.0" y="0.0" width="308" height="24"/>
-                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                        <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                        <size key="minSize" width="308" height="24"/>
-                                        <size key="maxSize" width="340" height="10000000"/>
-                                        <color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
-                                    </textView>
-                                </subviews>
-                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                            </clipView>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="24" id="fDd-Ml-i9Y"/>
-                            </constraints>
-                            <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="jbc-6c-Kba">
-                                <rect key="frame" x="-100" y="-100" width="225" height="15"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                            </scroller>
-                            <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="why-2z-eUa">
-                                <rect key="frame" x="-100" y="-100" width="15" height="24"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                            </scroller>
-                        </scrollView>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ozx-O2-GQT">
-                            <rect key="frame" x="-2" y="0.0" width="125" height="16"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" title="Up to 24 characters" id="8aG-TJ-Lff">
-                                <font key="font" metaFont="system"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="ya0-iW-x0m" firstAttribute="leading" secondItem="foZ-Fi-vvJ" secondAttribute="leading" id="9lU-u3-I1x"/>
-                        <constraint firstItem="j6W-JS-n65" firstAttribute="top" secondItem="HEe-ho-aMd" secondAttribute="bottom" constant="32" id="CZ8-L2-VLh"/>
-                        <constraint firstItem="ozx-O2-GQT" firstAttribute="leading" secondItem="foZ-Fi-vvJ" secondAttribute="leading" id="DGV-lT-Ps5"/>
-                        <constraint firstItem="HEe-ho-aMd" firstAttribute="leading" secondItem="foZ-Fi-vvJ" secondAttribute="leading" id="KvT-NB-g50"/>
-                        <constraint firstAttribute="trailing" secondItem="ya0-iW-x0m" secondAttribute="trailing" id="Yf8-Cb-Lnd"/>
-                        <constraint firstItem="j6W-JS-n65" firstAttribute="leading" secondItem="foZ-Fi-vvJ" secondAttribute="leading" id="eEk-y5-PC5"/>
-                        <constraint firstAttribute="height" constant="180" id="iXu-XP-G0N"/>
-                        <constraint firstItem="ya0-iW-x0m" firstAttribute="top" secondItem="j6W-JS-n65" secondAttribute="bottom" constant="16" id="mxd-Tn-BZq"/>
-                        <constraint firstAttribute="trailing" secondItem="j6W-JS-n65" secondAttribute="trailing" id="tTW-W1-bq8"/>
-                        <constraint firstItem="HEe-ho-aMd" firstAttribute="top" secondItem="foZ-Fi-vvJ" secondAttribute="top" id="wQG-8l-QVy"/>
-                        <constraint firstAttribute="bottom" secondItem="ozx-O2-GQT" secondAttribute="bottom" id="zTZ-R5-0sQ"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="NSS-Ih-pbK">
-                    <rect key="frame" x="50" y="108" width="304" height="68"/>
-                    <subviews>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Fiq-Tb-FhO">
-                            <rect key="frame" x="0.0" y="36" width="304" height="32"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="32" id="WPN-Ja-EzQ"/>
-                            </constraints>
-                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" enabled="NO" imageScaling="proportionallyDown" inset="2" id="zzl-rj-AU8">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                                <string key="keyEquivalent" base64-UTF8="YES">
-DQ
-</string>
-                            </buttonCell>
-                        </button>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cWe-4o-FbE">
-                            <rect key="frame" x="81" y="12" width="143" height="16"/>
-                            <buttonCell key="cell" type="square" title="Forgot your password?" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="bVq-mm-eV1">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="forgotPasswordButtonAction:" target="-2" id="PTh-VB-az5"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="68" id="A9Z-hl-oXG"/>
-                        <constraint firstItem="Fiq-Tb-FhO" firstAttribute="top" secondItem="NSS-Ih-pbK" secondAttribute="top" id="CVb-Uv-gft"/>
-                        <constraint firstAttribute="trailing" secondItem="Fiq-Tb-FhO" secondAttribute="trailing" id="OT5-03-nlO"/>
-                        <constraint firstItem="cWe-4o-FbE" firstAttribute="centerX" secondItem="NSS-Ih-pbK" secondAttribute="centerX" id="UpF-Rc-0Ry"/>
-                        <constraint firstItem="Fiq-Tb-FhO" firstAttribute="leading" secondItem="NSS-Ih-pbK" secondAttribute="leading" id="WQI-89-k7A"/>
-                        <constraint firstItem="cWe-4o-FbE" firstAttribute="top" secondItem="Fiq-Tb-FhO" secondAttribute="bottom" constant="8" id="eM0-r7-erm"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="ff5-IQ-deE" customClass="KMLightMemberAlertView" customModule="PDF_Master" customModuleProvider="target">
-                    <rect key="frame" x="0.0" y="0.0" width="404" height="48"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="48" id="jHg-Mk-TWh"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstAttribute="trailing" secondItem="NSS-Ih-pbK" secondAttribute="trailing" constant="50" id="7uK-IL-i6n"/>
-                <constraint firstAttribute="trailing" secondItem="foZ-Fi-vvJ" secondAttribute="trailing" constant="48" id="Pvk-JE-bjM"/>
-                <constraint firstItem="foZ-Fi-vvJ" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="48" id="U26-5M-VY6"/>
-                <constraint firstItem="foZ-Fi-vvJ" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="48" id="Vks-JI-xSi"/>
-                <constraint firstAttribute="bottom" secondItem="ff5-IQ-deE" secondAttribute="bottom" id="b3q-cc-QmC"/>
-                <constraint firstItem="NSS-Ih-pbK" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="50" id="bDW-Px-cba"/>
-                <constraint firstAttribute="trailing" secondItem="ff5-IQ-deE" secondAttribute="trailing" id="fQk-ls-GJK"/>
-                <constraint firstItem="ff5-IQ-deE" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="hy4-3Q-V1A"/>
-                <constraint firstItem="ff5-IQ-deE" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="szj-DX-xm8"/>
-                <constraint firstItem="NSS-Ih-pbK" firstAttribute="top" secondItem="foZ-Fi-vvJ" secondAttribute="bottom" constant="16" id="xVn-C4-gEG"/>
-            </constraints>
-            <point key="canvasLocation" x="-17" y="189"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="icon_btn_show" width="16" height="16"/>
-    </resources>
-</document>

+ 0 - 86
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginLeftImageView.swift

@@ -1,86 +0,0 @@
-//
-//  KMLoginLeftImageView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/22.
-//
-
-import Cocoa
-
-typealias KMLoginLeftImageViewCancelAction = (_ view: KMLoginLeftImageView) -> Void
-typealias KMLoginLeftImageViewSubscriptionAction = (_ view: KMLoginLeftImageView) -> Void
-class KMLoginLeftImageView: BaseXibView {
-
-    @IBOutlet weak var closeButton: NSButton!
-    @IBOutlet weak var closeBox: KMBox!
-    @IBOutlet weak var subscriptionButton: NSButton!
-    @IBOutlet weak var imageView: NSImageView!
-    var cancelAction: KMLoginLeftImageViewCancelAction?
-    var subscriptionAction: KMLoginLeftImageViewSubscriptionAction?
-    var logType: KMRegisterLogType = .register {
-        didSet {
-            self.updateImage()
-        }
-    }
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-        // Drawing code here.
-    }
-    
-    func setup() {
-        
-//        self.subscriptionButton.setTitleColor(NSColor.km_init(hex: "#3F8FF6"))
-//        self.subscriptionButton.font = NSFont.SFProTextSemiboldFont(12.0)
-        
-        self.closeBox.moveCallback = { [weak self] (mouseEntered, mouseBox) in
-            if mouseEntered {
-                self?.closeButton.image = NSImage(named: "control_btn_icon_close_hov")
-            } else {
-                self?.closeButton.image = NSImage(named: "control_btn_icon_close")
-            }
-        }
-        
-        Task { @MainActor in
-//            self.subscriptionButton.isHidden = true
-            if self.logType != .registerSuccess {
-                if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
-//                    self.subscriptionButton.isHidden = false
-                }
-            }
-        }
-    }
-    
-    func updateLanguage() {
-//        self.subscriptionButton.title = NSLocalizedString("Subscribe Now", comment: "")
-    }
-    
-    func updateImage() {
-        var image: NSImage
-        switch logType {
-        case .registerSuccess:
-            image = NSImage(named: "image_registerSuccess")!
-//            self.subscriptionButton.isHidden = true
-        default:
-            #if VERSION_FREE
-            image = NSImage(named: "image_PopupAppstore") ?? NSImage()
-            #else
-            image = NSImage(named: "Image_PopupDMG") ?? NSImage()
-            #endif
-//            self.subscriptionButton.isHidden = false
-        }
-        self.imageView.image = image
-    }
-    
-    @IBAction func subscriptionButtonAction(_ sender: Any) {
-        guard let callBack = self.subscriptionAction else { return }
-        
-        callBack(self)
-    }
-    
-    @IBAction func cancelButtonAction(_ sender: Any) {
-        KMPrint("关闭")
-        if self.cancelAction != nil {
-            self.cancelAction!(self)
-        }
-    }
-}

+ 0 - 98
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginLeftImageView.xib

@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="Named colors" minToolsVersion="9.0"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMLoginLeftImageView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="closeBox" destination="Uab-7J-HuO" id="qkF-rU-TPN"/>
-                <outlet property="closeButton" destination="gel-gM-vw7" id="Ep0-Dd-YU9"/>
-                <outlet property="imageView" destination="MOY-Rt-B5e" id="YCG-K9-5Ax"/>
-                <outlet property="subscriptionButton" destination="7z9-Ga-XM3" id="ayx-lC-dTV"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="282" height="460"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="7xs-D0-Xel">
-                    <rect key="frame" x="0.0" y="0.0" width="282" height="460"/>
-                    <subviews>
-                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="MOY-Rt-B5e">
-                            <rect key="frame" x="0.0" y="0.0" width="282" height="460"/>
-                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="image_login" id="ZVR-ob-TIM"/>
-                        </imageView>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="MOY-Rt-B5e" firstAttribute="top" secondItem="7xs-D0-Xel" secondAttribute="top" id="LJI-lq-UcP"/>
-                        <constraint firstItem="MOY-Rt-B5e" firstAttribute="leading" secondItem="7xs-D0-Xel" secondAttribute="leading" id="WME-XU-0Qa"/>
-                        <constraint firstAttribute="trailing" secondItem="MOY-Rt-B5e" secondAttribute="trailing" id="bfV-RG-OZR"/>
-                        <constraint firstAttribute="bottom" secondItem="MOY-Rt-B5e" secondAttribute="bottom" id="u4a-Af-t9S"/>
-                    </constraints>
-                </customView>
-                <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="Uab-7J-HuO" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                    <rect key="frame" x="8" y="440" width="12" height="12"/>
-                    <view key="contentView" id="tae-tA-AO1">
-                        <rect key="frame" x="0.0" y="0.0" width="12" height="12"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                    </view>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="12" id="EP5-s5-aoj"/>
-                        <constraint firstAttribute="height" constant="12" id="mbx-9J-xpo"/>
-                    </constraints>
-                </box>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gel-gM-vw7">
-                    <rect key="frame" x="8" y="440" width="12" height="12"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="12" id="Xh8-2S-Mj2"/>
-                        <constraint firstAttribute="height" constant="12" id="uOm-Fv-QYL"/>
-                    </constraints>
-                    <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="control_btn_icon_close" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="bd0-Bw-N67">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="cancelButtonAction:" target="-2" id="df5-MO-xjM"/>
-                    </connections>
-                </button>
-                <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7z9-Ga-XM3">
-                    <rect key="frame" x="160" y="26" width="96" height="16"/>
-                    <buttonCell key="cell" type="square" title="Subscribe Now" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="H4X-qF-Fef">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <color key="contentTintColor" name="AccentColor"/>
-                    <connections>
-                        <action selector="subscriptionButtonAction:" target="-2" id="mCk-cc-HDD"/>
-                    </connections>
-                </button>
-            </subviews>
-            <constraints>
-                <constraint firstItem="7xs-D0-Xel" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="5e6-o2-WUc"/>
-                <constraint firstItem="gel-gM-vw7" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="8" id="79y-e2-4dK"/>
-                <constraint firstAttribute="trailing" secondItem="7z9-Ga-XM3" secondAttribute="trailing" constant="26" id="BCh-Yw-Pf8"/>
-                <constraint firstAttribute="trailing" secondItem="7xs-D0-Xel" secondAttribute="trailing" id="Gha-to-X9e"/>
-                <constraint firstAttribute="bottom" secondItem="7xs-D0-Xel" secondAttribute="bottom" id="Kyu-VU-vW3"/>
-                <constraint firstItem="Uab-7J-HuO" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="8" id="LnR-an-pRa"/>
-                <constraint firstItem="7xs-D0-Xel" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="WEb-7m-upW"/>
-                <constraint firstItem="gel-gM-vw7" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="8" id="YKz-t4-sa0"/>
-                <constraint firstItem="Uab-7J-HuO" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="8" id="fOK-Jo-nSG"/>
-                <constraint firstAttribute="bottom" secondItem="7z9-Ga-XM3" secondAttribute="bottom" constant="26" id="pxE-vD-7qH"/>
-            </constraints>
-            <point key="canvasLocation" x="61" y="176"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="control_btn_icon_close" width="12" height="12"/>
-        <image name="image_login" width="260" height="420"/>
-        <namedColor name="AccentColor">
-            <color red="0.0" green="0.46000000000000002" blue="0.89000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-        </namedColor>
-    </resources>
-</document>

+ 0 - 301
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginView.swift

@@ -1,301 +0,0 @@
-//
-//  KMLoginView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/22.
-//
-
-import Cocoa
-
-typealias KMLoginViewRegisterAction = (_ view: KMLoginView, _ data: KMRegisterModel) -> Void
-typealias KMLoginViewNextAction = (_ view: KMLoginView, _ data: KMRegisterModel, _ sender: NSButton) -> Void
-
-class KMLoginView: BaseXibView {
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var loginDescripeLabel: NSTextField!
-    @IBOutlet weak var nextButton: NSButton!
-    @IBOutlet var registerTextView: NSTextView!
-    @IBOutlet weak var textFieldContentView: NSView!
-    @IBOutlet weak var emailTextField: FocusAwareTextField!
-    @IBOutlet weak var alertLabel: NSTextField!
-    
-    @IBOutlet weak var appleLoginButton: NSButton!
-    @IBOutlet weak var googleLoginButton: NSButton!
-    
-    
-    var nextButtonVC: KMDesignButton!
-    
-    var nextAction: KMLoginViewNextAction?
-    var registerAction: KMLoginViewRegisterAction?
-    var model: KMRegisterModel = KMRegisterModel()
-    var email: String = "" {
-        didSet {
-            self.model.email = self.email
-            self.reloadData()
-        }
-    }
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    func setup() {
-        self.emailTextField.delegate = self
-        self.emailTextField.onFocus = {
-            self.textFieldContentView.border(NSColor.km_init(hex: "#1770F4"), 1, 4)
-        }
-        
-        self.registerTextView.delegate = self
-        self.registerTextView.isEditable = false
-        self.registerTextView.frame = (self.registerTextView.enclosingScrollView?.contentView.bounds)!
-        self.registerTextView.autoresizingMask = [.width, .height]
-        
-        self.nextButtonVC = KMDesignButton(withType: .Text)
-        self.nextButton.addSubview(self.nextButtonVC.view)
-        self.nextButtonVC?.view.frame = self.nextButton.bounds
-        self.nextButtonVC.target = self
-        self.nextButtonVC.action = #selector(nextButtonAction)
-
-        self.nextButtonVC.button(type: .Cta, size: .m)
-        self.nextButtonVC.button.keyEquivalent = KMKeyEquivalent.enter
-    }
-    
-    func updateUI() {
-
-        self.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-        
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-        self.titleLabel.font = NSFont.SFProTextRegularFont(20.0)
-        
-        self.loginDescripeLabel.textColor = NSColor.km_init(hex: "#252629")
-        self.loginDescripeLabel.font = NSFont.SFProTextRegularFont(14.0)
-        
-        self.emailTextField.textColor = NSColor.km_init(hex: "#252629")
-        self.emailTextField.font = NSFont.SFProTextRegularFont(14.0)
-        self.emailTextField.border(NSColor.km_init(hex: "#FFFFFF"), 1, 0)
-        
-        self.alertLabel.textColor = NSColor.km_init(hex: "#F3465B")
-        self.alertLabel.font = NSFont.SFProTextRegularFont(12.0)
-    }
-    
-    func updateLanguage() {
-        self.nextButtonVC.stringValue = NSLocalizedString("Next Step", comment: "")
-        self.titleLabel.stringValue = NSLocalizedString("Log In", comment: "")
-        
-        self.loginDescripeLabel.stringValue = NSLocalizedString("Enter email account", comment: "")
-        
-        self.textFieldContentView.border(NSColor.km_init(hex: "#1770F4"), 1, 4)
-        
-        self.emailTextField.placeholderAttributedString = NSAttributedString(string: NSLocalizedString("Enter email address", comment: ""), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(14.0), NSAttributedString.Key.foregroundColor: NSColor.km_init(hex: "#94989C") ])
-        
-        
-        let string = NSLocalizedString("Don’t have an account yet?", comment: "") + "  " + NSLocalizedString("Sign up", comment: "")
-        let attributedString = NSMutableAttributedString.init(string: string)
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.alignment = .center;
-        attributedString.addAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#252629"),
-                                        NSAttributedString.Key.paragraphStyle : paragraphStyle],
-                                    range: NSRange(location: 0, length: string.count))
-        
-        let range = string.range(of: NSLocalizedString("Sign up", comment: ""))
-        attributedString.setAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#1770F4"),
-                                        NSAttributedString.Key.underlineColor : NSColor.clear,
-                                        NSAttributedString.Key.link : "register://"],
-                                       range: string.nsRange(from: range!)!)
-        
-        self.registerTextView.textStorage?.setAttributedString(attributedString)
-    }
-    
-    func reloadData() {
-        
-        KMLightMemberManager.manager.updatePopupShownToday(isPop: true)
-        
-        var email: String = UserDefaults.standard.value(forKey: "kLoginEmail") as? String ?? ""
-        if email.count == 0 {
-            email = self.model.email
-        }
-        
-        self.emailTextField.stringValue = email;
-        
-        self.emainDidEndEditing()
-    }
-}
-
-extension KMLoginView: NSTextViewDelegate {
-    func textView(_ textView: NSTextView, clickedOnLink link: Any, at charIndex: Int) -> Bool {
-        if link as! String == "register://" {
-            guard let callBack = self.registerAction else { return true }
-            
-            KMPrint("链接点击")
-            callBack(self, self.model)
-        }
-        return true
-    }
-}
-
-extension KMLoginView: NSTextFieldDelegate {
-    func controlTextDidEndEditing(_ obj: Notification) {
-        KMPrint("controlTextDidEndEditing")
-        let textField = obj.object as? NSTextField
-        if (textField == self.emailTextField) {
-            self.emainDidEndEditing()
-            self.textFieldContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
-        }
-    }
-    
-    func controlTextDidChange(_ obj: Notification) {
-        let textField = obj.object as? NSTextField
-        if (textField == self.emailTextField) {
-            self.model.email = self.emailTextField.stringValue
-            self.emainDidEndEditing()
-            self.alertLabel.stringValue = ""
-        }
-    }
-    
-    func control(_ control: NSControl, textView: NSTextView, doCommandBy commandSelector: Selector) -> Bool {
-        switch commandSelector {
-        case #selector(NSResponder.insertNewline(_:)):
-            if let inputView = control as? NSTextField {
-                //当当前TextField按下enter
-                if inputView == self.emailTextField {
-                    KMPrint("按下 enter")
-                    
-                    if KMLoginView.verificationEmail(self.emailTextField.stringValue) {
-                        self.nextButtonAction(self.nextButton)
-                    }
-                }
-            }
-            return true
-        default:
-            return false
-        }
-    }
-}
-
-//MARK: 事件
-protocol KMLoginViewAction {}
-extension KMLoginView: KMLoginViewAction {
-    @IBAction func nextButtonAction(_ sender: NSButton) {
-        guard let callBack = self.nextAction else { return }
-        
-        self.model.email = self.emailTextField.stringValue
-        self.changeNextButtonState(enable: false)
-        callBack(self, self.model, sender)
-    }
-    
-    func emainDidEndEditing() {
-        var alertCode = 0
-        if KMLoginView.verificationEmail(self.emailTextField.stringValue) {
-            self.nextButtonVC.enabled = true
-        } else {
-            self.nextButtonVC.enabled = false
-            if self.emailTextField.stringValue != "" {
-                alertCode = KMRequestServerErrorCodeType.EXCEPTION_MSG_EMAIL_INVALID.rawValue
-            }
-        }
-        
-        self.showAlert(result: Result(code:alertCode))
-    }
-    
-    func showAlert(result: Result?) {
-        if result != nil {
-            self.alertLabel.stringValue = NSLocalizedString(KMRequestServerErrorCodeType.typeOfMessage(type: KMRequestServerErrorCodeType(rawValue: result!.code)), comment: "")
-        }
-    }
-    
-    func changeNextButtonState(enable: Bool) {
-        self.nextButtonVC.enabled = enable
-        
-        if enable {
-            //登录账号保存
-            UserDefaults.standard.set(self.model.email, forKey: "kLoginEmail")
-            UserDefaults.standard.synchronize()
-        }
-    }
-    
-    @IBAction func appleLoginButtonAction(_ sender: Any) {
-        KMLoginManager.manager.login(.apple) { isSuccess, error in
-            
-        }
-    }
-    
-    @IBAction func googleLoginButtonAction(_ sender: Any) {
-            
-    }
-}
-
-//MARK: 权限验证
-protocol KMLoginViewAuthority {}
-extension KMLoginView: KMLoginViewAuthority {
-    /**
-     邮箱验证
-     */
-    static func verificationEmail(_ email: String ) -> Bool {
-        do {
-            let pattern = "^([a-z0-9_\\.-]+)@([\\da-z\\.-]+)\\.([a-z\\.]{2,6})$"
-            let regex = try? NSRegularExpression(pattern: pattern, options: NSRegularExpression.Options.caseInsensitive)
-            let res = regex?.matches(in: email, range: NSRange(location: 0, length: email.count))
-            
-            if (res?.count != 0) {
-                return true
-            } else {
-                return false
-            }
-        }
-    }
-}
-
-//MARK: 网络请求
-protocol KMLoginViewNetWorking {}
-extension KMLoginView: KMLoginViewNetWorking {
-
-}
-
-
-extension String {
-    /// 从字符串中提取数字
-    func getIntFromString() -> String {
-        let scanner = Scanner(string: self)
-        scanner.scanUpToCharacters(from: CharacterSet.decimalDigits, into: nil)
-        var number :Int = 0
-        scanner.scanInt(&number)
-        return String(number)
-        
-    }
-    
-    /// 查找子字符串
-    func ranges(of string: String) -> (range:[Range<String.Index>], nsRnage: [NSRange]) {
-        var rangeArray = [Range<String.Index>]()
-        var nsRangeArray = [NSRange]()
-        var searchedRange: Range<String.Index>
-        guard let sr = self.range(of: self) else {
-            return (rangeArray, nsRangeArray)
-        }
-        searchedRange = sr
-        var resultRange = self.range(of: string, options: .regularExpression, range: searchedRange, locale: nil)
-        while let range = resultRange {
-            rangeArray.append(range)
-            nsRangeArray.append(NSRange(range,in:self))
-            searchedRange = Range(uncheckedBounds: (range.upperBound, searchedRange.upperBound))
-            resultRange = self.range(of: string, options: .regularExpression, range: searchedRange, locale: nil)
-        }
-        return (rangeArray,nsRangeArray)
-    }
-
-    /// range -> NSRange
-    func nsRange(from range: Range<String.Index>) -> NSRange? {
-        
-        let utf16view = self.utf16
-        
-        if let from = range.lowerBound.samePosition(in: utf16view), let to = range.upperBound.samePosition(in: utf16view) {
-            
-            return NSMakeRange(utf16view.distance(from: utf16view.startIndex, to: from), utf16view.distance(from: from, to: to))
-            
-        }
-        return nil
-    }
-}
-

+ 0 - 224
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginView.xib

@@ -1,224 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22154" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22154"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMLoginView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="alertLabel" destination="Dmr-1M-Iua" id="HKy-bz-n4Z"/>
-                <outlet property="appleLoginButton" destination="iq4-uJ-ucU" id="z89-Z3-leY"/>
-                <outlet property="emailTextField" destination="ux1-lu-0lN" id="hZI-EL-zYE"/>
-                <outlet property="googleLoginButton" destination="Bfb-EZ-gfe" id="Trm-Iy-xEe"/>
-                <outlet property="loginDescripeLabel" destination="MN2-pV-Yar" id="rtA-IW-YP7"/>
-                <outlet property="nextButton" destination="qvE-sE-RrB" id="k6T-On-qsj"/>
-                <outlet property="registerTextView" destination="iEl-CK-gIF" id="VtM-SJ-hmV"/>
-                <outlet property="textFieldContentView" destination="Qkr-ZD-SqP" id="GRv-Fc-JfO"/>
-                <outlet property="titleLabel" destination="oIw-PI-v0k" id="k2d-TD-vp6"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="404" height="461"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="tLe-UW-r6i">
-                    <rect key="frame" x="0.0" y="0.0" width="404" height="461"/>
-                    <subviews>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="NfV-rH-QAy">
-                            <rect key="frame" x="48" y="213" width="308" height="200"/>
-                            <subviews>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oIw-PI-v0k">
-                                    <rect key="frame" x="-2" y="176" width="53" height="24"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Login" id="mKW-bz-mKm">
-                                        <font key="font" metaFont="system" size="20"/>
-                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                    <connections>
-                                        <action selector="titleLabel:" target="-1" id="dod-0s-L0r"/>
-                                    </connections>
-                                </textField>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="oZ4-WS-K2q">
-                                    <rect key="frame" x="0.0" y="84" width="308" height="60"/>
-                                    <subviews>
-                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MN2-pV-Yar">
-                                            <rect key="frame" x="-2" y="44" width="125" height="16"/>
-                                            <textFieldCell key="cell" lineBreakMode="clipping" title="Enter email account" id="Q1t-he-m3U">
-                                                <font key="font" metaFont="system"/>
-                                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                            </textFieldCell>
-                                        </textField>
-                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Qkr-ZD-SqP">
-                                            <rect key="frame" x="0.0" y="4" width="308" height="32"/>
-                                            <subviews>
-                                                <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ux1-lu-0lN" customClass="FocusAwareTextField" customModule="PDF_Master" customModuleProvider="target">
-                                                    <rect key="frame" x="8" y="5" width="292" height="22"/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="height" constant="22" id="Uru-Xo-pog"/>
-                                                    </constraints>
-                                                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="border" placeholderString="Enter email address" id="qTS-7Z-GAW">
-                                                        <font key="font" metaFont="system"/>
-                                                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                                        <allowedInputSourceLocales>
-                                                            <string>NSAllRomanInputSourcesLocaleIdentifier</string>
-                                                        </allowedInputSourceLocales>
-                                                    </textFieldCell>
-                                                </textField>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstItem="ux1-lu-0lN" firstAttribute="leading" secondItem="Qkr-ZD-SqP" secondAttribute="leading" constant="8" id="LG5-tH-2mP"/>
-                                                <constraint firstAttribute="height" constant="32" id="MKf-lx-GZA"/>
-                                                <constraint firstAttribute="trailing" secondItem="ux1-lu-0lN" secondAttribute="trailing" constant="8" id="WCi-BC-RxX"/>
-                                                <constraint firstItem="ux1-lu-0lN" firstAttribute="centerY" secondItem="Qkr-ZD-SqP" secondAttribute="centerY" id="tDx-Eg-Nyi"/>
-                                            </constraints>
-                                        </customView>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="60" id="Bd3-AI-AiC"/>
-                                        <constraint firstItem="Qkr-ZD-SqP" firstAttribute="leading" secondItem="oZ4-WS-K2q" secondAttribute="leading" id="EKA-sd-yR1"/>
-                                        <constraint firstAttribute="trailing" secondItem="Qkr-ZD-SqP" secondAttribute="trailing" id="Oxz-sx-g8j"/>
-                                        <constraint firstItem="MN2-pV-Yar" firstAttribute="leading" secondItem="oZ4-WS-K2q" secondAttribute="leading" id="hEa-Dy-9cm"/>
-                                        <constraint firstItem="MN2-pV-Yar" firstAttribute="top" secondItem="oZ4-WS-K2q" secondAttribute="top" id="hr0-c8-0o9"/>
-                                        <constraint firstItem="Qkr-ZD-SqP" firstAttribute="top" secondItem="MN2-pV-Yar" secondAttribute="bottom" constant="8" id="zPb-fe-RCb"/>
-                                    </constraints>
-                                </customView>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Dmr-1M-Iua">
-                                    <rect key="frame" x="-2" y="66" width="266" height="16"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="262" id="TzO-iz-HUf"/>
-                                    </constraints>
-                                    <textFieldCell key="cell" title="label" id="clU-aX-1Gf">
-                                        <font key="font" metaFont="system"/>
-                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
-                            </subviews>
-                            <constraints>
-                                <constraint firstAttribute="trailing" secondItem="oZ4-WS-K2q" secondAttribute="trailing" id="0Ih-Nn-9da"/>
-                                <constraint firstItem="oZ4-WS-K2q" firstAttribute="top" secondItem="oIw-PI-v0k" secondAttribute="bottom" constant="32" id="2HR-NX-srN"/>
-                                <constraint firstAttribute="height" constant="200" id="9KH-eC-tr6"/>
-                                <constraint firstItem="oIw-PI-v0k" firstAttribute="leading" secondItem="NfV-rH-QAy" secondAttribute="leading" id="9yn-lF-MXQ"/>
-                                <constraint firstItem="oIw-PI-v0k" firstAttribute="top" secondItem="NfV-rH-QAy" secondAttribute="top" id="E4j-JH-0tc"/>
-                                <constraint firstItem="Dmr-1M-Iua" firstAttribute="top" secondItem="oZ4-WS-K2q" secondAttribute="bottom" constant="2" id="Jo9-Mg-NM5"/>
-                                <constraint firstItem="Dmr-1M-Iua" firstAttribute="leading" secondItem="NfV-rH-QAy" secondAttribute="leading" id="LuC-Ug-Ddo"/>
-                                <constraint firstItem="oZ4-WS-K2q" firstAttribute="leading" secondItem="NfV-rH-QAy" secondAttribute="leading" id="cZD-v5-lyp"/>
-                            </constraints>
-                        </customView>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="UB6-Hp-ebR">
-                            <rect key="frame" x="0.0" y="116" width="404" height="68"/>
-                            <subviews>
-                                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qvE-sE-RrB">
-                                    <rect key="frame" x="48" y="36" width="308" height="32"/>
-                                    <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" enabled="NO" imageScaling="proportionallyDown" inset="2" id="0Zf-nU-w6r">
-                                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                        <font key="font" metaFont="system"/>
-                                        <string key="keyEquivalent" base64-UTF8="YES">
-DQ
-</string>
-                                    </buttonCell>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="32" id="7sU-kL-22j"/>
-                                    </constraints>
-                                </button>
-                                <scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Jh-0w-5Hf">
-                                    <rect key="frame" x="48" y="4" width="308" height="24"/>
-                                    <clipView key="contentView" drawsBackground="NO" id="bPn-g7-5ox">
-                                        <rect key="frame" x="0.0" y="0.0" width="308" height="24"/>
-                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                        <subviews>
-                                            <textView wantsLayer="YES" editable="NO" drawsBackground="NO" importsGraphics="NO" richText="NO" verticallyResizable="YES" spellingCorrection="YES" smartInsertDelete="YES" id="iEl-CK-gIF">
-                                                <rect key="frame" x="0.0" y="0.0" width="308" height="24"/>
-                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                                <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <size key="minSize" width="308" height="24"/>
-                                                <size key="maxSize" width="404" height="10000000"/>
-                                                <color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
-                                            </textView>
-                                        </subviews>
-                                        <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                    </clipView>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="24" id="3gs-kE-D1v"/>
-                                    </constraints>
-                                    <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="fsY-op-cRp">
-                                        <rect key="frame" x="-100" y="-100" width="225" height="15"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                    </scroller>
-                                    <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="jnd-eF-0ZU">
-                                        <rect key="frame" x="-100" y="-100" width="15" height="24"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                    </scroller>
-                                </scrollView>
-                            </subviews>
-                            <constraints>
-                                <constraint firstItem="4Jh-0w-5Hf" firstAttribute="leading" secondItem="UB6-Hp-ebR" secondAttribute="leading" constant="48" id="4TI-Ig-H0l"/>
-                                <constraint firstAttribute="trailing" secondItem="qvE-sE-RrB" secondAttribute="trailing" constant="48" id="8wp-Ps-cNb"/>
-                                <constraint firstItem="qvE-sE-RrB" firstAttribute="top" secondItem="UB6-Hp-ebR" secondAttribute="top" id="ELC-LA-2oP"/>
-                                <constraint firstAttribute="trailing" secondItem="4Jh-0w-5Hf" secondAttribute="trailing" constant="48" id="Jc3-2B-02M"/>
-                                <constraint firstItem="4Jh-0w-5Hf" firstAttribute="top" secondItem="qvE-sE-RrB" secondAttribute="bottom" constant="8" id="KrE-Zd-eLY"/>
-                                <constraint firstAttribute="height" constant="68" id="RIQ-go-8Sz"/>
-                                <constraint firstItem="4Jh-0w-5Hf" firstAttribute="centerX" secondItem="UB6-Hp-ebR" secondAttribute="centerX" id="fxi-so-Da6"/>
-                                <constraint firstItem="qvE-sE-RrB" firstAttribute="leading" secondItem="UB6-Hp-ebR" secondAttribute="leading" constant="48" id="hgI-u3-JWT"/>
-                            </constraints>
-                        </customView>
-                        <button hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="iq4-uJ-ucU">
-                            <rect key="frame" x="172" y="40" width="60" height="60"/>
-                            <buttonCell key="cell" type="square" title="Apple" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="Wm5-iW-N6G">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="60" id="Qpe-OY-Qxr"/>
-                                <constraint firstAttribute="width" constant="60" id="iDm-4b-bwv"/>
-                            </constraints>
-                            <connections>
-                                <action selector="appleLoginButtonAction:" target="-2" id="hfv-Mk-Rdb"/>
-                            </connections>
-                        </button>
-                        <button hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Bfb-EZ-gfe">
-                            <rect key="frame" x="248" y="40" width="60" height="60"/>
-                            <buttonCell key="cell" type="square" title="Google" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="xZ5-Ax-aVO">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="60" id="ScM-B8-NCb"/>
-                                <constraint firstAttribute="width" constant="60" id="wfE-li-eAz"/>
-                            </constraints>
-                            <connections>
-                                <action selector="googleLoginButtonAction:" target="-2" id="fxv-6k-COY"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="Bfb-EZ-gfe" firstAttribute="top" secondItem="UB6-Hp-ebR" secondAttribute="bottom" constant="16" id="1Wc-AC-SY4"/>
-                        <constraint firstAttribute="trailing" secondItem="UB6-Hp-ebR" secondAttribute="trailing" id="GvZ-RD-n3Q"/>
-                        <constraint firstAttribute="trailing" secondItem="NfV-rH-QAy" secondAttribute="trailing" constant="48" id="HS3-1m-D4j"/>
-                        <constraint firstItem="iq4-uJ-ucU" firstAttribute="centerX" secondItem="tLe-UW-r6i" secondAttribute="centerX" id="KVO-gj-4tq"/>
-                        <constraint firstAttribute="bottom" secondItem="UB6-Hp-ebR" secondAttribute="bottom" constant="116" id="KYa-KH-hBG"/>
-                        <constraint firstItem="Bfb-EZ-gfe" firstAttribute="leading" secondItem="iq4-uJ-ucU" secondAttribute="trailing" constant="16" id="PRG-0D-KQX"/>
-                        <constraint firstItem="iq4-uJ-ucU" firstAttribute="top" secondItem="UB6-Hp-ebR" secondAttribute="bottom" constant="16" id="Vhy-Gt-lDW"/>
-                        <constraint firstItem="NfV-rH-QAy" firstAttribute="top" secondItem="tLe-UW-r6i" secondAttribute="top" constant="48" id="bYL-gg-eup"/>
-                        <constraint firstItem="NfV-rH-QAy" firstAttribute="leading" secondItem="tLe-UW-r6i" secondAttribute="leading" constant="48" id="d0S-uE-l2R"/>
-                        <constraint firstItem="UB6-Hp-ebR" firstAttribute="leading" secondItem="tLe-UW-r6i" secondAttribute="leading" id="kOk-GC-pP5"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstAttribute="bottom" secondItem="tLe-UW-r6i" secondAttribute="bottom" id="SdW-vS-u5S"/>
-                <constraint firstAttribute="trailing" secondItem="tLe-UW-r6i" secondAttribute="trailing" id="YAu-v7-Mky"/>
-                <constraint firstItem="tLe-UW-r6i" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="jay-es-xuf"/>
-                <constraint firstItem="tLe-UW-r6i" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="mVE-kJ-Y43"/>
-            </constraints>
-            <point key="canvasLocation" x="63" y="22.5"/>
-        </customView>
-    </objects>
-</document>

+ 0 - 145
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterSuccessView.swift

@@ -1,145 +0,0 @@
-//
-//  KMRegisterSuccessView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/24.
-//
-
-import Cocoa
-
-typealias KMRegisterSuccessViewDoneAction = (_ view: KMRegisterSuccessView) -> Void
-typealias KMRegisterSuccessViewSubscribeAction = (_ view: KMRegisterSuccessView) -> Void
-class KMRegisterSuccessView: BaseXibView {
-
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var subtitleLabel: NSTextField!
-    @IBOutlet weak var subscribeTitleLabel: NSTextField!
-    
-    @IBOutlet weak var doneButton: NSButton!
-    @IBOutlet var textView: NSTextView!
-    
-    var doneButtonVC: KMDesignButton!
-    
-    var doneAction: KMRegisterSuccessViewDoneAction?
-    var subscribeAction: KMRegisterSuccessViewSubscribeAction?
-    
-    @IBOutlet weak var label1: NSTextField!
-    @IBOutlet weak var label2: NSTextField!
-    @IBOutlet weak var label3: NSTextField!
-    
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    func setup() {
-        
-        
-//        self.imageView.backgroundColor(NSColor.km_init(hex: "#D9D9D9"))
-        
-//        self.doneButtonVC = KMDesignButton(withType: .Text)
-//        self.doneButton.addSubview(self.doneButtonVC.view)
-//        self.doneButtonVC?.view.frame = self.doneButton.bounds
-//        self.doneButtonVC.target = self
-//        self.doneButtonVC.action = #selector(doneButtonAction)
-//        self.doneButtonVC.button(type: .Cta, size: .m)
-//        self.doneButtonVC.button.keyEquivalent = KMKeyEquivalent.enter
-//        self.doneButtonVC.stringValue = NSLocalizedString("Getting Started", comment: "")
-//        self.doneButtonVC.updateUI()
-        
-        self.doneButton.border(.white,0, 20)
-        self.doneButton.backgroundColor(NSColor.km_init(hex: "#FF852E"))
-        self.doneButton.contentTintColor = NSColor.km_init(hex: "#FFFFFF")
-        self.doneButton.font = NSFont.SFProTextSemiboldFont(16)
-        
-        self.textView.delegate = self
-        self.textView.isEditable = false
-        self.textView.frame = (self.textView.enclosingScrollView?.contentView.bounds)!
-        self.textView.autoresizingMask = [.width, .height]
-        
-        self.label1.font = NSFont.SFProTextRegularFont(11)
-        self.label2.font = NSFont.SFProTextRegularFont(11)
-        self.label3.font = NSFont.SFProTextRegularFont(11)
-        
-        self.label1.textColor = NSColor.km_init(hex: "#252629")
-        self.label2.textColor = NSColor.km_init(hex: "#252629")
-        self.label3.textColor = NSColor.km_init(hex: "#252629")
-    }
-    
-    func reloadData() {
-        if KMLightMemberManager.manager.purchaseState == .subscription {
-            self.doneButton.isEnabled = false
-            self.doneButton.title = NSLocalizedString("Already Subscribed", comment: "")
-            self.doneButton.backgroundColor(NSColor.km_init(hex: "#FFD09E"))
-            self.doneButton.contentTintColor = NSColor.km_init(hex: "#F7F8FA")
-        } else {
-            self.doneButton.isEnabled = true
-            self.doneButton.title = NSLocalizedString("Subscribe", comment: "")
-            self.doneButton.backgroundColor(NSColor.km_init(hex: "#FF852E"))
-            self.doneButton.contentTintColor = NSColor.km_init(hex: "#FFFFFF")
-        }
-    }
-    
-    func updateLanguage() {
-        self.label1.stringValue = NSLocalizedString("AI robot", comment: "")
-        self.label2.stringValue = NSLocalizedString("Unlimited Conversion", comment: "")
-        self.label3.stringValue = NSLocalizedString("Save without Watermark", comment: "")
-        
-//        self.doneButton.title = NSLocalizedString("Subscribe", comment: "")
-        
-        let string1 = NSLocalizedString("Welcome to Join PDF Reader Pro!", comment: "")
-        let ParagraphStyle1 = NSMutableParagraphStyle()
-        ParagraphStyle1.lineHeightMultiple = 1.2
-        ParagraphStyle1.alignment = .left
-        self.titleLabel.attributedStringValue = NSMutableAttributedString(string: string1, attributes: [NSAttributedString.Key.paragraphStyle: ParagraphStyle1, .foregroundColor : NSColor.km_init(hex: "#616469"), NSAttributedString.Key.font: NSFont.SFProTextSemiboldFont(20.0)])
-        
-        let string2 = NSLocalizedString("Enjoy advanced features now!", comment: "")
-        let titleParagraphStyle2 = NSMutableParagraphStyle()
-        titleParagraphStyle2.lineHeightMultiple = 1.26
-        titleParagraphStyle2.alignment = .left
-        self.subtitleLabel.attributedStringValue = NSMutableAttributedString(string: string2, attributes: [NSAttributedString.Key.paragraphStyle: titleParagraphStyle2, .foregroundColor : NSColor.km_init(hex: "#252629"), NSAttributedString.Key.font: NSFont.SFProTextRegularFont(16.0)])
-        
-        let string3 = NSLocalizedString("Or subscribe to us to unlock more powerful features", comment: "")
-        let titleParagraphStyle3 = NSMutableParagraphStyle()
-        titleParagraphStyle3.lineHeightMultiple = 1.32
-        titleParagraphStyle3.alignment = .left
-        self.subscribeTitleLabel.attributedStringValue = NSMutableAttributedString(string: string3, attributes: [NSAttributedString.Key.paragraphStyle: titleParagraphStyle3, .foregroundColor : NSColor.km_init(hex: "#1AD598"), NSAttributedString.Key.font: NSFont.SFProTextSemiboldFont(14.0)])
-        
-        let string = NSLocalizedString("Want to save documents with unlimited conversion and no watermark?", comment: "") + "  " + NSLocalizedString("Subscription", comment: "")
-        let attributedString = NSMutableAttributedString.init(string: string)
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.alignment = .center;
-        attributedString.addAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#252629"),
-                                        NSAttributedString.Key.paragraphStyle : paragraphStyle],
-                                    range: NSRange(location: 0, length: string.count))
-        
-        let range = string.range(of: NSLocalizedString("Subscription", comment: ""))
-        attributedString.setAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#1770F4"),
-                                        NSAttributedString.Key.underlineColor : NSColor.clear,
-                                        NSAttributedString.Key.link : "register://"],
-                                       range: string.nsRange(from: range!)!)
-        
-        self.textView.textStorage?.setAttributedString(attributedString)
-    }
-    
-    @IBAction func doneButtonAction(_ sender: Any) {
-        guard let callBack = doneAction else { return }
-        
-        callBack(self)
-    }
-}
-
-extension KMRegisterSuccessView: NSTextViewDelegate {
-    func textView(_ textView: NSTextView, clickedOnLink link: Any, at charIndex: Int) -> Bool {
-        if link as! String == "register://" {
-            guard let callBack = self.subscribeAction else { return true }
-            
-            KMPrint("链接点击")
-            callBack(self)
-        }
-        return true
-    }
-}

+ 0 - 201
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterSuccessView.xib

@@ -1,201 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMRegisterSuccessView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="doneButton" destination="BHA-OV-pZP" id="jf3-NX-5Ue"/>
-                <outlet property="label1" destination="48Q-IG-bcz" id="pdF-3D-quF"/>
-                <outlet property="label2" destination="MCZ-IF-rje" id="1dB-ny-T7y"/>
-                <outlet property="label3" destination="5x9-Ne-EV5" id="7aP-OI-p7X"/>
-                <outlet property="subscribeTitleLabel" destination="J5R-ne-OXQ" id="8Bm-Kq-e9Z"/>
-                <outlet property="subtitleLabel" destination="BSZ-Y0-xj8" id="3K2-4M-Akc"/>
-                <outlet property="textView" destination="BmK-8g-l4S" id="NkQ-gQ-UJ7"/>
-                <outlet property="titleLabel" destination="Kzs-j2-9SX" id="k3T-1i-DkG"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="404" height="420"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BHA-OV-pZP">
-                    <rect key="frame" x="32" y="56" width="262" height="40"/>
-                    <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="Z4z-3P-BWh">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                        <string key="keyEquivalent" base64-UTF8="YES">
-DQ
-</string>
-                    </buttonCell>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="40" id="ZuO-mp-mLq"/>
-                        <constraint firstAttribute="width" constant="262" id="a4o-9T-Y67"/>
-                    </constraints>
-                    <connections>
-                        <action selector="doneButtonAction:" target="-2" id="eP8-c5-eUn"/>
-                    </connections>
-                </button>
-                <scrollView hidden="YES" borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="acP-iz-Hm7">
-                    <rect key="frame" x="32" y="8" width="340" height="40"/>
-                    <clipView key="contentView" drawsBackground="NO" id="fDR-s5-djl">
-                        <rect key="frame" x="0.0" y="0.0" width="340" height="40"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                        <subviews>
-                            <textView wantsLayer="YES" editable="NO" drawsBackground="NO" importsGraphics="NO" richText="NO" verticallyResizable="YES" spellingCorrection="YES" smartInsertDelete="YES" id="BmK-8g-l4S">
-                                <rect key="frame" x="0.0" y="0.0" width="340" height="40"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                <size key="minSize" width="340" height="40"/>
-                                <size key="maxSize" width="432" height="10000000"/>
-                                <color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
-                            </textView>
-                        </subviews>
-                        <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                    </clipView>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="40" id="FSj-LD-YRq"/>
-                    </constraints>
-                    <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="Z2q-0v-7yV">
-                        <rect key="frame" x="-100" y="-100" width="225" height="15"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </scroller>
-                    <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="3Xj-gn-5js">
-                        <rect key="frame" x="-100" y="-100" width="15" height="24"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </scroller>
-                </scrollView>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Kzs-j2-9SX">
-                    <rect key="frame" x="30" y="348" width="344" height="16"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="340" id="7jp-XF-jed"/>
-                    </constraints>
-                    <textFieldCell key="cell" title="Welcome to Join PDF Reader Pro!" id="KdZ-Rb-qy9">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BSZ-Y0-xj8">
-                    <rect key="frame" x="30" y="328" width="344" height="16"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="340" id="10Z-IV-ebu"/>
-                    </constraints>
-                    <textFieldCell key="cell" title="Enjoy advanced features now!" id="fYS-58-KFn">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="J5R-ne-OXQ">
-                    <rect key="frame" x="30" y="256" width="344" height="32"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="340" id="uBN-Un-2Iu"/>
-                    </constraints>
-                    <textFieldCell key="cell" title="You can also subscribe to us to unlock more powerful features" id="pjH-tY-cfe">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="rBp-UM-QAb">
-                    <rect key="frame" x="32" y="224" width="340" height="20"/>
-                    <subviews>
-                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="GN0-WA-nDe">
-                            <rect key="frame" x="0.0" y="2" width="16" height="16"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="16" id="LM1-9u-vgs"/>
-                                <constraint firstAttribute="width" constant="16" id="vXs-Ps-HKx"/>
-                            </constraints>
-                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="tips" id="afM-Yf-mb5"/>
-                        </imageView>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="48Q-IG-bcz">
-                            <rect key="frame" x="16" y="4" width="43" height="13"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="AI robot" id="kh4-ic-WyH">
-                                <font key="font" metaFont="system" size="10"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="kVO-Km-GXB">
-                            <rect key="frame" x="61" y="2" width="16" height="16"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="16" id="07z-Y8-b0u"/>
-                                <constraint firstAttribute="width" constant="16" id="Y6x-hN-ckM"/>
-                            </constraints>
-                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="tips" id="xkG-4a-mvW"/>
-                        </imageView>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MCZ-IF-rje">
-                            <rect key="frame" x="77" y="4" width="106" height="13"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="Unlimited conversion" id="Le5-pu-hwn">
-                                <font key="font" metaFont="system" size="10"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="eBl-xu-jYH">
-                            <rect key="frame" x="185" y="2" width="16" height="16"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="16" id="7Lk-Ye-Pgf"/>
-                                <constraint firstAttribute="width" constant="16" id="yS7-vx-ITJ"/>
-                            </constraints>
-                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="tips" id="HWb-6Q-SSX"/>
-                        </imageView>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5x9-Ne-EV5">
-                            <rect key="frame" x="201" y="4" width="120" height="13"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="Save without watermark" id="uiq-KT-aVg">
-                                <font key="font" metaFont="system" size="10"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="eBl-xu-jYH" firstAttribute="leading" secondItem="MCZ-IF-rje" secondAttribute="trailing" constant="4" id="189-0r-6tl"/>
-                        <constraint firstItem="GN0-WA-nDe" firstAttribute="leading" secondItem="rBp-UM-QAb" secondAttribute="leading" id="3MY-BE-8IX"/>
-                        <constraint firstItem="MCZ-IF-rje" firstAttribute="centerY" secondItem="rBp-UM-QAb" secondAttribute="centerY" id="5f2-pl-t8H"/>
-                        <constraint firstAttribute="width" constant="340" id="6Wh-Pe-VVw"/>
-                        <constraint firstItem="48Q-IG-bcz" firstAttribute="centerY" secondItem="rBp-UM-QAb" secondAttribute="centerY" id="HzP-Mv-Ifu"/>
-                        <constraint firstAttribute="height" constant="20" id="QMK-kV-PSZ"/>
-                        <constraint firstItem="eBl-xu-jYH" firstAttribute="centerY" secondItem="rBp-UM-QAb" secondAttribute="centerY" id="ZqD-4b-sOZ"/>
-                        <constraint firstItem="MCZ-IF-rje" firstAttribute="leading" secondItem="kVO-Km-GXB" secondAttribute="trailing" constant="2" id="hbW-rw-TIh"/>
-                        <constraint firstItem="5x9-Ne-EV5" firstAttribute="centerY" secondItem="rBp-UM-QAb" secondAttribute="centerY" id="kU7-4D-D8V"/>
-                        <constraint firstItem="48Q-IG-bcz" firstAttribute="leading" secondItem="GN0-WA-nDe" secondAttribute="trailing" constant="2" id="l3j-VH-4wq"/>
-                        <constraint firstItem="GN0-WA-nDe" firstAttribute="centerY" secondItem="rBp-UM-QAb" secondAttribute="centerY" id="mkg-W1-1qf"/>
-                        <constraint firstItem="5x9-Ne-EV5" firstAttribute="leading" secondItem="eBl-xu-jYH" secondAttribute="trailing" constant="2" id="sGU-ZF-lLp"/>
-                        <constraint firstItem="kVO-Km-GXB" firstAttribute="centerY" secondItem="rBp-UM-QAb" secondAttribute="centerY" id="tmh-4C-4q7"/>
-                        <constraint firstItem="kVO-Km-GXB" firstAttribute="leading" secondItem="48Q-IG-bcz" secondAttribute="trailing" constant="4" id="y4z-tM-eNd"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstItem="J5R-ne-OXQ" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="32" id="E9Z-cy-B3F"/>
-                <constraint firstItem="BSZ-Y0-xj8" firstAttribute="top" secondItem="Kzs-j2-9SX" secondAttribute="bottom" constant="4" id="FyH-vU-Sff"/>
-                <constraint firstItem="acP-iz-Hm7" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="32" id="HJt-UG-l1d"/>
-                <constraint firstItem="acP-iz-Hm7" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="Ki4-63-Ucg"/>
-                <constraint firstItem="Kzs-j2-9SX" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="56" id="MNF-Ec-2gf"/>
-                <constraint firstAttribute="trailing" secondItem="rBp-UM-QAb" secondAttribute="trailing" constant="32" id="RAM-Ua-B0M"/>
-                <constraint firstItem="acP-iz-Hm7" firstAttribute="top" secondItem="BHA-OV-pZP" secondAttribute="bottom" constant="8" id="Slc-Px-AZS"/>
-                <constraint firstAttribute="bottom" secondItem="BHA-OV-pZP" secondAttribute="bottom" constant="56" id="ZJx-ls-b8f"/>
-                <constraint firstItem="rBp-UM-QAb" firstAttribute="top" secondItem="J5R-ne-OXQ" secondAttribute="bottom" constant="12" id="bRE-vD-0Yb"/>
-                <constraint firstItem="J5R-ne-OXQ" firstAttribute="top" secondItem="BSZ-Y0-xj8" secondAttribute="bottom" constant="40" id="dxO-CL-Tfv"/>
-                <constraint firstAttribute="trailing" secondItem="BSZ-Y0-xj8" secondAttribute="trailing" constant="32" id="edx-0G-MQS"/>
-                <constraint firstItem="Kzs-j2-9SX" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="32" id="efh-yn-eTj"/>
-                <constraint firstItem="BSZ-Y0-xj8" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="32" id="f35-4H-ZKd"/>
-                <constraint firstItem="BHA-OV-pZP" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="32" id="hBN-Bt-LwE"/>
-                <constraint firstAttribute="trailing" secondItem="BSZ-Y0-xj8" secondAttribute="trailing" constant="32" id="lFZ-E8-j1J"/>
-                <constraint firstAttribute="trailing" secondItem="J5R-ne-OXQ" secondAttribute="trailing" constant="32" id="oWp-aL-OyK"/>
-                <constraint firstAttribute="trailing" secondItem="Kzs-j2-9SX" secondAttribute="trailing" constant="32" id="uII-6B-l8y"/>
-                <constraint firstAttribute="trailing" secondItem="acP-iz-Hm7" secondAttribute="trailing" constant="32" id="yiF-5Q-16i"/>
-            </constraints>
-            <point key="canvasLocation" x="38" y="231"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="tips" width="16" height="16"/>
-    </resources>
-</document>

+ 0 - 330
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterView.swift

@@ -1,330 +0,0 @@
-//
-//  KMRegisterView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/23.
-//
-
-import Cocoa
-
-typealias KMRegisterViewLoginAction = (_ view: KMRegisterView, _ data: KMRegisterModel) -> Void
-typealias KMRegisterViewNextAction = (_ view: KMRegisterView, _ data: KMRegisterModel, _ sender: NSButton) -> Void
-
-class KMRegisterView: BaseXibView {
-    
-    @IBOutlet weak var titleLabel: NSTextField!
-    
-    @IBOutlet weak var emailTextField: FocusAwareTextField!
-    @IBOutlet weak var emailAlertTextLabel: NSTextField!
-    @IBOutlet weak var emailContentView: NSView!
-    
-    @IBOutlet weak var passwordContentView: NSView!
-    @IBOutlet weak var passwordTextField: FocusAwareTextField!
-    @IBOutlet weak var passwordSecureTextField: FocusAwareSecureTextField!
-    @IBOutlet weak var showButton: NSButton!
-    @IBOutlet weak var passwordAlertLabel: NSTextField!
-    @IBOutlet weak var nextButton: NSButton!
-    
-    @IBOutlet var signInTextView: NSTextView!
-    
-    @IBOutlet var privacyPolicyTextView: NSTextView!
-    
-    var nextButtonVC: KMDesignButton!
-    
-    var loginAction: KMRegisterViewLoginAction?
-    var nextAction: KMRegisterViewNextAction?
-    
-    var presenter: KMRegisterPresenter = KMRegisterPresenter()
-    var model: KMRegisterModel = KMRegisterModel()
-    
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-        
-        // Drawing code here.
-    }
-    
-        
-    func setup() {
-        //初始化数据
-        self.signInTextView.delegate = self
-        self.signInTextView.isEditable = false
-        self.signInTextView.frame = (self.signInTextView.enclosingScrollView?.contentView.bounds)!
-        self.signInTextView.autoresizingMask = [.width, .height]
-        
-        self.passwordSecureTextField.isHidden = true
-    
-        self.privacyPolicyTextView.delegate = self
-        self.privacyPolicyTextView.isEditable = false
-        self.privacyPolicyTextView.frame = (self.privacyPolicyTextView.enclosingScrollView?.contentView.bounds)!
-        self.privacyPolicyTextView.autoresizingMask = [.width, .height]
-        
-        self.emailTextField.delegate = self
-        self.emailTextField.onFocus = {
-            self.emailContentView.border(NSColor.km_init(hex: "#1770F4"), 1, 4)
-        }
-        
-        self.passwordTextField.delegate = self
-        self.passwordTextField.onFocus = {
-            self.passwordContentView.border(NSColor.km_init(hex: "#1770F4"), 1, 4)
-        }
-        
-        self.passwordSecureTextField.delegate = self
-        self.passwordSecureTextField.onFocus = {
-            self.passwordContentView.border(NSColor.km_init(hex: "#1770F4"), 1, 4)
-        }
-        
-        self.nextButtonVC = KMDesignButton(withType: .Text)
-        self.nextButton.addSubview(self.nextButtonVC.view)
-        self.nextButtonVC?.view.frame = self.nextButton.bounds
-        self.nextButtonVC.target = self
-        self.nextButtonVC.action = #selector(nextButtonAction)
-
-        self.nextButtonVC.button(type: .Cta, size: .m)
-        self.nextButtonVC.button.keyEquivalent = KMKeyEquivalent.enter
-        
-        self.model.logType = .register
-        self.presenter.initPresenter(view: self, data: self.model)
-    }
-    
-    func updateLanguage() {
-        
-        self.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-        
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-        self.titleLabel.font = NSFont.SFProTextRegularFont(20.0)
-        self.titleLabel.stringValue = NSLocalizedString("Sign Up", comment: "")
-        
-        self.nextButtonVC.stringValue = NSLocalizedString("Next Step", comment: "")
-
-        //email
-        self.emailContentView.border(NSColor.km_init(hex: "#1770F4"), 1, 4)
-        self.emailTextField.textColor = NSColor.km_init(hex: "#252629")
-        self.emailTextField.font = NSFont.SFProTextRegularFont(14.0)
-        self.emailTextField.placeholderAttributedString = NSAttributedString(string: NSLocalizedString("Enter email address", comment: ""), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(14.0), NSAttributedString.Key.foregroundColor: NSColor.km_init(hex: "#94989C") ])
-        self.emailTextField.border(NSColor.km_init(hex: "#FFFFFF"), 1, 0)
-        
-        self.emailAlertTextLabel.textColor = NSColor.km_init(hex: "#F3465B")
-        self.emailAlertTextLabel.font = NSFont.SFProTextRegularFont(12.0)
-        self.emailAlertTextLabel.stringValue = NSLocalizedString("This account is registered", comment: "")
-        
-        //password
-        self.passwordContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
-        self.passwordTextField.textColor = NSColor.km_init(hex: "#252629")
-        self.passwordTextField.font = NSFont.SFProTextRegularFont(14.0)
-        self.passwordTextField.placeholderAttributedString = NSAttributedString(string: NSLocalizedString("Enter your password", comment: ""), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(14.0), NSAttributedString.Key.foregroundColor: NSColor.km_init(hex: "#94989C") ])
-        self.passwordTextField.border(NSColor.km_init(hex: "#FFFFFF"), 1, 0)
-        
-        self.passwordSecureTextField.textColor = NSColor.km_init(hex: "#252629")
-        self.passwordSecureTextField.font = NSFont.SFProTextRegularFont(14.0)
-        self.passwordSecureTextField.placeholderAttributedString = NSAttributedString(string: NSLocalizedString("Enter your password", comment: ""), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(14.0), NSAttributedString.Key.foregroundColor: NSColor.km_init(hex: "#94989C") ])
-        self.passwordSecureTextField.border(NSColor.km_init(hex: "#FFFFFF"), 1, 0)
-    
-        self.passwordAlertLabel.textColor = NSColor.km_init(hex: "#F3465B")
-        self.passwordAlertLabel.font = NSFont.SFProTextRegularFont(12.0)
-        self.passwordAlertLabel.stringValue = NSLocalizedString("At least 6 characters", comment: "")
-        
-        //singin
-        let string = NSLocalizedString("Already have an account?", comment: "") + "  " + NSLocalizedString("Log in", comment: "")
-        let attributedString = NSMutableAttributedString.init(string: string)
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.alignment = .center;
-        attributedString.addAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#252629"),
-                                        NSAttributedString.Key.paragraphStyle : paragraphStyle],
-                                    range: NSRange(location: 0, length: string.count))
-
-        let range = string.range(of: NSLocalizedString("Log in", comment: ""))
-        attributedString.setAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#1770F4"),
-                                        NSAttributedString.Key.underlineColor : NSColor.clear,
-                                        NSAttributedString.Key.link : "login://"],
-                                       range: string.nsRange(from: range!)!)
-
-        self.signInTextView.textStorage?.setAttributedString(attributedString)
-        
-        //privacyPolicy
-        let pString = NSLocalizedString("By registering, you agree to the Privacy Policy and Term Service", comment: "")
-        let pAttributedString = NSMutableAttributedString.init(string: pString)
-        let pParagraphStyle = NSMutableParagraphStyle()
-        pParagraphStyle.lineHeightMultiple = 1.23
-        pParagraphStyle.lineBreakMode = .byWordWrapping
-        pParagraphStyle.alignment = .left;
-        pAttributedString.addAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(11.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#616469"),
-                                        NSAttributedString.Key.paragraphStyle : pParagraphStyle],
-                                    range: NSRange(location: 0, length: pString.count))
-    
-        let pRange = pString.range(of: NSLocalizedString("Privacy Policy", comment: ""))
-        if pRange != nil {
-            pAttributedString.setAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(11.0),
-                                            NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#1770F4"),
-                                            NSAttributedString.Key.underlineColor : NSColor.clear,
-                                            NSAttributedString.Key.link : "privacy://"],
-                                           range: pString.nsRange(from: pRange!)!)
-        }
-        
-        let lRange = pString.range(of: NSLocalizedString("Term Service", comment: ""))
-        if lRange != nil {
-            pAttributedString.setAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(11.0),
-                                            NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#1770F4"),
-                                            NSAttributedString.Key.underlineColor : NSColor.clear,
-                                            NSAttributedString.Key.link : "license://"],
-                                           range: pString.nsRange(from: lRange!)!)
-        }
-        self.privacyPolicyTextView.textStorage?.setAttributedString(pAttributedString)
-    }
-    
-    func reloadData() {
-        KMLightMemberManager.manager.updatePopupShownToday(isPop: true)
-        
-        self.passwordTextField.stringValue = self.model.password
-        self.passwordSecureTextField.stringValue = self.model.password
-        self.emailTextField.stringValue = self.model.email
-        
-        if self.model.canNext {
-            self.nextButtonVC.enabled = true
-        } else {
-            self.nextButtonVC.enabled = false
-        }
-        
-        if self.model.password == "" {
-            self.showButton.isHidden = true
-        } else {
-            self.showButton.isHidden = false
-        }
-        
-        if self.model.secure {
-            self.showButton.image = NSImage(named: "icon_btn_hide")
-            self.passwordTextField.isHidden = true
-            self.passwordSecureTextField.isHidden = false
-        } else {
-            self.showButton.image = NSImage(named: "icon_btn_show")
-            self.passwordTextField.isHidden = false
-            self.passwordSecureTextField.isHidden = true
-        }
-        
-        
-        self.emailAlertTextLabel.stringValue = NSLocalizedString(KMRequestServerErrorCodeType.typeOfMessage(type: self.model.emailAlertType), comment: "")
-        self.passwordAlertLabel.stringValue = NSLocalizedString(KMRequestServerErrorCodeType.typeOfMessage(type: self.model.passwordAlertType), comment: "")
-    }
-}
-
-extension KMRegisterView: NSTextFieldDelegate {
-    func controlTextDidEndEditing(_ obj: Notification) {
-        KMPrint("controlTextDidEndEditing")
-        let textField = obj.object as? NSTextField
-        if (textField == self.emailTextField) {
-            self.presenter.changeEmail(string: self.emailTextField.stringValue)
-        }
-        
-        if (textField == self.passwordSecureTextField ||
-            textField == self.passwordTextField) {
-            self.presenter.changePassword(string: textField!.stringValue)
-        }
-        
-        if (textField == self.emailTextField) {
-            self.emailContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
-        }
-        
-        if (textField == self.passwordTextField ||
-            textField == self.passwordSecureTextField) {
-            self.passwordContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
-        }
-    }
-    
-    func controlTextDidChange(_ obj: Notification) {
-        let textField = obj.object as? NSTextField
-        if (textField == self.emailTextField) {
-            self.presenter.changeEmail(string: self.emailTextField.stringValue)
-            self.emailAlertTextLabel.stringValue = ""
-        }
-
-        if (textField == self.passwordSecureTextField ||
-            textField == self.passwordTextField) {
-            self.presenter.changePassword(string: textField!.stringValue)
-//            self.passwordAlertLabel.stringValue = ""
-        }
-    }
-    
-    func control(_ control: NSControl, textView: NSTextView, doCommandBy commandSelector: Selector) -> Bool {
-        switch commandSelector {
-        case #selector(NSResponder.insertNewline(_:)):
-            if let inputView = control as? NSTextField {
-                //当当前TextField按下enter
-                if (textView.string == self.emailTextField.stringValue ||
-                    textView.string == self.passwordTextField.stringValue ||
-                    textView.string == self.passwordSecureTextField.stringValue) {
-                    KMPrint("按下 enter")
-                    
-                    if self.model.canNext {
-                        self.nextButtonAction(self.nextButton)
-                    }
-                }
-            }
-            return true
-        default:
-            return false
-        }
-    }
-}
-
-extension KMRegisterView: NSTextViewDelegate {
-    func textView(_ textView: NSTextView, clickedOnLink link: Any, at charIndex: Int) -> Bool {
-        if link as! String == "login://" {
-            guard let callBack = self.loginAction else { return true }
-
-            KMPrint("链接点击")
-            callBack(self, self.model)
-        } else if link as! String == "privacy://" {
-            KMPrint("privacy点击")
-            NSWorkspace.shared.open(URL(string: "https://www.pdfreaderpro.com/privacy-policy")!)
-        } else if link as! String == "license://" {
-            KMPrint("license点击")
-            NSWorkspace.shared.open(URL(string: "https://www.pdfreaderpro.com/terms_of_service")!)
-        }
-        return true
-    }
-}
-
-
-protocol KMRegisterViewAction {}
-extension KMRegisterView: KMRegisterViewAction {
-    @IBAction func nextButtonAction(_ sender: NSButton) {
-        guard let callBack = self.nextAction else { return }
-        KMPrint("KMRegisterView 下一步")
-
-        self.changeNextButtonState(enable: false)
-        callBack(self, self.model, sender)
-    }
-    
-    @IBAction func showButtonAction(_ sender: NSButton) {
-        self.presenter.changeSecure(secure: !self.model.secure)
-        if self.model.secure {
-            self.passwordSecureTextField.becomeFirstResponder()
-        } else {
-            self.passwordTextField.becomeFirstResponder()
-        }
-    }
-    
-    func showEmailAlert(result: Result) {
-        self.emailAlertTextLabel.stringValue = NSLocalizedString(KMRequestServerErrorCodeType.typeOfMessage(type: KMRequestServerErrorCodeType(rawValue: result.code)), comment: "")
-    }
-    
-    func showPasswordAlert(result: Result) {
-        self.passwordAlertLabel.stringValue = NSLocalizedString(KMRequestServerErrorCodeType.typeOfMessage(type: KMRequestServerErrorCodeType(rawValue: result.code)), comment: "")
-    }
-    
-    func changeNextButtonState(enable: Bool) {
-        self.nextButtonVC.enabled = enable
-    }
-}
-
-extension KMRegisterView: KMRegisterPresenterDelegate {
-    func showData(presenter: KMRegisterPresenter, data: KMRegisterModel) {
-        self.reloadData()
-    }
-    
-    func showAlert(presenter: KMRegisterPresenter, data: KMRegisterModel) {
-        
-    }
-}

+ 0 - 299
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterView.xib

@@ -1,299 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMRegisterView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="emailAlertTextLabel" destination="kfS-uu-mak" id="pTF-Zd-TPX"/>
-                <outlet property="emailContentView" destination="tin-eA-NPF" id="xZU-7K-52C"/>
-                <outlet property="emailTextField" destination="Rgz-nf-zZj" id="cBz-U1-0Xp"/>
-                <outlet property="nextButton" destination="X5x-cp-Gg6" id="Joo-wX-Q4q"/>
-                <outlet property="passwordAlertLabel" destination="hfV-qw-9Iw" id="VXG-K8-A8O"/>
-                <outlet property="passwordContentView" destination="VKp-PO-O3F" id="ZIf-QV-XaE"/>
-                <outlet property="passwordSecureTextField" destination="jeC-Ej-N8u" id="kxA-dP-NJU"/>
-                <outlet property="passwordTextField" destination="OPV-8K-U25" id="WqR-2Y-SzM"/>
-                <outlet property="privacyPolicyTextView" destination="uZd-w8-jcR" id="lq3-E3-Quy"/>
-                <outlet property="showButton" destination="MVE-D5-6sg" id="3nP-lv-WbN"/>
-                <outlet property="signInTextView" destination="Ywn-Xu-NN0" id="gZk-vQ-5DG"/>
-                <outlet property="titleLabel" destination="6nc-yM-SRf" id="eGg-rX-6kf"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="404" height="461"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="ECt-77-GGh">
-                    <rect key="frame" x="0.0" y="0.0" width="404" height="461"/>
-                    <subviews>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="tsn-yR-QtA">
-                            <rect key="frame" x="48" y="241" width="308" height="172"/>
-                            <subviews>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6nc-yM-SRf">
-                                    <rect key="frame" x="-2" y="148" width="74" height="24"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Sign Up" id="wsu-MG-gNU">
-                                        <font key="font" metaFont="system" size="20"/>
-                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                    <connections>
-                                        <action selector="titleLabel:" target="-1" id="fdk-Cc-Kcm"/>
-                                    </connections>
-                                </textField>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="h7o-wJ-fX8">
-                                    <rect key="frame" x="0.0" y="62" width="308" height="54"/>
-                                    <subviews>
-                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="tin-eA-NPF">
-                                            <rect key="frame" x="0.0" y="22" width="308" height="32"/>
-                                            <subviews>
-                                                <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Rgz-nf-zZj" customClass="FocusAwareTextField" customModule="PDF_Master" customModuleProvider="target">
-                                                    <rect key="frame" x="8" y="5" width="292" height="22"/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="height" constant="22" id="qQS-Xc-JA7"/>
-                                                    </constraints>
-                                                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="border" placeholderString="Enter email address" id="KR3-11-STA">
-                                                        <font key="font" metaFont="system"/>
-                                                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                                        <allowedInputSourceLocales>
-                                                            <string>NSAllRomanInputSourcesLocaleIdentifier</string>
-                                                        </allowedInputSourceLocales>
-                                                    </textFieldCell>
-                                                </textField>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstAttribute="trailing" secondItem="Rgz-nf-zZj" secondAttribute="trailing" constant="8" id="Hsx-Fj-nQc"/>
-                                                <constraint firstItem="Rgz-nf-zZj" firstAttribute="centerY" secondItem="tin-eA-NPF" secondAttribute="centerY" id="lBc-an-TF8"/>
-                                                <constraint firstItem="Rgz-nf-zZj" firstAttribute="leading" secondItem="tin-eA-NPF" secondAttribute="leading" constant="8" id="pwn-96-eBU"/>
-                                                <constraint firstAttribute="height" constant="32" id="qn7-wN-CB4"/>
-                                            </constraints>
-                                        </customView>
-                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="kfS-uu-mak">
-                                            <rect key="frame" x="-2" y="0.0" width="312" height="20"/>
-                                            <textFieldCell key="cell" lineBreakMode="clipping" title="This account is registered" id="bDF-zO-Gr2">
-                                                <font key="font" usesAppearanceFont="YES"/>
-                                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                            </textFieldCell>
-                                        </textField>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstItem="tin-eA-NPF" firstAttribute="leading" secondItem="h7o-wJ-fX8" secondAttribute="leading" id="1cF-EY-3bl"/>
-                                        <constraint firstAttribute="bottom" secondItem="kfS-uu-mak" secondAttribute="bottom" id="4tS-nq-xi3"/>
-                                        <constraint firstAttribute="height" constant="54" id="5te-bm-gIZ"/>
-                                        <constraint firstAttribute="trailing" secondItem="kfS-uu-mak" secondAttribute="trailing" id="Flh-eb-YK4"/>
-                                        <constraint firstItem="kfS-uu-mak" firstAttribute="top" secondItem="tin-eA-NPF" secondAttribute="bottom" constant="2" id="W2U-pR-bf8"/>
-                                        <constraint firstItem="tin-eA-NPF" firstAttribute="top" secondItem="h7o-wJ-fX8" secondAttribute="top" id="kjH-gg-AAZ"/>
-                                        <constraint firstItem="kfS-uu-mak" firstAttribute="leading" secondItem="h7o-wJ-fX8" secondAttribute="leading" id="oXO-F1-tPD"/>
-                                        <constraint firstAttribute="trailing" secondItem="tin-eA-NPF" secondAttribute="trailing" id="uAS-wK-59X"/>
-                                    </constraints>
-                                </customView>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="aeb-0h-ezV">
-                                    <rect key="frame" x="0.0" y="0.0" width="308" height="54"/>
-                                    <subviews>
-                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="VKp-PO-O3F">
-                                            <rect key="frame" x="0.0" y="22" width="308" height="32"/>
-                                            <subviews>
-                                                <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OPV-8K-U25" customClass="FocusAwareTextField" customModule="PDF_Master" customModuleProvider="target">
-                                                    <rect key="frame" x="8" y="5" width="268" height="22"/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="height" constant="22" id="pyL-Hq-qPT"/>
-                                                    </constraints>
-                                                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="border" placeholderString="Enter your password" id="4Vw-LN-4tV">
-                                                        <font key="font" metaFont="system"/>
-                                                        <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                        <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                        <allowedInputSourceLocales>
-                                                            <string>NSAllRomanInputSourcesLocaleIdentifier</string>
-                                                        </allowedInputSourceLocales>
-                                                    </textFieldCell>
-                                                </textField>
-                                                <secureTextField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jeC-Ej-N8u" customClass="FocusAwareSecureTextField" customModule="PDF_Master" customModuleProvider="target">
-                                                    <rect key="frame" x="8" y="6" width="268" height="20"/>
-                                                    <secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="border" usesSingleLineMode="YES" id="TDw-Zs-8zV">
-                                                        <font key="font" metaFont="system"/>
-                                                        <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                        <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                        <allowedInputSourceLocales>
-                                                            <string>NSAllRomanInputSourcesLocaleIdentifier</string>
-                                                        </allowedInputSourceLocales>
-                                                    </secureTextFieldCell>
-                                                </secureTextField>
-                                                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MVE-D5-6sg">
-                                                    <rect key="frame" x="284" y="8" width="16" height="16"/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="width" constant="16" id="buh-UN-7bw"/>
-                                                        <constraint firstAttribute="height" constant="16" id="gwH-U1-xlT"/>
-                                                    </constraints>
-                                                    <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="icon_btn_show" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="YH6-Jr-PBJ">
-                                                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                                        <font key="font" metaFont="system"/>
-                                                    </buttonCell>
-                                                    <connections>
-                                                        <action selector="showButtonAction:" target="-2" id="zfS-RC-d1Z"/>
-                                                    </connections>
-                                                </button>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="32" id="0zE-pw-QLN"/>
-                                                <constraint firstItem="jeC-Ej-N8u" firstAttribute="centerY" secondItem="VKp-PO-O3F" secondAttribute="centerY" id="GCn-vm-QFc"/>
-                                                <constraint firstItem="OPV-8K-U25" firstAttribute="centerY" secondItem="VKp-PO-O3F" secondAttribute="centerY" id="Hnp-MD-qDD"/>
-                                                <constraint firstAttribute="trailing" secondItem="MVE-D5-6sg" secondAttribute="trailing" constant="8" id="JyZ-hP-iNF"/>
-                                                <constraint firstItem="OPV-8K-U25" firstAttribute="leading" secondItem="VKp-PO-O3F" secondAttribute="leading" constant="8" id="QU5-xl-6SK"/>
-                                                <constraint firstItem="MVE-D5-6sg" firstAttribute="leading" secondItem="jeC-Ej-N8u" secondAttribute="trailing" constant="8" id="RmL-Hu-Ruv"/>
-                                                <constraint firstItem="MVE-D5-6sg" firstAttribute="leading" secondItem="OPV-8K-U25" secondAttribute="trailing" constant="8" id="WB4-0h-W3h"/>
-                                                <constraint firstItem="jeC-Ej-N8u" firstAttribute="leading" secondItem="VKp-PO-O3F" secondAttribute="leading" constant="8" id="lUd-FL-QB8"/>
-                                                <constraint firstItem="MVE-D5-6sg" firstAttribute="centerY" secondItem="VKp-PO-O3F" secondAttribute="centerY" id="owZ-Kj-GMu"/>
-                                            </constraints>
-                                        </customView>
-                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hfV-qw-9Iw">
-                                            <rect key="frame" x="-2" y="0.0" width="312" height="20"/>
-                                            <textFieldCell key="cell" lineBreakMode="clipping" title="At least 6 characters" id="tHP-ur-lxc">
-                                                <font key="font" usesAppearanceFont="YES"/>
-                                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                            </textFieldCell>
-                                        </textField>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstAttribute="trailing" secondItem="hfV-qw-9Iw" secondAttribute="trailing" id="0Tr-nh-K2p"/>
-                                        <constraint firstItem="hfV-qw-9Iw" firstAttribute="top" secondItem="VKp-PO-O3F" secondAttribute="bottom" constant="2" id="5th-hp-Lpm"/>
-                                        <constraint firstAttribute="height" constant="54" id="IdW-Dx-NQp"/>
-                                        <constraint firstItem="VKp-PO-O3F" firstAttribute="top" secondItem="aeb-0h-ezV" secondAttribute="top" id="Wpf-sD-ED7"/>
-                                        <constraint firstAttribute="trailing" secondItem="VKp-PO-O3F" secondAttribute="trailing" id="bwR-e4-fqb"/>
-                                        <constraint firstItem="hfV-qw-9Iw" firstAttribute="leading" secondItem="aeb-0h-ezV" secondAttribute="leading" id="ct3-aJ-f0F"/>
-                                        <constraint firstAttribute="bottom" secondItem="hfV-qw-9Iw" secondAttribute="bottom" id="eth-rT-ovm"/>
-                                        <constraint firstItem="VKp-PO-O3F" firstAttribute="leading" secondItem="aeb-0h-ezV" secondAttribute="leading" id="hpk-e8-W6n"/>
-                                    </constraints>
-                                </customView>
-                            </subviews>
-                            <constraints>
-                                <constraint firstItem="h7o-wJ-fX8" firstAttribute="top" secondItem="6nc-yM-SRf" secondAttribute="bottom" constant="32" id="159-Mj-70L"/>
-                                <constraint firstAttribute="trailing" secondItem="aeb-0h-ezV" secondAttribute="trailing" id="5D2-Qt-drh"/>
-                                <constraint firstItem="h7o-wJ-fX8" firstAttribute="leading" secondItem="tsn-yR-QtA" secondAttribute="leading" id="8U5-CU-6ml"/>
-                                <constraint firstAttribute="trailing" secondItem="h7o-wJ-fX8" secondAttribute="trailing" id="F4h-mH-O6z"/>
-                                <constraint firstAttribute="height" constant="172" id="P1I-PK-of9"/>
-                                <constraint firstItem="aeb-0h-ezV" firstAttribute="leading" secondItem="tsn-yR-QtA" secondAttribute="leading" id="Rc2-3m-pp5"/>
-                                <constraint firstItem="6nc-yM-SRf" firstAttribute="leading" secondItem="tsn-yR-QtA" secondAttribute="leading" id="bC8-8V-8Cj"/>
-                                <constraint firstItem="aeb-0h-ezV" firstAttribute="top" secondItem="h7o-wJ-fX8" secondAttribute="bottom" constant="8" id="nDd-xc-4Zd"/>
-                                <constraint firstItem="6nc-yM-SRf" firstAttribute="top" secondItem="tsn-yR-QtA" secondAttribute="top" id="nxS-Kg-bZY"/>
-                            </constraints>
-                        </customView>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="jlX-70-1O3">
-                            <rect key="frame" x="0.0" y="56" width="404" height="124"/>
-                            <subviews>
-                                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="X5x-cp-Gg6">
-                                    <rect key="frame" x="48" y="92" width="308" height="32"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="32" id="Yeh-ev-cnS"/>
-                                    </constraints>
-                                    <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" enabled="NO" imageScaling="proportionallyDown" inset="2" id="OAQ-RN-7Sv">
-                                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                        <font key="font" metaFont="system"/>
-                                        <string key="keyEquivalent" base64-UTF8="YES">
-DQ
-</string>
-                                    </buttonCell>
-                                </button>
-                                <scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="If9-lk-VtL">
-                                    <rect key="frame" x="48" y="64" width="308" height="20"/>
-                                    <clipView key="contentView" drawsBackground="NO" id="GKv-wW-uYP">
-                                        <rect key="frame" x="0.0" y="0.0" width="308" height="20"/>
-                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                        <subviews>
-                                            <textView wantsLayer="YES" importsGraphics="NO" richText="NO" verticallyResizable="YES" spellingCorrection="YES" smartInsertDelete="YES" id="Ywn-Xu-NN0">
-                                                <rect key="frame" x="0.0" y="0.0" width="308" height="20"/>
-                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                                <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <size key="minSize" width="308" height="20"/>
-                                                <size key="maxSize" width="340" height="10000000"/>
-                                                <color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
-                                            </textView>
-                                        </subviews>
-                                        <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                    </clipView>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="20" id="VSx-wA-dSd"/>
-                                    </constraints>
-                                    <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="0GU-al-Xfz">
-                                        <rect key="frame" x="-100" y="-100" width="225" height="15"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                    </scroller>
-                                    <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="ErU-3N-oZw">
-                                        <rect key="frame" x="-100" y="-100" width="15" height="20"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                    </scroller>
-                                </scrollView>
-                                <scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="S8F-9A-616">
-                                    <rect key="frame" x="48" y="4" width="308" height="36"/>
-                                    <clipView key="contentView" drawsBackground="NO" id="DC0-Q2-OdW">
-                                        <rect key="frame" x="0.0" y="0.0" width="308" height="36"/>
-                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                        <subviews>
-                                            <textView wantsLayer="YES" importsGraphics="NO" richText="NO" verticallyResizable="YES" spellingCorrection="YES" smartInsertDelete="YES" id="uZd-w8-jcR">
-                                                <rect key="frame" x="0.0" y="0.0" width="308" height="36"/>
-                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <size key="minSize" width="308" height="36"/>
-                                                <size key="maxSize" width="340" height="10000000"/>
-                                                <color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
-                                            </textView>
-                                        </subviews>
-                                        <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                    </clipView>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="36" id="knE-BO-8U3"/>
-                                    </constraints>
-                                    <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="8QH-dI-MSi">
-                                        <rect key="frame" x="-100" y="-100" width="225" height="15"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                    </scroller>
-                                    <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="M5e-9O-Qwu">
-                                        <rect key="frame" x="-100" y="-100" width="15" height="36"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                    </scroller>
-                                </scrollView>
-                            </subviews>
-                            <constraints>
-                                <constraint firstAttribute="trailing" secondItem="S8F-9A-616" secondAttribute="trailing" constant="48" id="8fo-oM-dLD"/>
-                                <constraint firstItem="X5x-cp-Gg6" firstAttribute="top" secondItem="jlX-70-1O3" secondAttribute="top" id="8on-KH-b2f"/>
-                                <constraint firstItem="If9-lk-VtL" firstAttribute="top" secondItem="X5x-cp-Gg6" secondAttribute="bottom" constant="8" id="A3s-vY-9a0"/>
-                                <constraint firstAttribute="height" constant="124" id="GPe-SL-l6i"/>
-                                <constraint firstItem="S8F-9A-616" firstAttribute="top" secondItem="If9-lk-VtL" secondAttribute="bottom" constant="24" id="PLd-xn-9eY"/>
-                                <constraint firstAttribute="trailing" secondItem="If9-lk-VtL" secondAttribute="trailing" constant="48" id="Tl7-64-Mm6"/>
-                                <constraint firstAttribute="trailing" secondItem="X5x-cp-Gg6" secondAttribute="trailing" constant="48" id="WLW-AF-qyP"/>
-                                <constraint firstItem="S8F-9A-616" firstAttribute="leading" secondItem="jlX-70-1O3" secondAttribute="leading" constant="48" id="k34-7A-JjU"/>
-                                <constraint firstItem="X5x-cp-Gg6" firstAttribute="leading" secondItem="jlX-70-1O3" secondAttribute="leading" constant="48" id="k7t-3Q-8uH"/>
-                                <constraint firstItem="If9-lk-VtL" firstAttribute="leading" secondItem="jlX-70-1O3" secondAttribute="leading" constant="48" id="wfA-o9-Xp7"/>
-                            </constraints>
-                        </customView>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="jlX-70-1O3" firstAttribute="leading" secondItem="ECt-77-GGh" secondAttribute="leading" id="Ecl-Xz-Eva"/>
-                        <constraint firstItem="tsn-yR-QtA" firstAttribute="top" secondItem="ECt-77-GGh" secondAttribute="top" constant="48" id="NjI-af-kQv"/>
-                        <constraint firstAttribute="trailing" secondItem="tsn-yR-QtA" secondAttribute="trailing" constant="48" id="Rvh-G1-6hC"/>
-                        <constraint firstAttribute="trailing" secondItem="jlX-70-1O3" secondAttribute="trailing" id="cro-OQ-2Hv"/>
-                        <constraint firstItem="tsn-yR-QtA" firstAttribute="leading" secondItem="ECt-77-GGh" secondAttribute="leading" constant="48" id="kw3-LK-HEJ"/>
-                        <constraint firstAttribute="bottom" secondItem="jlX-70-1O3" secondAttribute="bottom" constant="56" id="sj8-Bs-31F"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstItem="ECt-77-GGh" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="FX5-yV-bC9"/>
-                <constraint firstAttribute="trailing" secondItem="ECt-77-GGh" secondAttribute="trailing" id="J5D-4L-PbN"/>
-                <constraint firstAttribute="bottom" secondItem="ECt-77-GGh" secondAttribute="bottom" id="VUv-QX-mbm"/>
-                <constraint firstItem="ECt-77-GGh" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="fns-3L-qEw"/>
-            </constraints>
-            <point key="canvasLocation" x="33" y="96.5"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="icon_btn_show" width="16" height="16"/>
-    </resources>
-</document>

+ 0 - 305
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMResetPasswordView.swift

@@ -1,305 +0,0 @@
-//
-//  KMResetPasswordView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/25.
-//
-
-import Cocoa
-
-typealias KMResetPasswordViewDoneAction = (_ view: KMResetPasswordView, _ data: KMRegisterModel, _ sender: NSButton) -> Void
-class KMResetPasswordView: BaseXibView {
-
-    @IBOutlet weak var titleLabel: NSTextField!
-    
-    @IBOutlet weak var passwordContentView: NSView!
-    @IBOutlet weak var passwordTextField: FocusAwareTextField!
-    @IBOutlet weak var passwordSecureTextField: FocusAwareSecureTextField!
-    @IBOutlet weak var showButton: NSButton!
-    @IBOutlet weak var passwordAlertLabel: NSTextField!
-    
-    @IBOutlet weak var rePasswordContentView: NSView!
-    @IBOutlet weak var rePasswordTextField: FocusAwareTextField!
-    @IBOutlet weak var rePasswordSecureTextField: FocusAwareSecureTextField!
-    @IBOutlet weak var reShowButton: NSButton!
-    @IBOutlet weak var rePasswordAlertLabel: NSTextField!
-    @IBOutlet weak var doneButton: NSButton!
-    
-    var doneButtonVC: KMDesignButton!
-    
-    var presenter: KMRegisterPresenter = KMRegisterPresenter()
-    var model: KMRegisterModel = KMRegisterModel()
-    
-    var email: String = "" {
-        didSet {
-            self.model.email = self.email
-        }
-    }
-    
-    var doneAction: KMResetPasswordViewDoneAction?
-    
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    func setup() {
-        self.model.logType = .resetPassword
-        
-        self.titleLabel.font = NSFont.SFProTextSemiboldFont(20.0)
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-        
-        
-        self.passwordTextField.delegate = self
-        self.passwordSecureTextField.delegate = self
-        self.passwordTextField.onFocus = {
-            self.passwordContentView.border(NSColor.km_init(hex: "#1770F4"), 1, 4)
-        }
-        
-        self.passwordSecureTextField.onFocus = {
-            self.passwordContentView.border(NSColor.km_init(hex: "#1770F4"), 1, 4)
-        }
-        
-        
-        self.rePasswordTextField.delegate = self
-        self.rePasswordSecureTextField.delegate = self
-        self.rePasswordTextField.onFocus = {
-            self.rePasswordContentView.border(NSColor.km_init(hex: "#1770F4"), 1, 4)
-        }
-        
-        self.rePasswordSecureTextField.onFocus = {
-            self.rePasswordContentView.border(NSColor.km_init(hex: "#1770F4"), 1, 4)
-        }
-        
-        self.doneButtonVC = KMDesignButton(withType: .Text)
-        self.doneButton.addSubview(self.doneButtonVC.view)
-        self.doneButtonVC?.view.frame = self.doneButton.bounds
-        self.doneButtonVC.target = self
-        self.doneButtonVC.action = #selector(doneButtonAction)
-        self.doneButtonVC.button(type: .Cta, size: .m)
-        self.doneButtonVC.button.keyEquivalent = KMKeyEquivalent.enter
-        
-        self.presenter.initPresenter(view: self, data: self.model)
-    }
-    
-    func updateUI() {
-        //password
-        self.passwordContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
-        self.passwordTextField.textColor = NSColor.km_init(hex: "#252629")
-        self.passwordTextField.font = NSFont.SFProTextRegularFont(14.0)
-        self.passwordTextField.border(NSColor.km_init(hex: "#FFFFFF"), 1, 0)
-        
-        self.passwordSecureTextField.textColor = NSColor.km_init(hex: "#252629")
-        self.passwordSecureTextField.font = NSFont.SFProTextRegularFont(14.0)
-        self.passwordSecureTextField.border(NSColor.km_init(hex: "#FFFFFF"), 1, 0)
-        
-        self.passwordAlertLabel.textColor = NSColor.km_init(hex: "#F3465B")
-        self.passwordAlertLabel.font = NSFont.SFProTextRegularFont(12.0)
-        
-        //repassword
-        self.rePasswordContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
-        self.rePasswordTextField.textColor = NSColor.km_init(hex: "#252629")
-        self.rePasswordTextField.font = NSFont.SFProTextRegularFont(14.0)
-        self.rePasswordTextField.border(NSColor.km_init(hex: "#FFFFFF"), 1, 0)
-        
-        self.rePasswordSecureTextField.textColor = NSColor.km_init(hex: "#252629")
-        self.rePasswordSecureTextField.font = NSFont.SFProTextRegularFont(14.0)
-        self.rePasswordSecureTextField.border(NSColor.km_init(hex: "#FFFFFF"), 1, 0)
-        
-        self.rePasswordAlertLabel.textColor = NSColor.km_init(hex: "#F3465B")
-        self.rePasswordAlertLabel.font = NSFont.SFProTextRegularFont(12.0)
-    }
-    
-    func reloadData() {
-        
-        self.passwordTextField.stringValue = self.model.password
-        self.passwordSecureTextField.stringValue = self.model.password
-        
-        self.rePasswordTextField.stringValue = self.model.rePassword
-        self.rePasswordSecureTextField.stringValue = self.model.rePassword
-        
-        if self.model.password == "" {
-            self.showButton.isHidden = true
-        } else {
-            self.showButton.isHidden = false
-        }
-        
-        if self.model.rePassword == "" {
-            self.reShowButton.isHidden = true
-        } else {
-            self.reShowButton.isHidden = false
-        }
-        
-        if self.model.secure {
-            self.showButton.image = NSImage(named: "icon_btn_hide")
-            self.passwordTextField.isHidden = true
-            self.passwordSecureTextField.isHidden = false
-        } else {
-            self.showButton.image = NSImage(named: "icon_btn_show")
-            self.passwordTextField.isHidden = false
-            self.passwordSecureTextField.isHidden = true
-        }
-        
-        if self.model.reSecure {
-            self.reShowButton.image = NSImage(named: "icon_btn_hide")
-            self.rePasswordTextField.isHidden = true
-            self.rePasswordSecureTextField.isHidden = false
-        } else {
-            self.reShowButton.image = NSImage(named: "icon_btn_show")
-            self.rePasswordTextField.isHidden = false
-            self.rePasswordSecureTextField.isHidden = true
-        }
-        
-        if self.model.canNext {
-            self.doneButtonVC.enabled = true
-        } else {
-            self.doneButtonVC.enabled = false
-        }
-        
-        self.passwordAlertLabel.stringValue = NSLocalizedString(KMRequestServerErrorCodeType.typeOfMessage(type: self.model.passwordAlertType), comment: "")
-        self.rePasswordAlertLabel.stringValue = NSLocalizedString(KMRequestServerErrorCodeType.typeOfMessage(type: self.model.rePasswordAlertType), comment: "")
-    }
-    
-     func resetData() {
-    
-        self.model.password = ""
-        self.model.rePassword = ""
-        self.reloadData()
-    }
-    
-    func updateLanguage() {
-        
-        self.titleLabel.stringValue = NSLocalizedString("Reset Password", comment: "")
-        
-        self.doneButtonVC.stringValue = NSLocalizedString("OK", comment: "")
-        
-        //password
-        self.passwordTextField.placeholderAttributedString = NSAttributedString(string: NSLocalizedString("Enter new password", comment: ""), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(14.0), NSAttributedString.Key.foregroundColor: NSColor.km_init(hex: "#94989C") ])
-        
-        self.passwordSecureTextField.placeholderAttributedString = NSAttributedString(string: NSLocalizedString("Enter new password", comment: ""), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(14.0), NSAttributedString.Key.foregroundColor: NSColor.km_init(hex: "#94989C") ])
-    
-        
-        //rePassword
-        self.rePasswordTextField.placeholderAttributedString = NSAttributedString(string: NSLocalizedString("Enter the new password again", comment: ""), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(14.0), NSAttributedString.Key.foregroundColor: NSColor.km_init(hex: "#94989C") ])
-        
-        self.rePasswordSecureTextField.placeholderAttributedString = NSAttributedString(string: NSLocalizedString("Enter the new password again", comment: ""), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(14.0), NSAttributedString.Key.foregroundColor: NSColor.km_init(hex: "#94989C") ])
-    
-    }
-}
-
-protocol KMResetPasswordViewAction {}
-extension KMResetPasswordView : KMResetPasswordViewAction {
-    
-    
-    @IBAction func doneButtonAction(_ sender: NSButton) {
-        guard let callBack = doneAction else { return }
-        
-        if self.model.password != self.model.rePassword {
-            self.showAlert(result: Result(code: 320))
-            return
-        }
-        
-        self.changeDoneButtonState(enable: false)
-        callBack(self, self.model, sender)
-    }
-    
-    @IBAction func showButtonAction(_ sender: Any) {
-        self.presenter.changeSecure(secure: !self.model.secure)
-        if self.model.secure {
-            self.passwordSecureTextField.becomeFirstResponder()
-        } else {
-            self.passwordTextField.becomeFirstResponder()
-        }
-    }
-    
-    @IBAction func reShowButtonAction(_ sender: Any) {
-        self.presenter.changeReSecure(secure: !self.model.reSecure)
-        if self.model.secure {
-            self.rePasswordSecureTextField.becomeFirstResponder()
-        } else {
-            self.rePasswordTextField.becomeFirstResponder()
-        }
-    }
-    
-    func showAlert(result: Result?) {
-        if result != nil {
-            self.rePasswordAlertLabel.stringValue = NSLocalizedString(KMRequestServerErrorCodeType.typeOfMessage(type: KMRequestServerErrorCodeType(rawValue: result!.code)), comment: "")
-        }
-    }
-    
-    func changeDoneButtonState(enable: Bool) {
-        self.doneButtonVC.enabled = enable
-    }
-}
-
-extension KMResetPasswordView: NSTextFieldDelegate {
-    func controlTextDidEndEditing(_ obj: Notification) {
-        let textField = obj.object as? NSTextField
-        if (textField == self.passwordTextField ||
-            textField == self.passwordSecureTextField) {
-            self.passwordContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
-        }
-        
-        if (textField == self.rePasswordTextField ||
-            textField == self.rePasswordSecureTextField) {
-            self.rePasswordContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
-        }
-        
-        if (textField == self.passwordSecureTextField ||
-            textField == self.passwordTextField) {
-            self.presenter.changePassword(string: textField!.stringValue)
-        }
-        
-        if (textField == self.rePasswordSecureTextField ||
-            textField == self.rePasswordTextField) {
-            self.presenter.changeRePassword(string: textField!.stringValue)
-        }
-    }
-    
-    func controlTextDidChange(_ obj: Notification) {
-        let textField = obj.object as? NSTextField
-        if (textField == self.passwordSecureTextField ||
-            textField == self.passwordTextField) {
-            self.presenter.changePassword(string: textField!.stringValue)
-        }
-        
-        if (textField == self.rePasswordSecureTextField ||
-            textField == self.rePasswordTextField) {
-            self.presenter.changeRePassword(string: textField!.stringValue)
-        }
-    }
-    
-    func control(_ control: NSControl, textView: NSTextView, doCommandBy commandSelector: Selector) -> Bool {
-        switch commandSelector {
-        case #selector(NSResponder.insertNewline(_:)):
-            if let inputView = control as? NSTextField {
-                //当当前TextField按下enter
-                if (textView.string == self.passwordTextField.stringValue ||
-                    textView.string == self.passwordSecureTextField.stringValue ||
-                    textView.string == self.rePasswordTextField.stringValue ||
-                    textView.string == self.rePasswordSecureTextField.stringValue) {
-                    KMPrint("按下 enter")
-                    
-                    if self.model.canNext {
-                        self.doneButtonAction(self.doneButton)
-                    }
-                }
-            }
-            return true
-        default:
-            return false
-        }
-    }
-}
-
-extension KMResetPasswordView: KMRegisterPresenterDelegate {
-    func showData(presenter: KMRegisterPresenter, data: KMRegisterModel) {
-        self.reloadData()
-    }
-    
-    func showAlert(presenter: KMRegisterPresenter, data: KMRegisterModel) {
-        
-    }
-}
-

+ 0 - 235
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMResetPasswordView.xib

@@ -1,235 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMResetPasswordView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="doneButton" destination="V94-fh-pV8" id="cRN-LT-Hzr"/>
-                <outlet property="passwordAlertLabel" destination="S3I-lh-2pB" id="qRx-yK-3dm"/>
-                <outlet property="passwordContentView" destination="QVr-yK-c7l" id="R30-nk-N8b"/>
-                <outlet property="passwordSecureTextField" destination="HjQ-Ir-c1K" id="hBj-ek-ohx"/>
-                <outlet property="passwordTextField" destination="9aV-vU-Yrm" id="6n4-sT-rX2"/>
-                <outlet property="rePasswordAlertLabel" destination="bA0-Va-KC7" id="FMt-Fd-dPu"/>
-                <outlet property="rePasswordContentView" destination="CYd-rp-4G4" id="hC6-65-xmy"/>
-                <outlet property="rePasswordSecureTextField" destination="TvB-NY-BFX" id="xx7-2C-ACc"/>
-                <outlet property="rePasswordTextField" destination="hqd-kg-bPA" id="1Sn-pg-XvJ"/>
-                <outlet property="reShowButton" destination="Fo5-uK-u3C" id="qFg-tC-eWi"/>
-                <outlet property="showButton" destination="sMR-TV-xrU" id="RXf-CD-CaP"/>
-                <outlet property="titleLabel" destination="fWn-WD-fax" id="JSQ-0a-dJT"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="404" height="420"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="mUk-T4-sYS">
-                    <rect key="frame" x="48" y="196" width="308" height="176"/>
-                    <subviews>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fWn-WD-fax">
-                            <rect key="frame" x="-2" y="160" width="37" height="16"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="mII-56-f1E">
-                                <font key="font" usesAppearanceFont="YES"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="CJL-gm-MAI">
-                            <rect key="frame" x="0.0" y="62" width="308" height="54"/>
-                            <subviews>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="S3I-lh-2pB">
-                                    <rect key="frame" x="-2" y="0.0" width="130" height="16"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="At least 6 characters" id="pnh-bi-f56">
-                                        <font key="font" usesAppearanceFont="YES"/>
-                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="QVr-yK-c7l">
-                                    <rect key="frame" x="0.0" y="22" width="308" height="32"/>
-                                    <subviews>
-                                        <textField verticalHuggingPriority="750" contentType="password" translatesAutoresizingMaskIntoConstraints="NO" id="9aV-vU-Yrm" customClass="FocusAwareTextField" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="8" y="5" width="268" height="22"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="22" id="jn6-yk-MJN"/>
-                                            </constraints>
-                                            <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="border" placeholderString="Enter your password" id="xkg-Pf-ceP">
-                                                <font key="font" metaFont="system"/>
-                                                <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <allowedInputSourceLocales>
-                                                    <string>NSAllRomanInputSourcesLocaleIdentifier</string>
-                                                </allowedInputSourceLocales>
-                                            </textFieldCell>
-                                        </textField>
-                                        <secureTextField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="HjQ-Ir-c1K" customClass="FocusAwareSecureTextField" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="8" y="6" width="268" height="20"/>
-                                            <secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="border" usesSingleLineMode="YES" id="KXj-xa-VvR">
-                                                <font key="font" metaFont="system"/>
-                                                <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <allowedInputSourceLocales>
-                                                    <string>NSAllRomanInputSourcesLocaleIdentifier</string>
-                                                </allowedInputSourceLocales>
-                                            </secureTextFieldCell>
-                                        </secureTextField>
-                                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sMR-TV-xrU">
-                                            <rect key="frame" x="284" y="8" width="16" height="16"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="16" id="LzH-MR-h5X"/>
-                                                <constraint firstAttribute="width" constant="16" id="pAg-sF-bOZ"/>
-                                            </constraints>
-                                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="icon_btn_show" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="5zp-Fc-2vi">
-                                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                                <font key="font" metaFont="system"/>
-                                            </buttonCell>
-                                            <connections>
-                                                <action selector="showButtonAction:" target="-2" id="Jlh-MO-TZq"/>
-                                            </connections>
-                                        </button>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstItem="HjQ-Ir-c1K" firstAttribute="centerY" secondItem="QVr-yK-c7l" secondAttribute="centerY" id="3qb-Ci-ZOP"/>
-                                        <constraint firstAttribute="trailing" secondItem="sMR-TV-xrU" secondAttribute="trailing" constant="8" id="8nw-X1-L8E"/>
-                                        <constraint firstItem="sMR-TV-xrU" firstAttribute="leading" secondItem="HjQ-Ir-c1K" secondAttribute="trailing" constant="8" id="8zr-6H-s0e"/>
-                                        <constraint firstItem="HjQ-Ir-c1K" firstAttribute="leading" secondItem="QVr-yK-c7l" secondAttribute="leading" constant="8" id="UMT-6I-rlf"/>
-                                        <constraint firstAttribute="height" constant="32" id="V5P-sm-R6m"/>
-                                        <constraint firstItem="sMR-TV-xrU" firstAttribute="centerY" secondItem="QVr-yK-c7l" secondAttribute="centerY" id="XpB-Oq-s9E"/>
-                                        <constraint firstItem="9aV-vU-Yrm" firstAttribute="centerY" secondItem="QVr-yK-c7l" secondAttribute="centerY" id="ZyE-XJ-gIh"/>
-                                        <constraint firstItem="sMR-TV-xrU" firstAttribute="leading" secondItem="9aV-vU-Yrm" secondAttribute="trailing" constant="8" id="mFs-dT-MGd"/>
-                                        <constraint firstItem="9aV-vU-Yrm" firstAttribute="leading" secondItem="QVr-yK-c7l" secondAttribute="leading" constant="8" id="wBf-Vn-aHr"/>
-                                    </constraints>
-                                </customView>
-                            </subviews>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="54" id="BOB-OL-22Y"/>
-                                <constraint firstItem="QVr-yK-c7l" firstAttribute="leading" secondItem="CJL-gm-MAI" secondAttribute="leading" id="FSN-rW-pgM"/>
-                                <constraint firstAttribute="trailing" secondItem="QVr-yK-c7l" secondAttribute="trailing" id="HzA-DY-zZF"/>
-                                <constraint firstItem="QVr-yK-c7l" firstAttribute="top" secondItem="CJL-gm-MAI" secondAttribute="top" id="KSj-KW-iUy"/>
-                                <constraint firstItem="S3I-lh-2pB" firstAttribute="leading" secondItem="CJL-gm-MAI" secondAttribute="leading" id="LIP-7P-Mur"/>
-                                <constraint firstAttribute="bottom" secondItem="S3I-lh-2pB" secondAttribute="bottom" id="gwd-7T-Q2Z"/>
-                            </constraints>
-                        </customView>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Ewv-hc-4gp">
-                            <rect key="frame" x="0.0" y="0.0" width="308" height="54"/>
-                            <subviews>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bA0-Va-KC7">
-                                    <rect key="frame" x="-2" y="0.0" width="130" height="16"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="At least 6 characters" id="RZK-lh-eFc">
-                                        <font key="font" usesAppearanceFont="YES"/>
-                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="CYd-rp-4G4">
-                                    <rect key="frame" x="0.0" y="22" width="308" height="32"/>
-                                    <subviews>
-                                        <textField verticalHuggingPriority="750" contentType="password" translatesAutoresizingMaskIntoConstraints="NO" id="hqd-kg-bPA" customClass="FocusAwareTextField" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="8" y="5" width="268" height="22"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="22" id="spi-7i-Sgi"/>
-                                            </constraints>
-                                            <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="border" placeholderString="Enter your password" id="aHp-84-NdC">
-                                                <font key="font" metaFont="system"/>
-                                                <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <allowedInputSourceLocales>
-                                                    <string>NSAllRomanInputSourcesLocaleIdentifier</string>
-                                                </allowedInputSourceLocales>
-                                            </textFieldCell>
-                                        </textField>
-                                        <secureTextField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TvB-NY-BFX" customClass="FocusAwareSecureTextField" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="8" y="6" width="268" height="20"/>
-                                            <secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="border" usesSingleLineMode="YES" id="q1a-hJ-YJy">
-                                                <font key="font" metaFont="system"/>
-                                                <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                <allowedInputSourceLocales>
-                                                    <string>NSAllRomanInputSourcesLocaleIdentifier</string>
-                                                </allowedInputSourceLocales>
-                                            </secureTextFieldCell>
-                                        </secureTextField>
-                                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Fo5-uK-u3C">
-                                            <rect key="frame" x="284" y="8" width="16" height="16"/>
-                                            <constraints>
-                                                <constraint firstAttribute="width" constant="16" id="ke5-t5-jyp"/>
-                                                <constraint firstAttribute="height" constant="16" id="xKd-Eb-8tW"/>
-                                            </constraints>
-                                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="icon_btn_show" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="9WP-V5-xMa">
-                                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                                <font key="font" metaFont="system"/>
-                                            </buttonCell>
-                                            <connections>
-                                                <action selector="reShowButtonAction:" target="-2" id="gbT-Xh-CBQ"/>
-                                            </connections>
-                                        </button>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstItem="Fo5-uK-u3C" firstAttribute="leading" secondItem="hqd-kg-bPA" secondAttribute="trailing" constant="8" id="5fH-4Y-pii"/>
-                                        <constraint firstAttribute="height" constant="32" id="6yn-4x-7gu"/>
-                                        <constraint firstItem="Fo5-uK-u3C" firstAttribute="leading" secondItem="TvB-NY-BFX" secondAttribute="trailing" constant="8" id="JJ7-4c-rYa"/>
-                                        <constraint firstItem="hqd-kg-bPA" firstAttribute="centerY" secondItem="CYd-rp-4G4" secondAttribute="centerY" id="VEw-Ms-44n"/>
-                                        <constraint firstAttribute="trailing" secondItem="Fo5-uK-u3C" secondAttribute="trailing" constant="8" id="Vd2-db-CKZ"/>
-                                        <constraint firstItem="TvB-NY-BFX" firstAttribute="centerY" secondItem="CYd-rp-4G4" secondAttribute="centerY" id="cmf-8z-rgP"/>
-                                        <constraint firstItem="TvB-NY-BFX" firstAttribute="leading" secondItem="CYd-rp-4G4" secondAttribute="leading" constant="8" id="g2V-4j-shF"/>
-                                        <constraint firstItem="Fo5-uK-u3C" firstAttribute="centerY" secondItem="CYd-rp-4G4" secondAttribute="centerY" id="gWC-9U-5bE"/>
-                                        <constraint firstItem="hqd-kg-bPA" firstAttribute="leading" secondItem="CYd-rp-4G4" secondAttribute="leading" constant="8" id="wSu-eI-QZu"/>
-                                    </constraints>
-                                </customView>
-                            </subviews>
-                            <constraints>
-                                <constraint firstAttribute="bottom" secondItem="bA0-Va-KC7" secondAttribute="bottom" id="5tn-Fa-ToE"/>
-                                <constraint firstAttribute="trailing" secondItem="CYd-rp-4G4" secondAttribute="trailing" id="FFR-Pi-b4J"/>
-                                <constraint firstItem="CYd-rp-4G4" firstAttribute="leading" secondItem="Ewv-hc-4gp" secondAttribute="leading" id="R9j-NN-dHD"/>
-                                <constraint firstItem="CYd-rp-4G4" firstAttribute="top" secondItem="Ewv-hc-4gp" secondAttribute="top" id="W8w-ag-ftL"/>
-                                <constraint firstAttribute="height" constant="54" id="bX7-V6-BWs"/>
-                                <constraint firstItem="bA0-Va-KC7" firstAttribute="leading" secondItem="Ewv-hc-4gp" secondAttribute="leading" id="jQo-m2-Tn5"/>
-                            </constraints>
-                        </customView>
-                    </subviews>
-                    <constraints>
-                        <constraint firstAttribute="trailing" secondItem="Ewv-hc-4gp" secondAttribute="trailing" id="3ct-ut-6Ce"/>
-                        <constraint firstItem="Ewv-hc-4gp" firstAttribute="top" secondItem="CJL-gm-MAI" secondAttribute="bottom" constant="8" id="CnB-Fx-4qZ"/>
-                        <constraint firstAttribute="height" constant="176" id="Qac-wZ-nte"/>
-                        <constraint firstItem="Ewv-hc-4gp" firstAttribute="leading" secondItem="mUk-T4-sYS" secondAttribute="leading" id="Vgd-N1-qHd"/>
-                        <constraint firstItem="CJL-gm-MAI" firstAttribute="leading" secondItem="mUk-T4-sYS" secondAttribute="leading" id="XtP-Yv-phI"/>
-                        <constraint firstAttribute="trailing" secondItem="CJL-gm-MAI" secondAttribute="trailing" id="mt0-IU-wEb"/>
-                        <constraint firstItem="fWn-WD-fax" firstAttribute="top" secondItem="mUk-T4-sYS" secondAttribute="top" id="ofb-ZU-JBM"/>
-                        <constraint firstItem="fWn-WD-fax" firstAttribute="leading" secondItem="mUk-T4-sYS" secondAttribute="leading" id="uvw-fm-By2"/>
-                        <constraint firstItem="CJL-gm-MAI" firstAttribute="top" secondItem="mUk-T4-sYS" secondAttribute="top" constant="60" id="ygQ-vA-ZI2"/>
-                    </constraints>
-                </customView>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="V94-fh-pV8">
-                    <rect key="frame" x="50" y="148" width="304" height="32"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="32" id="aM1-E6-2KD"/>
-                    </constraints>
-                    <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" enabled="NO" imageScaling="proportionallyDown" inset="2" id="CkC-c8-RDw">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                        <string key="keyEquivalent" base64-UTF8="YES">
-DQ
-</string>
-                    </buttonCell>
-                </button>
-            </subviews>
-            <constraints>
-                <constraint firstItem="V94-fh-pV8" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="50" id="EAi-mb-lZZ"/>
-                <constraint firstItem="mUk-T4-sYS" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="48" id="LcV-WK-Heq"/>
-                <constraint firstItem="V94-fh-pV8" firstAttribute="top" secondItem="mUk-T4-sYS" secondAttribute="bottom" constant="16" id="UzI-aD-Ghg"/>
-                <constraint firstAttribute="trailing" secondItem="mUk-T4-sYS" secondAttribute="trailing" constant="48" id="aqE-bX-QPV"/>
-                <constraint firstAttribute="trailing" secondItem="V94-fh-pV8" secondAttribute="trailing" constant="50" id="pDK-YG-Hyq"/>
-                <constraint firstItem="mUk-T4-sYS" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="48" id="sZB-qr-tE0"/>
-            </constraints>
-            <point key="canvasLocation" x="61" y="252"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="icon_btn_show" width="16" height="16"/>
-    </resources>
-</document>

+ 0 - 81
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/SubscribeSuccess/KMSubscribeSuccessWindowController.swift

@@ -1,81 +0,0 @@
-//
-//  KMSubscribeSuccessWindowController.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/6/26.
-//
-
-import Cocoa
-
-var subscribeSuccessController: KMSubscribeSuccessWindowController?
-var subscribeSuccessMainWindow: NSWindow?
-
-typealias KMSubscribeSuccessWindowControllerCloseAction = (_ controller: KMSubscribeSuccessWindowController) -> Void
-class KMSubscribeSuccessWindowController: NSWindowController {
-    
-    @IBOutlet weak var successView: KMSubscribeSuccessView!
-    var closeAction: KMSubscribeSuccessWindowControllerCloseAction?
-    
-    deinit {
-        KMPrint("KMSubscribeSuccessWindowController 释放")
-    }
-    
-    override func windowDidLoad() {
-        super.windowDidLoad()
-        self.setup()
-        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-    }
-    
-    //MARK: 打开文件
-    static func show(window: NSWindow) -> KMSubscribeSuccessWindowController {
-        if let controller: KMSubscribeSuccessWindowController = KMSubscribeSuccessWindowController.fetchSampleController() {
-            return controller
-        } else {
-            let subscribeSuccessWindowController: KMSubscribeSuccessWindowController = KMSubscribeSuccessWindowController.init(windowNibName: "KMSubscribeSuccessWindowController")
-            window.beginSheet(subscribeSuccessWindowController.window!)
-            subscribeSuccessWindowController.window?.center()
-            
-            subscribeSuccessWindowController.closeAction = { controller in
-                controller.closeWindow()
-            }
-            
-            subscribeSuccessController = subscribeSuccessWindowController
-            subscribeSuccessMainWindow = window
-            return subscribeSuccessWindowController
-        }
-    }
-    
-    func setup() {
-        self.window?.contentView?.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-        self.successView.doneAction = { [weak self] view in
-            
-            guard let callBack = self?.closeAction else { return }
-            
-            
-            callBack((self!))
-        }
-    }
-    
-    func closeWindow() {
-        if subscribeSuccessMainWindow != nil {
-            subscribeSuccessMainWindow?.endSheet((subscribeSuccessController?.window)!)
-        }
-        
-        if subscribeSuccessController != nil {
-            subscribeSuccessController?.window?.close()
-        }
-        subscribeSuccessController = nil
-        subscribeSuccessMainWindow = nil
-    }
-    
-    static func fetchSampleController() -> KMSubscribeSuccessWindowController? {
-        for window in NSApp.windows {
-            let controller = window.windowController
-            if controller is KMSubscribeSuccessWindowController {
-                return controller as! KMSubscribeSuccessWindowController
-            }
-        }
-        
-        return nil
-    }
-}

+ 0 - 45
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/SubscribeSuccess/KMSubscribeSuccessWindowController.xib

@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMSubscribeSuccessWindowController" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="successView" destination="blv-Bz-ntJ" id="NmZ-cc-ohf"/>
-                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
-            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="326" height="346"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
-            <value key="minSize" type="size" width="326" height="346"/>
-            <value key="maxSize" type="size" width="326" height="346"/>
-            <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="326" height="346"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="blv-Bz-ntJ" customClass="KMSubscribeSuccessView" customModule="PDF_Master" customModuleProvider="target">
-                        <rect key="frame" x="0.0" y="0.0" width="326" height="346"/>
-                    </customView>
-                </subviews>
-                <constraints>
-                    <constraint firstItem="blv-Bz-ntJ" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="NvT-rS-tqL"/>
-                    <constraint firstAttribute="trailing" secondItem="blv-Bz-ntJ" secondAttribute="trailing" id="k3h-8z-eUO"/>
-                    <constraint firstItem="blv-Bz-ntJ" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="nqV-F3-jxv"/>
-                    <constraint firstAttribute="bottom" secondItem="blv-Bz-ntJ" secondAttribute="bottom" id="rm7-TW-Vfa"/>
-                </constraints>
-            </view>
-            <connections>
-                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
-            </connections>
-            <point key="canvasLocation" x="132" y="-82"/>
-        </window>
-    </objects>
-</document>

+ 0 - 51
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/SubscribeSuccess/View/KMSubscribeSuccessView.swift

@@ -1,51 +0,0 @@
-//
-//  KMSubscribeSuccessView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/6/26.
-//
-
-import Cocoa
-
-typealias KMSubscribeSuccessViewDoneAction = (_ controller: KMSubscribeSuccessView) -> Void
-
-class KMSubscribeSuccessView: BaseXibView {
-    @IBOutlet weak var imageView: NSImageView!
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var subtitleLabel: NSTextField!
-    @IBOutlet weak var doneButton: NSButton!
-    
-    var doneAction: KMSubscribeSuccessViewDoneAction?
-    
-    
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    func setup() {
-        self.titleLabel.font = NSFont.SFProTextSemiboldFont(20)
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-        
-        self.subtitleLabel.font = NSFont.SFProTextSemiboldFont(14)
-        self.subtitleLabel.textColor = NSColor.km_init(hex: "#616469")
-        
-        self.doneButton.contentTintColor = NSColor.km_init(hex: "#FFFFFF")
-        self.doneButton.font = NSFont.SFProTextRegularFont(14)
-        self.doneButton.backgroundColor(NSColor.km_init(hex: "#1770F4"))
-        self.doneButton.border(NSColor.clear, 0, 4)
-    }
-    
-    func updateLanguage() {
-        self.titleLabel.stringValue = NSLocalizedString("Subscribe Successfully!", comment: "")
-        self.subtitleLabel.stringValue = NSLocalizedString("Enjoy all advanced features now", comment: "")
-        self.doneButton.title = NSLocalizedString("OK", comment: "")
-    }
-    
-    @IBAction func doneButtonAction(_ sender: Any) {
-        guard let callBack = doneAction else { return }
-        
-        callBack(self)
-    }
-}

+ 0 - 77
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/SubscribeSuccess/View/KMSubscribeSuccessView.xib

@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMSubscribeSuccessView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="doneButton" destination="pg8-Y2-DpD" id="NNp-JW-fwq"/>
-                <outlet property="imageView" destination="0IX-5W-LlB" id="me9-sE-o5T"/>
-                <outlet property="subtitleLabel" destination="7Sh-Dk-VGq" id="h9j-hG-A5p"/>
-                <outlet property="titleLabel" destination="fQI-W7-VIG" id="NQl-Hh-BLy"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="326" height="346"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0IX-5W-LlB">
-                    <rect key="frame" x="101" y="188" width="125" height="90"/>
-                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="Frame 1081" id="X4z-aw-ypF"/>
-                </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fQI-W7-VIG">
-                    <rect key="frame" x="94" y="156" width="139" height="16"/>
-                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Subscription Success" id="Cqi-83-S6W">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7Sh-Dk-VGq">
-                    <rect key="frame" x="30" y="108" width="266" height="32"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="262" id="KMH-NM-82g"/>
-                    </constraints>
-                    <textFieldCell key="cell" alignment="center" title="You now have unlimited access to all premium features" id="YaK-xh-6LW">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pg8-Y2-DpD">
-                    <rect key="frame" x="32" y="40" width="262" height="32"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="262" id="LHw-wf-MTB"/>
-                        <constraint firstAttribute="height" constant="32" id="oif-NT-bDC"/>
-                    </constraints>
-                    <buttonCell key="cell" type="square" title="OK" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="A6M-48-z5n">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="doneButtonAction:" target="-2" id="gRc-Pl-iwf"/>
-                    </connections>
-                </button>
-            </subviews>
-            <constraints>
-                <constraint firstItem="fQI-W7-VIG" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="Dji-w7-9Cw"/>
-                <constraint firstItem="7Sh-Dk-VGq" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="NsK-OI-8tw"/>
-                <constraint firstItem="fQI-W7-VIG" firstAttribute="top" secondItem="0IX-5W-LlB" secondAttribute="bottom" constant="16" id="blo-Zg-Rj2"/>
-                <constraint firstItem="0IX-5W-LlB" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="68" id="ck0-mW-hqI"/>
-                <constraint firstItem="pg8-Y2-DpD" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="fq7-06-t2f"/>
-                <constraint firstItem="0IX-5W-LlB" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="mmB-ec-WyE"/>
-                <constraint firstItem="7Sh-Dk-VGq" firstAttribute="top" secondItem="fQI-W7-VIG" secondAttribute="bottom" constant="16" id="uML-W6-sQD"/>
-                <constraint firstAttribute="bottom" secondItem="pg8-Y2-DpD" secondAttribute="bottom" constant="40" id="vfQ-Bg-wfz"/>
-            </constraints>
-            <point key="canvasLocation" x="22" y="-5"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="Frame 1081" width="125" height="90"/>
-    </resources>
-</document>

+ 0 - 307
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/KMSubscribeWaterMarkWindowController.swift

@@ -1,307 +0,0 @@
-//
-//  KMSubscribeWaterMarkWindowController.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/6/12.
-//
-
-import Cocoa
-var subscribeWaterMarkController: KMSubscribeWaterMarkWindowController?
-var subscribeWaterMarkMainWindow: NSWindow?
-
-@objc enum KMSubscribeWaterMarkType: Int {
-    case none       = 0
-    case stamp      = 1
-    case link
-    case sign
-    case editText
-    case editImage
-    case insert
-    case extract
-    case replace
-    case split
-    case delete
-    case rotate
-    case copy
-    case toWord
-    case toExcel
-    case toPPT
-    case toRTF
-    case toCSV
-    case toHTML
-    case toText
-    case toImage
-    case compress
-    case merge
-    case setPassword
-    case removePassword
-    case crop
-    case aiTranslate
-    case aiRewrite
-    case aiCorrect
-    case save
-    
-    func isConvertType() -> Bool {
-        if (self == .toWord || self == .toExcel || self == .toPPT || self == .toRTF || self == .toCSV || self == .toHTML || self == .toText || self == .toImage) {
-            return true
-        }
-        return false
-    }
-}
-
-typealias KMSubscribeWaterMarkWindowControllerCloseAction = (_ controller: KMSubscribeWaterMarkWindowController) -> Void
-typealias KMSubscribeWaterMarkWindowControllerWatermarkExportAction = (_ controller: KMSubscribeWaterMarkWindowController) -> Void
-typealias KMSubscribeWaterMarkWindowControllerSubscribeAction = (_ controller: KMSubscribeWaterMarkWindowController) -> Void
-
-var tempType: KMSubscribeWaterMarkType = .none
-var tempLimit: Bool = false
-var tempContinue: Bool = false
-
-class KMSubscribeWaterMarkWindowController: NSWindowController {
-
-    @IBOutlet weak var waterMarkView: KMSubscribeWaterMarkView!
-    @IBOutlet weak var waterViewHeightConstrain: NSLayoutConstraint!
-    
-    var closeAction: KMSubscribeWaterMarkWindowControllerCloseAction?
-    var subscribeAction: KMSubscribeWaterMarkWindowControllerSubscribeAction?
-    var watermarkExportAction: KMSubscribeWaterMarkWindowControllerWatermarkExportAction?
-    
-    var isContinue: Bool?
-    var isAI: Bool?
-    var isLimit: Bool?
-    var type: KMSubscribeWaterMarkType? {
-        didSet {
-            self.waterMarkView?.type = type
-        }
-    }
-    
-    deinit {
-        KMPrint("KMSubscribeWaterMarkWindowController 释放")
-    }
-    
-    override func windowDidLoad() {
-        super.windowDidLoad()
-        
-        self.waterMarkView.subscribeLabel.stringValue = ""
-        self.setup()
-        self.reloadData()
-        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-    }
-    
-    override func awakeFromNib() {
-        super.awakeFromNib()
-        
-//        self.waterMarkView.subscribeLabel.stringValue = ""
-    }
-    
-    //MARK: 打开文件
-    @objc static func show(window: NSWindow, isContinue: Bool = false, limit: Bool = false, type: KMSubscribeWaterMarkType = .none, subscribeDidClick: (()->Void)? = nil, completion: @escaping (_ isSubscribeSuccess: Bool, _ isWaterMarkExport: Bool, _ isClose: Bool) -> Void) -> KMSubscribeWaterMarkWindowController {
-        #if VERSION_DMG
-        if type != .save && !KMLightMemberManager.manager.isLogin() {
-            KMLoginWindowController.show(window: window)
-            return KMSubscribeWaterMarkWindowController()
-        }
-        #endif
-        tempLimit = limit
-        tempType = type
-        tempContinue = isContinue
-        
-        var isAI = false
-        if type == .aiCorrect ||
-            type == .aiRewrite ||
-            type == .aiTranslate {
-            isAI = true
-        } else {
-            isAI = false
-        }
-        
-        if isAI && KMLightMemberManager.manager.purchaseState != .subscription {
-            if KMLightMemberManager.manager.isLogin() {
-                KMComparativeTableViewController.show(window: NSApp.mainWindow!, .equity)
-            } else {
-                let controller = KMLoginWindowController.show(window: NSApp.mainWindow!,.equity)
-                if isAI {
-                    let alert = NSAlert()
-                    alert.messageText = NSLocalizedString("Please Login or Sign up to proceed to the next step.", comment: "")
-                    alert.informativeText = NSLocalizedString("On upgrading your account, you can enjoy all AI features in PDF Reader Pro.", comment: "")
-                    alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
-                    alert.beginSheetModal(for: (controller?.window)!) { result in
-
-                    }
-                }
-            }
-            return KMSubscribeWaterMarkWindowController.init()
-        } else {
-            let subscribeWaterMarkWindowController: KMSubscribeWaterMarkWindowController = KMSubscribeWaterMarkWindowController.init(windowNibName: "KMSubscribeWaterMarkWindowController")
-
-            subscribeWaterMarkWindowController.isContinue = isContinue
-            subscribeWaterMarkWindowController.isAI = isAI
-            subscribeWaterMarkWindowController.isLimit = limit
-            
-            window.beginSheet(subscribeWaterMarkWindowController.window!)
-            subscribeWaterMarkWindowController.window?.center()
-            subscribeWaterMarkWindowController.type = type
-            subscribeWaterMarkWindowController.reloadData()
-            
-            subscribeWaterMarkWindowController.closeAction = { controller in
-                completion(false, false, true)
-                subscribeWaterMarkMainWindow?.endSheet(controller.window!)
-                controller.window?.close()
-                
-                subscribeWaterMarkController = nil
-                subscribeWaterMarkMainWindow = nil
-            }
-            
-            subscribeWaterMarkWindowController.watermarkExportAction = { controller in
-                completion(false, true, false)
-                subscribeWaterMarkMainWindow?.endSheet(controller.window!)
-                controller.window?.close()
-                subscribeWaterMarkController = nil
-                subscribeWaterMarkMainWindow = nil
-            }
-            
-            subscribeWaterMarkWindowController.subscribeAction = { controller in
-                if let callback = subscribeDidClick {
-                    callback()
-                }
-                
-                subscribeWaterMarkMainWindow?.endSheet(controller.window!)
-                controller.window?.close()
-                subscribeWaterMarkController = nil
-                
-                if KMLightMemberManager.manager.isLogin() ||
-                    type == .save ||
-                    ((type.isConvertType() || type == .merge) && !limit) {
-                    _ = KMComparativeTableViewController.show(window: subscribeWaterMarkMainWindow ?? NSWindow(), .equity, inputType: type)
-                } else {
-                    _ = KMLoginWindowController.show(window: subscribeWaterMarkMainWindow ?? NSWindow())
-                }
-                subscribeWaterMarkMainWindow = nil
-            }
-            
-            subscribeWaterMarkController = subscribeWaterMarkWindowController
-            subscribeWaterMarkMainWindow = window
-            return subscribeWaterMarkWindowController
-        }
-    }
-    
-    func setup() {
-        self.window?.contentView?.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-        self.waterMarkView.waterExportButton.title = ""
-        self.waterMarkView.subscribeLabel.stringValue = ""
-        self.waterMarkView.closeAction = { [weak self] view in
-            guard let callBack = self?.closeAction else { return }
-            
-            callBack((self!))
-        }
-        
-        self.waterMarkView.waterMarkExportAction = { [weak self] view in
-            self?.trackEvent(eventName: "PUW_Sub_SaveWatermark")
-            
-            guard let callBack = self?.watermarkExportAction else { return }
-            
-            callBack((self!))
-        }
-        
-        self.waterMarkView.subscribeAction = { [weak self] view in
-            guard let callBack = self?.subscribeAction else { return }
-            
-            callBack((self!))
-        }
-    }
-    
-    func closeWindow() {
-        if subscribeWaterMarkMainWindow != nil {
-            subscribeWaterMarkMainWindow?.endSheet((subscribeWaterMarkController?.window)!)
-        }
-        
-        if subscribeWaterMarkController != nil {
-            subscribeWaterMarkController?.window?.close()
-        }
-        subscribeWaterMarkController = nil
-        subscribeWaterMarkMainWindow = nil
-    }
-    
-    func reloadData() {
-        if KMSubscribeWaterMarkWindowController.canShowSubscripBenefits() {
-            self.waterViewHeightConstrain.constant = 462
-        } else {
-            self.waterViewHeightConstrain.constant = 563
-        }
-        self.waterMarkView.type = tempType
-        self.waterMarkView.updateConstraints()
-        
-        self.updateLanguage()
-    }
-    
-    func updateLanguage() {
-        if self.waterMarkView != nil {
-            if tempContinue {
-                self.waterMarkView.waterExportButton.title = NSLocalizedString("Save with Watermark", comment: "")
-            } else {
-                if tempType == .merge {
-                    if (tempLimit) {
-                        self.waterMarkView.waterExportButton.title = NSLocalizedString("Exceed Times Limit", comment: "")
-                        self.waterMarkView.isSecondEnable = false
-                        
-                        self.waterMarkView.subscribeLabel.stringValue = NSLocalizedString("Upgrade Now", comment: "")
-                    } else {
-                        self.waterMarkView.isSecondEnable = true
-                        self.waterMarkView.waterExportButton.title = NSLocalizedString("Delete Files from List", comment: "")
-                    }
-                } else if tempType.isConvertType() {
-                    if (tempLimit) {
-                        self.waterMarkView.waterExportButton.title = NSLocalizedString("Exceed Times Limit", comment: "")
-                        self.waterMarkView.isSecondEnable = false
-                        
-                        self.waterMarkView.subscribeLabel.stringValue = NSLocalizedString("Upgrade Now", comment: "")
-                    } else {
-                        self.waterMarkView.isSecondEnable = true
-    //                        if KMLightMemberManager.manager.isLogin() {
-                        self.waterMarkView.waterExportButton.title = NSLocalizedString("Convert First 10 Pages", comment: "")
-    //                        } else {
-    //                            subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Later", comment: "")
-    //                        }
-                    }
-                } else if (type == .save) {
-                    self.waterMarkView.subscribeLabel.stringValue = NSLocalizedString("Upgrade Now", comment: "")
-                    self.waterMarkView.waterExportButton.title = NSLocalizedString("Save with Watermark", comment: "")
-                } else {
-                    self.waterMarkView.waterExportButton.title = NSLocalizedString("Save with Watermark", comment: "")
-                }
-            }
-        }
-    }
-    
-    static func isSampleController() -> KMSubscribeWaterMarkWindowController {
-        for window in NSApp.windows {
-            let controller = window.windowController
-            if controller is KMSubscribeWaterMarkWindowController {
-                return controller as! KMSubscribeWaterMarkWindowController
-            }
-        }
-        return KMSubscribeWaterMarkWindowController()
-    }
-    
-    static func canShowSubscripBenefits() -> Bool {
-#if VERSION_DMG
-        return KMLightMemberManager.manager.isLogin() || tempType == .save || ((tempType.isConvertType() || tempType == .merge) && tempLimit)
-#else
-        return KMLightMemberManager.manager.isLogin() || tempType == .save || ((tempType.isConvertType() || tempType == .merge) && !tempLimit)
-#endif
-    }
-}
-
-// MARK: - Analytics (埋点)
-
-extension KMSubscribeWaterMarkWindowController {
-    func trackEvent(eventName: String) -> Void {
-        KMAnalytics.trackEvent(eventName: eventName, parameters: [
-            KMAnalytics.Parameter.categoryKey : KMAnalytics.Category.puw,
-            KMAnalytics.Parameter.labelKey : KMAnalytics.Label.sub_PUW], platform: .AppCenter, appTarget: .all)
-    }
-    
-    func trackEvent(type: KMSubscribeWaterMarkType) -> Void {
-        KMTools.trackEvent(type: type)
-    }
-}

+ 0 - 47
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/KMSubscribeWaterMarkWindowController.xib

@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22146" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22146"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMSubscribeWaterMarkWindowController" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="waterMarkView" destination="kKR-sQ-MOd" id="fGR-m7-LXP"/>
-                <outlet property="waterViewHeightConstrain" destination="hGQ-d7-hqP" id="vbA-h6-64B"/>
-                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
-            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="450" height="563"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
-            <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="450" height="564"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="kKR-sQ-MOd" customClass="KMSubscribeWaterMarkView" customModule="PDF_Master" customModuleProvider="target">
-                        <rect key="frame" x="0.0" y="0.0" width="450" height="564"/>
-                        <constraints>
-                            <constraint firstAttribute="height" constant="564" id="hGQ-d7-hqP"/>
-                        </constraints>
-                    </customView>
-                </subviews>
-                <constraints>
-                    <constraint firstItem="kKR-sQ-MOd" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="TME-WS-T2u"/>
-                    <constraint firstItem="kKR-sQ-MOd" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="jgr-r3-ZJl"/>
-                    <constraint firstAttribute="bottom" secondItem="kKR-sQ-MOd" secondAttribute="bottom" id="spz-6F-wy7"/>
-                    <constraint firstAttribute="trailing" secondItem="kKR-sQ-MOd" secondAttribute="trailing" id="vZl-h3-qH3"/>
-                </constraints>
-            </view>
-            <connections>
-                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
-            </connections>
-            <point key="canvasLocation" x="-293" y="-29.5"/>
-        </window>
-    </objects>
-</document>

+ 0 - 53
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkCollectionItem.swift

@@ -1,53 +0,0 @@
-//
-//  KMSubscribeWaterMarkCollectionItem.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/6/26.
-//
-
-import Cocoa
-
-class KMSubscribeWaterMarkCollectionItem: NSCollectionViewItem {
-
-    @IBOutlet weak var iconImageView: NSImageView!
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var subtitleLabel: NSTextField!
-    
-    
-    var data: [String: Any] = [:] {
-        didSet {
-            self.reloadData()
-        }
-    }
-    
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        // Do view setup here.
-        self.setup()
-    }
-    
-    func setup() {
-        self.titleLabel.textColor = NSColor.km_init(hex: "#273C62")
-        self.titleLabel.font = NSFont.SFProTextSemiboldFont(14)
-        
-        self.subtitleLabel.textColor = NSColor.km_init(hex: "#616469")
-        self.subtitleLabel.font = NSFont.SFProTextRegularFont(12)
-    }
-    
-    func reloadData() {
-        if data.count != 0 {
-            let titleString: String = data["title"] as? String ?? ""
-            let subtitleString: String = data["subtitle"] as? String ?? ""
-            self.titleLabel.stringValue = NSLocalizedString(titleString, comment: "")
-            self.subtitleLabel.stringValue = NSLocalizedString(subtitleString, comment: "")
-            self.iconImageView.image = NSImage(named: data["image"] as! NSImage.Name)
-            
-            let paragraphStyle = NSMutableParagraphStyle()
-            paragraphStyle.lineHeightMultiple = 1.4
-            paragraphStyle.alignment = .left
-            self.titleLabel.attributedStringValue = NSMutableAttributedString(string: NSLocalizedString(titleString, comment: ""), attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle])
-            
-            self.subtitleLabel.attributedStringValue = NSMutableAttributedString(string: NSLocalizedString(subtitleString, comment: ""), attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle])
-        }
-    }
-}

+ 0 - 68
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkCollectionItem.xib

@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22146" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22146"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMSubscribeWaterMarkCollectionItem" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="iconImageView" destination="UN8-s9-tdC" id="UMG-qF-mLi"/>
-                <outlet property="subtitleLabel" destination="BPg-hS-GYT" id="Etv-zF-0HZ"/>
-                <outlet property="titleLabel" destination="KPf-lK-ZOs" id="uNG-sd-iq6"/>
-                <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="Hz6-mo-xeY">
-            <rect key="frame" x="0.0" y="0.0" width="400" height="66"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="UN8-s9-tdC">
-                    <rect key="frame" x="0.0" y="30" width="36" height="36"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="36" id="102-PK-XGI"/>
-                        <constraint firstAttribute="width" constant="36" id="MHf-sf-xcA"/>
-                    </constraints>
-                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="ai" id="3QX-xa-XNA"/>
-                </imageView>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KPf-lK-ZOs">
-                    <rect key="frame" x="42" y="50" width="360" height="16"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="356" id="Qfq-qo-48g"/>
-                    </constraints>
-                    <textFieldCell key="cell" title="Using the AI function" id="WM5-O9-VQg">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BPg-hS-GYT">
-                    <rect key="frame" x="42" y="14" width="354" height="32"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="350" id="me1-1N-hoI"/>
-                    </constraints>
-                    <textFieldCell key="cell" title="The trial watermark will be added when you save the file after trying the advanced features" id="C0c-sD-YMa">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-            </subviews>
-            <constraints>
-                <constraint firstItem="BPg-hS-GYT" firstAttribute="top" secondItem="KPf-lK-ZOs" secondAttribute="bottom" constant="4" id="VaQ-Hx-xrd"/>
-                <constraint firstItem="UN8-s9-tdC" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="Xtq-yn-qyT"/>
-                <constraint firstItem="BPg-hS-GYT" firstAttribute="leading" secondItem="KPf-lK-ZOs" secondAttribute="leading" id="gNR-NW-m3M"/>
-                <constraint firstItem="KPf-lK-ZOs" firstAttribute="leading" secondItem="UN8-s9-tdC" secondAttribute="trailing" constant="8" id="j2j-VA-qcr"/>
-                <constraint firstItem="UN8-s9-tdC" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="vtj-uR-u5F"/>
-                <constraint firstItem="KPf-lK-ZOs" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="xMc-CF-EUQ"/>
-            </constraints>
-            <point key="canvasLocation" x="-147" y="191"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="ai" width="36" height="36"/>
-    </resources>
-</document>

+ 0 - 276
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkView.swift

@@ -1,276 +0,0 @@
-//
-//  KMSubscribeWaterMarkView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/6/12.
-//
-
-import Cocoa
-
-typealias KMSubscribeWaterMarkViewCancelAction = (_ view: KMSubscribeWaterMarkView) -> Void
-typealias KMSubscribeWaterMarkViewSubscribeAction = (_ view: KMSubscribeWaterMarkView) -> Void
-typealias KMSubscribeWaterMarkViewWaterMarkExportAction = (_ view: KMSubscribeWaterMarkView) -> Void
-typealias KMSubscribeWaterMarkViewWaterMarkRestoreAction = (_ view: KMSubscribeWaterMarkView) -> Void
-
-class KMSubscribeWaterMarkView: BaseXibView {
-
-    @IBOutlet weak var closeBox: KMBox!
-    @IBOutlet weak var closeButton: NSButton!
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var subtitleLabel: NSTextField!
-    @IBOutlet weak var subtitleContentHeightConstraint: NSLayoutConstraint!
-    @IBOutlet weak var subTitleContentView: NSView!
-    @IBOutlet weak var scrollView: NSScrollView!
-    @IBOutlet weak var collectionView: NSCollectionView!
-    @IBOutlet weak var collectionViewContentTopConstraint: NSLayoutConstraint!
-    @IBOutlet weak var collectionContentViewHeightConstraint: NSLayoutConstraint!
-    @IBOutlet weak var waterExportButton: NSButton!
-    @IBOutlet weak var subscribeView: NSView!
-    @IBOutlet weak var subscribeLabel: NSTextField!
-    @IBOutlet weak var subscribeBox: KMBox!
-    @IBOutlet weak var lineView: NSView!
-    @IBOutlet weak var cancelBox: KMBox!
-    
-    var closeAction: KMSubscribeWaterMarkViewCancelAction?
-    var subscribeAction: KMSubscribeWaterMarkViewSubscribeAction?
-    var waterMarkExportAction: KMSubscribeWaterMarkViewWaterMarkExportAction?
-    
-    var dataArray: [[String: String]] = [[:]]
-    
-    var type: KMSubscribeWaterMarkType? {
-        didSet {
-            self.reloadData()
-            self.updateLanguage()
-        }
-    }
-    
-    var afterLoginDataArray = [
-        ["title": "Save without Watermark",
-         "subtitle": "Free trial version will add a PDF Reader Pro official watermark to the document when saving.",
-         "image": "remove watermark"],
-//        ["title": "AI assitant",
-//         "subtitle": "Support AI translation, AI rewriting, AI correction",
-//         "image": "ai"],
-        ["title": "Convert without Page Limit",
-         "subtitle": "Free trial users can only convert the first 10 pages of a document.",
-         "image": "convert"],
-        ["title": "Merge PDFs without Limitation",
-         "subtitle": "Free trial users can only combine 2 files at once.",
-         "image": "merging"]
-    ]
-    
-    var beforeLoginDataArray = [
-        ["title": "AI Assistant",
-         "subtitle": "AI translation, AI rewriting, AI correction.",
-         "image": "ai"],
-        ["title": "Unlimited Conversion Times",
-         "subtitle": "Free trial users can only convert the first ten pages of a PDF, up to 2 times.",
-         "image": "convert"],
-        ["title": "Unlimited Merge Times",
-         "subtitle": "Free trial users can merge two files at once, up to 2 times.",
-         "image": "merging"],
-        ["title": "Unlock All Functions",
-         "subtitle": "Log in to free trial all features.",
-         "image": "full function trial"]
-    ]
-    
-    let popover = NSPopover()
-    var isSubscription: Bool = false
-    var isSecondEnable: Bool = true {
-        didSet {
-            if isSecondEnable {
-                self.cancelBox.isHidden = !isSecondEnable
-                self.waterExportButton.isEnabled = isSecondEnable
-            } else {
-                self.cancelBox.isHidden = !isSecondEnable
-//                self.waterExportButton.isEnabled = isSecondEnable
-                self.waterExportButton.contentTintColor = NSColor.km_init(hex: "#F3465B")
-                self.waterExportButton.backgroundColor(NSColor.clear)
-                self.waterExportButton.border(NSColor.km_init(hex: "#DFE1E5"), 0, 20)
-                self.waterExportButton.font = NSFont.SFProTextRegularFont(12)
-            }
-        }
-    }
-    
-    func setup() {
-        self.closeBox.moveCallback = { [weak self] (mouseEntered, mouseBox) in
-            if mouseEntered {
-                self?.closeButton?.image = NSImage(named: "control_btn_icon_close_hov")
-            } else {
-                self?.closeButton?.image = NSImage(named: "control_btn_icon_close")
-            }
-        }
-        
-        self.scrollView.scrollerStyle = .overlay
-
-        //设置代理
-        self.collectionView.delegate = self
-        self.collectionView.dataSource = self
-        //是否可选中
-        self.collectionView.isSelectable = true
-        //注册cell
-        self.collectionView.register(KMSubscribeWaterMarkCollectionItem.self, forItemWithIdentifier: NSUserInterfaceItemIdentifier(rawValue: "KMSubscribeWaterMarkCollectionItem"))
-        
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-        self.titleLabel.font = NSFont.SFProTextSemiboldFont(20)
-        
-        self.waterExportButton.backgroundColor(NSColor.km_init(hex: "#EDEEF0"))
-        self.waterExportButton.border(NSColor.km_init(hex: "#DFE1E5"), 1, 20)
-        self.waterExportButton.contentTintColor = NSColor.km_init(hex: "#252629")
-        self.waterExportButton.font = NSFont.SFProTextRegularFont(16)
-        
-        self.subscribeView.backgroundColor(NSColor.km_init(hex: "#FF852E"))
-        self.subscribeView.border(NSColor.km_init(hex: "#DFE1E5"), 0, 20)
-        self.subscribeLabel.textColor = NSColor.km_init(hex: "#FFFFFF")
-        self.subscribeLabel.font = NSFont.SFProTextRegularFont(16)
-        
-        self.subscribeBox.moveCallback = { [weak self] mouseEntered, mouseBox in
-            if mouseEntered {
-                self?.subscribeView.backgroundColor(NSColor.km_init(hex: "#FFA153"))
-            } else {
-                self?.subscribeView.backgroundColor(NSColor.km_init(hex: "#FF852E"))
-            }
-        }
-        
-        self.subscribeBox.downCallback = { [unowned self] mouseEntered, mouseBox, event in
-            if mouseEntered {
-                self.subscribeView.backgroundColor(NSColor.km_init(hex: "#D2621C"))
-            } else {
-                self.subscribeView.backgroundColor(NSColor.km_init(hex: "#FF852E"))
-                self.subscribeButtonAction(self.subscribeView as Any)
-            }
-        }
-        
-        self.cancelBox.moveCallback = { [weak self] (mouseEntered, mouseBox) in
-            if mouseEntered {
-                self?.waterExportButton?.backgroundColor(NSColor.km_init(hex: "#DFE1E5"))
-            } else {
-                self?.waterExportButton?.backgroundColor(NSColor.km_init(hex: "#EDEEF0"))
-            }
-        }
-        
-        self.lineView.backgroundColor(NSColor.km_init(hex: "#000000").withAlphaComponent(0.1))
-        
-        // 获取包含 NSCollectionView 的 NSScrollView
-        if let scrollView = collectionView.enclosingScrollView {
-            scrollView.hasHorizontalScroller = true
-            scrollView.horizontalScroller?.alphaValue = 0
-            
-            scrollView.hasVerticalScroller = true
-            scrollView.verticalScroller?.alphaValue = 0
-        }
-    }
-    
-    func updateLanguage() {
-        if KMSubscribeWaterMarkWindowController.canShowSubscripBenefits() {
-            self.subTitleContentView.isHidden = true
-            self.subtitleContentHeightConstraint.constant = 0
-            self.collectionContentViewHeightConstraint.constant = 368
-            self.collectionViewContentTopConstraint.constant = 28
-            self.titleLabel.stringValue = NSLocalizedString("Subscription Benefits", comment: "")
-//            self.waterExportButton.title = NSLocalizedString("Save with Watermark", comment: "")
-            self.subscribeLabel.stringValue = NSLocalizedString("Upgrade Now", comment: "")
-        } else {
-            self.subTitleContentView.isHidden = false
-            self.subtitleContentHeightConstraint.constant = 40
-            self.collectionContentViewHeightConstraint.constant = 330
-            self.collectionViewContentTopConstraint.constant = 76
-            self.titleLabel.stringValue = NSLocalizedString("Login Benefits", comment: "")
-//            self.waterExportButton.title = NSLocalizedString("Later", comment: "")
-            self.subscribeLabel.stringValue = NSLocalizedString("Login or Sign up", comment: "")
-        }
-//        + "  " + NSLocalizedString("Subscription", comment: ""
-        
-        var subtitleString = NSLocalizedString("Register as a PDF Reader Pro member to enjoy premium features", comment: "")
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.lineHeightMultiple = 1.32
-        paragraphStyle.alignment = .left
-        self.subtitleLabel.textColor = NSColor.km_init(hex: "#273C62")
-        self.subtitleLabel.attributedStringValue = NSMutableAttributedString(string: NSLocalizedString(subtitleString, comment: ""), attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle, NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12)])
-    }
-
-    func reloadData() {
-        if KMSubscribeWaterMarkWindowController.canShowSubscripBenefits() {
-            self.dataArray = afterLoginDataArray
-        } else {
-            self.dataArray = beforeLoginDataArray
-        }
-        self.collectionView.reloadData()
-    }
-}
-
-extension KMSubscribeWaterMarkView {
-    @IBAction func closeButtonAction(_ sender: Any) {
-        guard let callBack = closeAction else { return }
-        
-        callBack(self)
-    }
-    
-    @IBAction func waterMarkExportButtonAction(_ sender: Any) {
-        if !isSecondEnable {
-            return
-        }
-        guard let callBack = waterMarkExportAction else { return }
-        
-        callBack(self)
-    }
-    
-    @IBAction func subscribeButtonAction(_ sender: Any) {
-        guard let callBack = subscribeAction else { return }
-        
-        callBack(self)
-    }
-}
-
-extension KMSubscribeWaterMarkView: NSCollectionViewDataSource {
-public func numberOfSections(in collectionView: NSCollectionView) -> Int {
-    return dataArray.count
-    }
-
-    public func collectionView(_ collectionView: NSCollectionView, numberOfItemsInSection section: Int) -> Int {
-        return 1
-    }
-
-    //返回对应的item自定义个体
-    public func collectionView(_ collectionView: NSCollectionView, itemForRepresentedObjectAt indexPath: IndexPath) -> NSCollectionViewItem {
-        let view = collectionView.makeItem(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "KMSubscribeWaterMarkCollectionItem"), for: indexPath) as! KMSubscribeWaterMarkCollectionItem
-        view.data = self.dataArray[indexPath.section]
-        return view
-    }
-}
-
-extension KMSubscribeWaterMarkView: NSCollectionViewDelegate {
-    //当item被选中
-    public func collectionView(_ collectionView: NSCollectionView, didSelectItemsAt indexPaths: Set<IndexPath>) {
-        print("点击")
-    }
-
-    //当item取消选中
-    public func collectionView(_ collectionView: NSCollectionView, didDeselectItemsAt indexPaths: Set<IndexPath>) {
-
-    }
-}
-
-extension KMSubscribeWaterMarkView: NSCollectionViewDelegateFlowLayout {
-
-    public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> NSSize {
-        let data = self.dataArray[indexPath.section]
-        let string: NSString = data["title"]! as NSString
-        let subtitleString: NSString = data["subtitle"]! as NSString
-
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.lineHeightMultiple = 1.4
-        paragraphStyle.alignment = .left
-        let size: NSSize = string.boundingRect(with: NSSize(width: 350, height: 100), options: NSString.DrawingOptions(rawValue: 3), attributes: [NSAttributedString.Key.font : NSFont.SFProTextSemiboldFont(14), NSAttributedString.Key.paragraphStyle : paragraphStyle]).size
-        let subtitleSize: NSSize = subtitleString.boundingRect(with: NSSize(width: 350, height: 100), options: NSString.DrawingOptions(rawValue: 3), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12), NSAttributedString.Key.paragraphStyle : paragraphStyle]).size
-        return NSSize(width: 394, height: max(44, size.height + subtitleSize.height + 4))
-    }
-
-    public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, insetForSectionAt section: Int) -> NSEdgeInsets {
-        if section == self.dataArray.count - 1 {
-            return NSEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
-        } else {
-            return NSEdgeInsets(top: 0, left: 0, bottom: 20, right: 0)
-        }
-    }
-}

+ 0 - 238
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkView.xib

@@ -1,238 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMSubscribeWaterMarkView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="cancelBox" destination="jWg-hU-mD1" id="H2W-w0-mWK"/>
-                <outlet property="closeBox" destination="msn-nQ-xqN" id="QFo-LV-8P3"/>
-                <outlet property="closeButton" destination="bTN-v2-Eaj" id="h2L-kr-Gi9"/>
-                <outlet property="collectionContentViewHeightConstraint" destination="7MQ-oW-O1o" id="Hln-jO-fcD"/>
-                <outlet property="collectionView" destination="G8e-lU-M2R" id="Unt-cd-UZq"/>
-                <outlet property="collectionViewContentTopConstraint" destination="1nd-N2-IpE" id="J1u-9e-WUO"/>
-                <outlet property="lineView" destination="FOh-IP-TS8" id="bZg-wu-WLa"/>
-                <outlet property="scrollView" destination="iQs-EU-LBJ" id="bId-Pc-Y9u"/>
-                <outlet property="subTitleContentView" destination="Ja4-Z7-bde" id="cYk-lB-HWd"/>
-                <outlet property="subscribeBox" destination="3EV-Lt-ZXO" id="Jg8-D5-UYE"/>
-                <outlet property="subscribeLabel" destination="a4m-EO-i32" id="VHn-E2-Ze2"/>
-                <outlet property="subscribeView" destination="zsU-gX-vjE" id="rOk-hB-ChE"/>
-                <outlet property="subtitleContentHeightConstraint" destination="K87-HL-fyQ" id="9vH-er-DyI"/>
-                <outlet property="subtitleLabel" destination="gOH-TM-kj5" id="PUW-kM-4ov"/>
-                <outlet property="titleLabel" destination="2cQ-02-iHc" id="tqt-eV-spv"/>
-                <outlet property="waterExportButton" destination="ki6-ve-E1f" id="jDF-Sk-8rV"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="452" height="643"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="q0v-nJ-k2O">
-                    <rect key="frame" x="0.0" y="615" width="452" height="28"/>
-                    <subviews>
-                        <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="msn-nQ-xqN" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                            <rect key="frame" x="8" y="8" width="12" height="12"/>
-                            <view key="contentView" id="z9g-NP-5Ki">
-                                <rect key="frame" x="0.0" y="0.0" width="12" height="12"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            </view>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="12" id="HxP-Gi-4Hn"/>
-                                <constraint firstAttribute="height" constant="12" id="nb4-t6-pax"/>
-                            </constraints>
-                        </box>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bTN-v2-Eaj">
-                            <rect key="frame" x="8" y="8" width="12" height="12"/>
-                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="control_btn_icon_close" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="7Mh-Yp-o0U">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="12" id="4GN-mX-X3S"/>
-                                <constraint firstAttribute="height" constant="12" id="HnF-P0-ggv"/>
-                            </constraints>
-                            <connections>
-                                <action selector="closeButtonAction:" target="-2" id="49a-OA-lKL"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="bTN-v2-Eaj" firstAttribute="leading" secondItem="q0v-nJ-k2O" secondAttribute="leading" constant="8" id="751-Vs-ZsH"/>
-                        <constraint firstItem="bTN-v2-Eaj" firstAttribute="centerY" secondItem="q0v-nJ-k2O" secondAttribute="centerY" id="UwZ-zY-e2r"/>
-                        <constraint firstItem="msn-nQ-xqN" firstAttribute="leading" secondItem="q0v-nJ-k2O" secondAttribute="leading" constant="8" id="XgN-Tt-brt"/>
-                        <constraint firstItem="msn-nQ-xqN" firstAttribute="centerY" secondItem="q0v-nJ-k2O" secondAttribute="centerY" id="ZfL-IN-PON"/>
-                        <constraint firstAttribute="height" constant="28" id="aEs-a0-QaM"/>
-                    </constraints>
-                </customView>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2cQ-02-iHc">
-                    <rect key="frame" x="159" y="587" width="134" height="16"/>
-                    <textFieldCell key="cell" lineBreakMode="clipping" title="Subscription Benefits" id="5tK-VQ-29f">
-                        <font key="font" usesAppearanceFont="YES"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="MG4-H3-ZA1">
-                    <rect key="frame" x="28" y="311" width="396" height="180"/>
-                    <subviews>
-                        <scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iQs-EU-LBJ">
-                            <rect key="frame" x="0.0" y="0.0" width="396" height="180"/>
-                            <clipView key="contentView" drawsBackground="NO" id="k4V-l0-a8F">
-                                <rect key="frame" x="0.0" y="0.0" width="396" height="180"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                                <subviews>
-                                    <collectionView id="G8e-lU-M2R">
-                                        <rect key="frame" x="0.0" y="0.0" width="396" height="180"/>
-                                        <autoresizingMask key="autoresizingMask" widthSizable="YES"/>
-                                        <collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" id="1Gk-3q-zuH">
-                                            <size key="itemSize" width="50" height="50"/>
-                                        </collectionViewFlowLayout>
-                                        <color key="primaryBackgroundColor" red="0.96862745100000003" green="0.97254901959999995" blue="0.98039215690000003" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                    </collectionView>
-                                </subviews>
-                                <color key="backgroundColor" red="0.96862745100000003" green="0.97254901959999995" blue="0.98039215690000003" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                            </clipView>
-                            <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="fPn-aZ-Qbr">
-                                <rect key="frame" x="-100" y="-100" width="233" height="15"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                            </scroller>
-                            <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="ftN-5U-Bpz">
-                                <rect key="frame" x="-100" y="-100" width="15" height="143"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                            </scroller>
-                        </scrollView>
-                        <imageView hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="X9c-Db-P8e">
-                            <rect key="frame" x="0.0" y="0.0" width="396" height="40"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="40" id="9Hp-hD-Bbg"/>
-                            </constraints>
-                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" image="渐变" id="uLk-nc-Ade"/>
-                        </imageView>
-                    </subviews>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="180" id="7MQ-oW-O1o"/>
-                        <constraint firstAttribute="bottom" secondItem="X9c-Db-P8e" secondAttribute="bottom" id="Msm-Ve-eju"/>
-                        <constraint firstAttribute="trailing" secondItem="X9c-Db-P8e" secondAttribute="trailing" id="ODc-2G-fIp"/>
-                        <constraint firstItem="iQs-EU-LBJ" firstAttribute="top" secondItem="MG4-H3-ZA1" secondAttribute="top" id="b42-mD-4Bn"/>
-                        <constraint firstItem="iQs-EU-LBJ" firstAttribute="leading" secondItem="MG4-H3-ZA1" secondAttribute="leading" id="gLt-1u-l6X"/>
-                        <constraint firstAttribute="bottom" secondItem="iQs-EU-LBJ" secondAttribute="bottom" id="gt2-pE-Slt"/>
-                        <constraint firstItem="X9c-Db-P8e" firstAttribute="leading" secondItem="MG4-H3-ZA1" secondAttribute="leading" id="jBZ-Ih-KQy"/>
-                        <constraint firstAttribute="trailing" secondItem="iQs-EU-LBJ" secondAttribute="trailing" id="qHN-wN-lcX"/>
-                    </constraints>
-                </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Ja4-Z7-bde">
-                    <rect key="frame" x="28" y="511" width="396" height="60"/>
-                    <subviews>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gOH-TM-kj5">
-                            <rect key="frame" x="6" y="28" width="384" height="32"/>
-                            <textFieldCell key="cell" alignment="center" title="This is a trial version. While saving, PDF Reader Pro's watermark will be added to the document." id="IIZ-dr-HjX">
-                                <font key="font" usesAppearanceFont="YES"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="FOh-IP-TS8">
-                            <rect key="frame" x="0.0" y="0.0" width="396" height="1"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="1" id="P0i-AM-sJN"/>
-                            </constraints>
-                        </customView>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="gOH-TM-kj5" firstAttribute="top" secondItem="Ja4-Z7-bde" secondAttribute="top" id="J7i-aX-LIu"/>
-                        <constraint firstAttribute="height" constant="60" id="K87-HL-fyQ"/>
-                        <constraint firstItem="FOh-IP-TS8" firstAttribute="leading" secondItem="Ja4-Z7-bde" secondAttribute="leading" id="Rwz-0E-Zj1"/>
-                        <constraint firstItem="gOH-TM-kj5" firstAttribute="leading" secondItem="Ja4-Z7-bde" secondAttribute="leading" constant="8" id="T6O-zG-DYq"/>
-                        <constraint firstAttribute="width" constant="396" id="dFa-YB-Dgm"/>
-                        <constraint firstAttribute="bottom" secondItem="FOh-IP-TS8" secondAttribute="bottom" id="in1-PL-P05"/>
-                        <constraint firstAttribute="trailing" secondItem="gOH-TM-kj5" secondAttribute="trailing" constant="8" id="vhi-7b-oQH"/>
-                        <constraint firstAttribute="trailing" secondItem="FOh-IP-TS8" secondAttribute="trailing" id="z4M-RT-EKq"/>
-                    </constraints>
-                </customView>
-                <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="jWg-hU-mD1" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                    <rect key="frame" x="28" y="32" width="396" height="40"/>
-                    <view key="contentView" id="Dsr-H8-aIS">
-                        <rect key="frame" x="0.0" y="0.0" width="396" height="40"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                    </view>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="40" id="yih-N5-o8h"/>
-                    </constraints>
-                </box>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ki6-ve-E1f">
-                    <rect key="frame" x="28" y="32" width="396" height="40"/>
-                    <buttonCell key="cell" type="square" title="Watermark Saving" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="bo3-42-gLB">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="40" id="1vq-qG-C1N"/>
-                    </constraints>
-                    <connections>
-                        <action selector="waterMarkExportButtonAction:" target="-2" id="Jkp-G7-45m"/>
-                    </connections>
-                </button>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="zsU-gX-vjE">
-                    <rect key="frame" x="28" y="88" width="396" height="40"/>
-                    <subviews>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="a4m-EO-i32">
-                            <rect key="frame" x="180" y="12" width="37" height="16"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="oDQ-wf-pIe">
-                                <font key="font" usesAppearanceFont="YES"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                        <box boxType="custom" borderWidth="0.0" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="3EV-Lt-ZXO" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                            <rect key="frame" x="0.0" y="0.0" width="396" height="40"/>
-                            <view key="contentView" id="Ajf-rl-zqg">
-                                <rect key="frame" x="0.0" y="0.0" width="396" height="40"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            </view>
-                        </box>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="a4m-EO-i32" firstAttribute="centerX" secondItem="zsU-gX-vjE" secondAttribute="centerX" id="1IX-89-e0g"/>
-                        <constraint firstAttribute="trailing" secondItem="3EV-Lt-ZXO" secondAttribute="trailing" id="Gqk-JG-CYW"/>
-                        <constraint firstAttribute="bottom" secondItem="3EV-Lt-ZXO" secondAttribute="bottom" id="RRE-et-RZW"/>
-                        <constraint firstItem="3EV-Lt-ZXO" firstAttribute="leading" secondItem="zsU-gX-vjE" secondAttribute="leading" id="RnW-8b-zE0"/>
-                        <constraint firstAttribute="height" constant="40" id="Y7i-Kj-Zw4"/>
-                        <constraint firstItem="3EV-Lt-ZXO" firstAttribute="top" secondItem="zsU-gX-vjE" secondAttribute="top" id="g35-yO-W4e"/>
-                        <constraint firstItem="a4m-EO-i32" firstAttribute="centerY" secondItem="zsU-gX-vjE" secondAttribute="centerY" id="nfp-RI-pcL"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstItem="MG4-H3-ZA1" firstAttribute="top" secondItem="2cQ-02-iHc" secondAttribute="bottom" constant="96" id="1nd-N2-IpE"/>
-                <constraint firstItem="Ja4-Z7-bde" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="28" id="5v1-aH-ewg"/>
-                <constraint firstItem="jWg-hU-mD1" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="28" id="7Cy-az-uRj"/>
-                <constraint firstItem="2cQ-02-iHc" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="40" id="GRL-zJ-hGD"/>
-                <constraint firstItem="ki6-ve-E1f" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="28" id="HdL-el-MI0"/>
-                <constraint firstItem="ki6-ve-E1f" firstAttribute="top" secondItem="zsU-gX-vjE" secondAttribute="bottom" constant="16" id="I4R-Ku-dLc"/>
-                <constraint firstAttribute="trailing" secondItem="MG4-H3-ZA1" secondAttribute="trailing" constant="28" id="M8D-Go-2lU"/>
-                <constraint firstAttribute="trailing" secondItem="ki6-ve-E1f" secondAttribute="trailing" constant="28" id="PJV-Yt-tG7"/>
-                <constraint firstItem="2cQ-02-iHc" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="Tab-Sj-Pk5"/>
-                <constraint firstItem="q0v-nJ-k2O" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="Vaq-qD-AWK"/>
-                <constraint firstItem="Ja4-Z7-bde" firstAttribute="top" secondItem="2cQ-02-iHc" secondAttribute="bottom" constant="16" id="XOd-vi-3Iz"/>
-                <constraint firstAttribute="trailing" secondItem="jWg-hU-mD1" secondAttribute="trailing" constant="28" id="YM4-vh-fXm"/>
-                <constraint firstAttribute="bottom" secondItem="jWg-hU-mD1" secondAttribute="bottom" constant="32" id="b7z-Hc-lvQ"/>
-                <constraint firstItem="MG4-H3-ZA1" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="28" id="mY1-qU-Bkt"/>
-                <constraint firstAttribute="trailing" secondItem="q0v-nJ-k2O" secondAttribute="trailing" id="pkz-AD-sVC"/>
-                <constraint firstItem="zsU-gX-vjE" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="28" id="sYP-io-kre"/>
-                <constraint firstAttribute="bottom" secondItem="ki6-ve-E1f" secondAttribute="bottom" constant="32" id="wXu-Y4-WdH"/>
-                <constraint firstAttribute="trailing" secondItem="zsU-gX-vjE" secondAttribute="trailing" constant="28" id="ycZ-kq-u6R"/>
-                <constraint firstItem="q0v-nJ-k2O" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="yuk-XJ-HQQ"/>
-                <constraint firstAttribute="trailing" secondItem="Ja4-Z7-bde" secondAttribute="trailing" constant="28" id="zRX-3e-H6f"/>
-            </constraints>
-            <point key="canvasLocation" x="-265" y="-248.5"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="control_btn_icon_close" width="12" height="12"/>
-        <image name="渐变" width="284" height="40"/>
-    </resources>
-</document>

+ 0 - 130
PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/KMVerficationCodeWindowController.swift

@@ -1,130 +0,0 @@
-//
-//  KMVerficationCodeWindowController.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/24.
-//
-
-import Cocoa
-
-var verficationCodeController: KMVerficationCodeWindowController?
-var verficationCodeMainWindow: NSWindow?
-
-typealias KMVerficationCodeWindowControllerDidCancellation = () -> ()
-class KMVerficationCodeWindowController: NSWindowController {
-
-    @IBOutlet weak var verificationCodeView: KMVerificationCodeView!
-    @IBOutlet weak var networkView: KMLightNoNetworkView!
-    
-    var didCancellation: KMVerficationCodeWindowControllerDidCancellation?
-    var inputType: DataNavigationViewButtonActionType?
-    
-    deinit {
-        KMPrint("KMVerficationCodeWindowController 释放")
-    }
-    
-    override func windowDidLoad() {
-        super.windowDidLoad()
-
-        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-        self.setup()
-    }
-    
-    //MARK: 打开文件
-    static func show(window: NSWindow, _ type: DataNavigationViewButtonActionType = .Batch, _ logType: KMRegisterLogType = .login) -> KMVerficationCodeWindowController {
-        let controller: KMVerficationCodeWindowController = KMVerficationCodeWindowController.init(windowNibName: "KMVerficationCodeWindowController")
-        controller.inputType = type
-        window.beginSheet(controller.window!)
-        controller.window?.center()
-        controller.verificationCodeView.inputType = .accountInfo
-        controller.verificationCodeView.model.email = KMLightMemberManager.manager.info.email
-        controller.sendVerifyCode(sender: nil)
-        verficationCodeController = controller
-        verficationCodeMainWindow = window
-        return controller
-    }
-    
-    func setup() {
-        self.window?.contentView?.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-        
-        self.verificationCodeView.closeAction = { view in
-            KMPrint("关闭")
-            verficationCodeMainWindow?.endSheet(view.window!)
-            view.window?.close()
-            verficationCodeController = nil
-            verficationCodeMainWindow = nil
-        }
-        
-        self.verificationCodeView.cancelAction = { view in
-            KMPrint("登出")
-            verficationCodeMainWindow?.endSheet(view.window!)
-            view.window?.close()
-            verficationCodeController = nil
-            verficationCodeMainWindow = nil
-        }
-        
-        self.verificationCodeView.doneAction = { [weak self] (view, data , sender) in
-            KMPrint("注销")
-            KMRequestServerManager.manager.logOff(verifyCode: data.verifyCode, complete: { [weak self] success, result in
-                if self?.verificationCodeView != nil {
-                    if success {
-                        verficationCodeMainWindow?.endSheet(view.window!)
-                        view.window?.close()
-                        verficationCodeController = nil
-                        verficationCodeMainWindow = nil
-                        self?.didCancellation?()
-                    } else {
-                        self?.verificationCodeView.showAlert(result: result)
-                    }
-                    self?.verificationCodeView.changeDoneButtonState(enable: true)
-                }
-            })
-        }
-        
-        self.verificationCodeView.reSendAction = {[weak self]  view, sender in
-            self?.sendVerifyCode(sender: sender)
-        }
-        
-        self.verificationCodeView.verificationCodeAction = { [weak self] (view, data, codeString) in
-            KMRequestServerManager.manager.verificationCode(account: data.email, verifyCode: codeString, verifyCodeType: view.verifyCodeType) { success, result in
-                if self?.verificationCodeView != nil {
-                    if success {
-                        self?.verificationCodeView.updateNetworkingState(complete: true, codeIsTure: true)
-                    } else {
-                        self?.verificationCodeView.updateNetworkingState(complete: true, codeIsTure: false)
-                        self?.verificationCodeView.showAlert(result: result)
-                    }
-                }
-            }
-        }
-        
-        KMRequestServer.requestServer.reachabilityStatusChange { [weak self] status in
-            if status == .notReachable {
-                KMPrint("无网络")
-                self?.networkView.isHidden = false
-            } else {
-                KMPrint("有网络")
-                self?.networkView.isHidden = true
-            }
-        }
-    }
-    
-    func sendVerifyCode(sender: NSTextView?) {
-        KMRequestServerManager.manager.getVerifyCode(verifyCodeType: self.verificationCodeView.verifyCodeType, email: self.verificationCodeView.model.email) { [weak self] success, result in
-            if self?.verificationCodeView != nil {
-                if success {
-                    self?.verificationCodeView.resetTimer()
-                } else {
-                    self?.verificationCodeView.showAlert(result: result)
-                    self?.verificationCodeView.time = (self?.verificationCodeView!.startTime)!
-                    self?.verificationCodeView.updateLanguage()
-                }
-                
-                if sender != nil {
-                    sender!.isSelectable = true
-                }
-            }
-        }
-    }
-    
-}

+ 0 - 51
PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/KMVerficationCodeWindowController.xib

@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMVerficationCodeWindowController" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="networkView" destination="UNI-Yj-LyJ" id="lvY-N6-pJv"/>
-                <outlet property="verificationCodeView" destination="ksJ-GD-QC6" id="3YM-U7-z9q"/>
-                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="F0z-JX-Cv5">
-            <windowStyleMask key="styleMask" titled="YES"/>
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="404" height="420"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
-            <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="404" height="420"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="ksJ-GD-QC6" customClass="KMVerificationCodeView" customModule="PDF_Master" customModuleProvider="target">
-                        <rect key="frame" x="0.0" y="0.0" width="404" height="420"/>
-                    </customView>
-                    <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="UNI-Yj-LyJ" customClass="KMLightNoNetworkView" customModule="PDF_Master" customModuleProvider="target">
-                        <rect key="frame" x="0.0" y="0.0" width="404" height="400"/>
-                    </customView>
-                </subviews>
-                <constraints>
-                    <constraint firstItem="UNI-Yj-LyJ" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="7XQ-ZW-P5S"/>
-                    <constraint firstAttribute="trailing" secondItem="ksJ-GD-QC6" secondAttribute="trailing" id="Gch-f0-mup"/>
-                    <constraint firstAttribute="trailing" secondItem="UNI-Yj-LyJ" secondAttribute="trailing" id="Jib-o9-cle"/>
-                    <constraint firstAttribute="bottom" secondItem="UNI-Yj-LyJ" secondAttribute="bottom" id="Y5X-J3-y85"/>
-                    <constraint firstAttribute="bottom" secondItem="ksJ-GD-QC6" secondAttribute="bottom" id="kgQ-N6-vMG"/>
-                    <constraint firstItem="UNI-Yj-LyJ" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="20" id="poW-2z-1VQ"/>
-                    <constraint firstItem="ksJ-GD-QC6" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="tF0-Hj-4i7"/>
-                    <constraint firstItem="ksJ-GD-QC6" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="ztP-V6-0y2"/>
-                </constraints>
-            </view>
-            <connections>
-                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
-            </connections>
-            <point key="canvasLocation" x="37" y="190"/>
-        </window>
-    </objects>
-</document>

+ 0 - 93
PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/View/KMLightMemberAlertView.swift

@@ -1,93 +0,0 @@
-//
-//  KMLightMemberAlertView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/24.
-//
-
-import Cocoa
-
-class KMLightMemberAlertView: BaseXibView {
-
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var titleContentView: NSView!
-    
-    var timer: DispatchSourceTimer?
-    
-    var result: Result = Result() {
-        didSet {
-            self.alphaValue = 1.0
-            self.reloadData()
-        }
-    }
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    func setup() {
-        self.result = Result(code: 0)
-
-    }
-    
-    func updateUI() {
-
-        self.contentView.backgroundColor(NSColor.km_init(hex: "#FDC7C6"))
-        
-        self.titleLabel.font = NSFont.SFProTextRegularFont(14.0)
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-    }
-    
-    func reloadData() {
-        
-        if result.code == 200 || result.code == 0 {
-            self.contentView.isHidden = true
-        } else {
-            self.contentView.isHidden = false
-        }
-        
-        self.titleLabel.stringValue = NSLocalizedString(KMRequestServerErrorCodeType.typeOfMessage(type: KMRequestServerErrorCodeType(rawValue: result.code)), comment: "")
-        
-        self.callMethodWithDelay()
-    }
-    
-    func fetchAlertHeight() -> CGFloat {
-        let string: NSString = self.titleLabel.stringValue as NSString
-        
-        let paragraphStyle = NSMutableParagraphStyle()
-//        paragraphStyle.lineHeightMultiple = 1.32
-        paragraphStyle.alignment = .left
-        let size: NSSize = string.boundingRect(with: NSSize(width: 356, height: 100), options: NSString.DrawingOptions(rawValue: 3), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegularFont(14), NSAttributedString.Key.paragraphStyle : paragraphStyle]).size
-        return size.height + 32
-    }
-    
-    func callMethodWithDelay() {
-        // 取消之前的计时器
-        timer?.cancel()
-
-        // 创建一个新的计时器,延迟 2 秒
-        timer = DispatchSource.makeTimerSource()
-        timer?.schedule(deadline: .now() + 3, leeway: .milliseconds(10))
-        timer?.setEventHandler(handler: { [weak self] in
-            // 2 秒后执行的代码
-            self?.methodToExecuteAfterDelay()
-        })
-        timer?.resume()
-    }
-
-    func methodToExecuteAfterDelay() {
-        // 执行的代码
-        self.fadeOut()
-    }
-    
-    func fadeOut() {
-        NSAnimationContext.runAnimationGroup({ (context) in
-            context.duration = 1
-            animator().alphaValue = 0.0
-        }, completionHandler: nil)
-    }
-    func updateLanguage() {
-
-    }
-}

+ 0 - 63
PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/View/KMLightMemberAlertView.xib

@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMLightMemberAlertView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="titleContentView" destination="q25-bk-4KL" id="T9w-aX-Y37"/>
-                <outlet property="titleLabel" destination="5Vu-nI-SlI" id="2ij-nc-hSR"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="404" height="57"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="q25-bk-4KL">
-                    <rect key="frame" x="0.0" y="0.0" width="404" height="57"/>
-                    <subviews>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="QLO-ls-cZz">
-                            <rect key="frame" x="8" y="21" width="16" height="16"/>
-                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="icon_tips_error_small" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="Zbi-qE-fIN">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                        </button>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5Vu-nI-SlI">
-                            <rect key="frame" x="30" y="21" width="356" height="16"/>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="352" id="x8P-X1-tYq"/>
-                            </constraints>
-                            <textFieldCell key="cell" title="The verification code is wrong" id="wp8-bj-JcP">
-                                <font key="font" metaFont="system"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="QLO-ls-cZz" firstAttribute="centerY" secondItem="q25-bk-4KL" secondAttribute="centerY" id="8Mw-Ep-L5a"/>
-                        <constraint firstItem="5Vu-nI-SlI" firstAttribute="leading" secondItem="QLO-ls-cZz" secondAttribute="trailing" constant="8" id="Eqk-Z2-bkf"/>
-                        <constraint firstItem="QLO-ls-cZz" firstAttribute="leading" secondItem="q25-bk-4KL" secondAttribute="leading" constant="8" id="HBQ-qN-Z85"/>
-                        <constraint firstItem="5Vu-nI-SlI" firstAttribute="centerY" secondItem="q25-bk-4KL" secondAttribute="centerY" id="TeZ-eC-Og1"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstItem="q25-bk-4KL" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="GzD-qs-XTw"/>
-                <constraint firstItem="q25-bk-4KL" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="pcq-9R-iGK"/>
-                <constraint firstAttribute="bottom" secondItem="q25-bk-4KL" secondAttribute="bottom" id="r7H-pD-6Oy"/>
-                <constraint firstAttribute="trailing" secondItem="q25-bk-4KL" secondAttribute="trailing" id="tbX-8U-Wtw"/>
-            </constraints>
-            <point key="canvasLocation" x="50" y="35.5"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="icon_tips_error_small" width="16" height="16"/>
-    </resources>
-</document>

+ 0 - 490
PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/View/KMVerificationCodeView.swift

@@ -1,490 +0,0 @@
-//
-//  KMVerificationCodeView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/23.
-//
-
-import Cocoa
-
-typealias KMVerificationCodeViewCancelAction = (_ view: KMVerificationCodeView) -> Void
-typealias KMVerificationCodeViewVerificationCodeAction = (_ view: KMVerificationCodeView, _ data: KMRegisterModel, _ codeString: String) -> Void
-typealias KMVerificationCodeViewDoneAction = (_ view: KMVerificationCodeView, _ data: KMRegisterModel, _ sender: NSButton) -> Void
-typealias KMVerificationCodeViewCloseAction = (_ view: KMVerificationCodeView) -> Void
-typealias KMVerificationCodeViewReSendAction = (_ view: KMVerificationCodeView, _ sender: NSTextView) -> Void
-class KMVerificationCodeView: BaseXibView {
-
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var describeLabel: NSTextField!
-    @IBOutlet var timerTextView: NSTextView!
-    
-    @IBOutlet weak var cancellationButton: NSButton!
-    @IBOutlet weak var cancelButton: NSButton!
-    @IBOutlet weak var closeButton: NSButton!
-    
-    @IBOutlet weak var textFieldContentView: NSView!
-    @IBOutlet weak var code1ContentView: NSView!
-    @IBOutlet weak var code1TextField: KMBaseTextField!
-    
-    @IBOutlet weak var code2ContentView: NSView!
-    @IBOutlet weak var code2TextField: KMBaseTextField!
-    
-    @IBOutlet weak var code3ContentView: NSView!
-    @IBOutlet weak var code3TextField: KMBaseTextField!
-    
-    @IBOutlet weak var code4ContentView: NSView!
-    @IBOutlet weak var code4TextField: KMBaseTextField!
-    
-    @IBOutlet weak var code5ContentView: NSView!
-    @IBOutlet weak var code5TextField: KMBaseTextField!
-    
-    @IBOutlet weak var code6ContentView: NSView!
-    @IBOutlet weak var code6TextField: KMBaseTextField!
-    
-    @IBOutlet weak var doneButtonTopConstraint: NSLayoutConstraint!
-    @IBOutlet weak var alertView: KMLightMemberAlertView!
-    
-    @IBOutlet weak var alertHeightConstraint: NSLayoutConstraint!
-    @IBOutlet weak var closeBox: KMBox!
-    
-    var cancellationButtonVC: KMDesignButton!
-    var cancelButtonVC: KMDesignButton!
-    
-    var cancelAction: KMVerificationCodeViewCancelAction?
-    var doneAction: KMVerificationCodeViewDoneAction?
-    var closeAction: KMVerificationCodeViewCloseAction?
-    var reSendAction: KMVerificationCodeViewReSendAction?
-    var verificationCodeAction: KMVerificationCodeViewVerificationCodeAction?
-    
-    var timer: Timer?
-    var time: Int = -1
-    let startTime = 60
-    //验证码
-    var verificationCode: String {
-        get {
-            return self.code1TextField.textField.stringValue + self.code2TextField.textField.stringValue + self.code3TextField.textField.stringValue + self.code4TextField.textField.stringValue + self.code5TextField.textField.stringValue + self.code6TextField.textField.stringValue
-        }
-    }
-    var verificationCodeState: KMRequestServerErrorCodeType = .unknown
-    var inputType: KMRegisterLogType = .login {
-        didSet {
-            switch self.inputType {
-            case .register:
-                self.verifyCodeType = .register
-            case .loginInputPassword:
-                self.verifyCodeType = .resetPassword
-            case .accountInfo:
-                self.verifyCodeType = .logOff
-            default:
-                KMPrint("")
-            }
-            
-            self.cleanVerificationCode()
-            self.reloadData()
-            self.updateLanguage()
-        }
-    }
-    
-    var verifyCodeType: KMVerifyCodeType = .unknown {
-        didSet {
-            self.reloadData()
-            self.updateLanguage()
-        }
-    }
-    
-    var isNetworking: Bool = false //是否正在进行网络请求
-    var codeIsTrue: Bool = false //验证码是否正确
-    var model: KMRegisterModel = KMRegisterModel()
-    
-    deinit {
-        self.endTimer()
-        KMPrint("KMVerificationCodeView dealloc")
-    }
-    
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    func setup() {
-        
-        self.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-        
-        self.titleLabel.font = NSFont.SFProTextSemiboldFont(20.0)
-        self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
-        
-        self.describeLabel.font = NSFont.SFProTextRegularFont(14.0)
-        self.describeLabel.textColor = NSColor.km_init(hex: "#252629")
-        
-        self.timerTextView.delegate = self
-        self.timerTextView.frame = (self.timerTextView.enclosingScrollView?.contentView.bounds)!
-        self.timerTextView.autoresizingMask = [.width, .height]
-        
-        let textFieldArray = [self.code1TextField,self.code2TextField,self.code3TextField,self.code4TextField,self.code5TextField,self.code6TextField]
-        
-        for i in 0...textFieldArray.count - 1 {
-            let textField = textFieldArray[i]
-            if textField != nil {
-                textField!.textField.textColor = NSColor.km_init(hex: "#252629")
-                textField!.textField.font = NSFont.SFProTextSemiboldFont(20.0)
-                textField?.maxLen = 1
-                textField?.model.isCanNull = true
-                textField?.textField.tag = i + 10
-                textField!.textField.alignment = .center
-                textField?.superview?.border(NSColor.km_init(hex: "#DFE1E5"), 1, 2)
-                textField?.textField.onFocus = { [weak self] in
-                    self?.cancelAllTextFieldFouce()
-                    textField?.superview?.border(NSColor.km_init(hex: "#1770F4"), 1, 2)
-                }
-                
-                textField?.textDidEndEditing = { [weak self] string in
-                    textField?.superview?.border(NSColor.km_init(hex: "#DFE1E5"), 1, 2)
-                }
-                
-                textField?.textDidChange = { [weak self] string in
-                    //自动验证验证码
-                    self?.autoVerificationCode()
-                    
-                    var isNext = true
-                    if string == "" {
-                        isNext = false
-                    }
-                    for item in textFieldArray {
-                        let t = textField?.textField
-                        var tag = t!.tag + 1
-                        if !isNext {
-                            tag = t!.tag - 1
-                        }
-                        tag = max(10, tag)
-                        if item?.textField.tag == tag {
-                            item?.textField.becomeFirstResponder()
-                            item?.superview?.border(NSColor.km_init(hex: "#1770F4"), 1, 2)
-                            break
-                        }
-                    }
-                }
-                
-                textField?.textDeleteAction = { [weak self] string in
-                    if string == "" {
-                        for item in textFieldArray {
-                            let t = textField?.textField
-                            let tag = max(10, t!.tag - 1)
-
-                            if item?.textField.tag == tag {
-                                item?.textField.becomeFirstResponder()
-                                item?.superview?.border(NSColor.km_init(hex: "#1770F4"), 1, 2)
-                                break
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        
-        self.cancellationButtonVC = KMDesignButton(withType: .Text)
-        self.cancellationButton.addSubview(self.cancellationButtonVC.view)
-        self.cancellationButtonVC?.view.frame = self.cancellationButton.bounds
-        self.cancellationButtonVC.target = self
-        self.cancellationButtonVC.action = #selector(doneButtonAction)
-        self.cancellationButtonVC.button(type: .Cta, size: .m)
-        self.cancellationButtonVC.button.keyEquivalent = KMKeyEquivalent.enter
-        
-        self.cancelButtonVC = KMDesignButton(withType: .Text)
-        self.cancelButton.addSubview(self.cancelButtonVC.view)
-        self.cancelButtonVC?.view.frame = self.cancelButton.bounds
-        self.cancelButtonVC.target = self
-        self.cancelButtonVC.action = #selector(cancelButtonAction)
-        self.cancelButtonVC.button(type: .Sec, size: .m)
-        self.cancelButtonVC.button.keyEquivalent = KMKeyEquivalent.enter
-        
-        self.closeBox.moveCallback = { [weak self] (mouseEntered, mouseBox) in
-            if mouseEntered {
-                self?.closeButton.image = NSImage(named: "control_btn_icon_close_hov")
-            } else {
-                self?.closeButton.image = NSImage(named: "control_btn_icon_close")
-            }
-        }
-    }
-    
-    func reloadData() {
-        
-        if inputType == .accountInfo {
-            self.closeButton.isHidden = false
-            self.cancelButtonVC.button(type: .Sec, size: .m)
-            self.cancelButtonVC.updateUI()
-        } else {
-            self.closeButton.isHidden = true
-            self.cancelButtonVC.button(type: .Text, size: .m)
-            self.cancelButtonVC.updateUI()
-        }
-        
-        let textFieldArray = [self.code1TextField,self.code2TextField,self.code3TextField,self.code4TextField,self.code5TextField,self.code6TextField]
-        for item in textFieldArray {
-            item?.isEnabled = !self.isNetworking
-        }
-        
-        if self.verificationCode.count == 6 &&
-//            self.time != -1 &&
-            self.codeIsTrue {
-            self.cancellationButtonVC.enabled = true
-        } else {
-            self.cancellationButtonVC.enabled = false
-            self.showAlert(result: Result(code: 0))
-        }
-    }
-    
-    func updateLanguage() {
-        
-        if self.verifyCodeType == .unknown {
-            self.titleLabel.stringValue = ""
-        } else if self.verifyCodeType == .register {
-            self.titleLabel.stringValue = NSLocalizedString("Sign Up", comment: "")
-        } else if self.verifyCodeType == .logOff {
-            self.titleLabel.stringValue = NSLocalizedString("Cancel Account", comment: "")
-        } else if self.verifyCodeType == .resetPassword {
-            self.titleLabel.stringValue = NSLocalizedString("Reset Password", comment: "")
-        }
-        
-        self.describeLabel.stringValue = NSLocalizedString("Enter the verification code", comment: "")
-        
-        if inputType == .unknown {
-            self.cancelButtonVC.stringValue = ""
-        } else if inputType == .accountInfo {
-            self.cancelButtonVC.stringValue = NSLocalizedString("Cancel", comment: "")
-        } else {
-            self.cancelButtonVC.stringValue = NSLocalizedString("Back to previous step", comment: "")
-        }
-        
-        if self.verifyCodeType == .unknown {
-            self.cancellationButtonVC.stringValue = ""
-        } else if self.verifyCodeType == .register {
-            self.cancellationButtonVC.stringValue = NSLocalizedString("Sign Up", comment: "")
-        } else if self.verifyCodeType == .logOff {
-            self.cancellationButtonVC.stringValue = NSLocalizedString("Cancellation", comment: "")
-        } else if self.verifyCodeType == .resetPassword {
-            self.cancellationButtonVC.stringValue = NSLocalizedString("Next Step", comment: "")
-        }
-        
-        
-        let tempTime: String = String(self.time)
-        var timeString = "(" + tempTime + NSLocalizedString("s", comment: "") + ")"
-        if tempTime == "60" {
-            timeString = NSLocalizedString("Click to resend", comment: "")
-        } else if tempTime == "-1" {
-            timeString = " "
-        }
-        //singin
-        let string = NSLocalizedString("Didn't receive the verification code?", comment: "") + "  " + timeString
-        let attributedString = NSMutableAttributedString.init(string: string)
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.alignment = .left;
-        attributedString.addAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#252629"),
-                                        NSAttributedString.Key.paragraphStyle : paragraphStyle],
-                                    range: NSRange(location: 0, length: string.count))
-
-        let range = string.range(of: NSLocalizedString(timeString, comment: ""))
-        attributedString.setAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegularFont(12.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor.km_init(hex: "#1770F4"),
-                                        NSAttributedString.Key.underlineColor : NSColor.clear,
-                                        NSAttributedString.Key.link : "timer://"],
-                                       range: string.nsRange(from: range!)!)
-
-        self.timerTextView.textStorage?.setAttributedString(attributedString)
-        
-    }
-    
-    func cleanVerificationCode() {
-        let textFieldArray = [self.code1TextField,self.code2TextField,self.code3TextField,self.code4TextField,self.code5TextField,self.code6TextField]
-        for item in textFieldArray {
-            item?.stringValue = ""
-            item?.textField.resignFirstResponder()
-            
-            if item != self.code1TextField {
-                item?.superview?.border(NSColor.km_init(hex: "#DFE1E5"), 1, 2)
-            }
-        }
-        self.model.verifyCode = ""
-    }
-    
-    //验证码请求完成
-    func updateNetworkingState(complete: Bool, codeIsTure: Bool) {
-        self.isNetworking = !complete
-        self.codeIsTrue = codeIsTure
-        self.reloadData()
-        if !codeIsTure {
-            self.code6TextField.textField.becomeFirstResponder()
-        }
-    }
-    
-    //自动验证验证码
-    func autoVerificationCode() {
-        let textFieldArray = [self.code1TextField,self.code2TextField,self.code3TextField,self.code4TextField,self.code5TextField,self.code6TextField]
-        for item in textFieldArray {
-            item?.textField.resignFirstResponder()
-        }
-        
-        if self.verificationCode.count == 6 {
-            if self.verificationCodeAction != nil {
-                self.isNetworking = true
-                self.model.verifyCode = self.verificationCode
-                self.verificationCodeAction!(self, self.model, self.verificationCode)
-            }
-        }
-    }
-}
-
-protocol KMVerificationCodeViewTimer {}
-extension KMVerificationCodeView: KMVerificationCodeViewTimer {
-    func cleanTimer() {
-        self.time = startTime
-        self.updateLanguage()
-    }
-    
-    func resetTimer() {
-        self.time = startTime
-        self.beginTimer()
-        self.updateTimerData(timer: self.timer!)
-    }
-    
-    func beginTimer() {
-        if self.timer != nil {
-            self.endTimer()
-        }
-        if self.time == -1 {
-            self.time = startTime
-        }
-        self.timer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(updateTimerData), userInfo: nil, repeats: true)
-    }
-    
-    func endTimer() {
-        self.timer?.invalidate()
-        self.timer = nil
-        self.updateLanguage()
-    }
-    
-    @objc func updateTimerData(timer: Timer) {
-        self.time -= 1
-        if self.time == 0 {
-            self.endTimer()
-            self.time = startTime
-        }
-        self.updateLanguage()
-    }
-}
-
-protocol KMVerificationCodeViewAction {}
-extension KMVerificationCodeView: KMVerificationCodeViewAction {
-    func sendVerificationCode() {
-        guard let callBack = reSendAction else { return }
-        self.timerTextView.isSelectable = false
-        callBack(self, self.timerTextView)
-    }
-    
-    @IBAction func cancelButtonAction(_ sender: NSButton) {
-        self.endTimer()
-        guard let callBack = cancelAction else { return }
-        
-        callBack(self)
-    }
-    
-    @IBAction func doneButtonAction(_ sender: NSButton) {
-        guard let callBack = doneAction else { return }
-        self.model.verifyCode = self.verificationCode
-        
-        self.changeDoneButtonState(enable: false)
-        callBack(self, self.model, sender)
-    }
-    
-    @IBAction func closeButtonAction(_ sender: Any) {
-        guard let callBack = closeAction else { return }
-        self.endTimer()
-        callBack(self)
-    }
-    
-    func showAlert(result: Result?) {
-        if result != nil {
-            self.alertView.result = result!
-            self.alertHeightConstraint.constant = self.alertView.fetchAlertHeight()
-            
-            if result?.code != 0 && result?.code != 200 {
-                self.textFieldAlert()
-            }
-        }
-    }
-    
-    func changeDoneButtonState(enable: Bool) {
-        self.cancellationButtonVC.enabled = enable
-    }
-    
-    func cancelAllTextFieldFouce() {
-        let textFieldArray = [self.code1TextField,self.code2TextField,self.code3TextField,self.code4TextField,self.code5TextField,self.code6TextField]
-        for item in textFieldArray {
-            item?.superview?.border(NSColor.km_init(hex: "#DFE1E5"), 1, 2)
-        }
-    }
-    
-    func textFieldAlert() {
-        let textFieldArray = [self.code1TextField,self.code2TextField,self.code3TextField,self.code4TextField,self.code5TextField,self.code6TextField]
-        for item in textFieldArray {
-            item?.superview?.border(NSColor.red, 1, 2)
-        }
-    }
-}
-
-extension KMVerificationCodeView: NSTextViewDelegate {
-    func textView(_ textView: NSTextView, clickedOnLink link: Any, at charIndex: Int) -> Bool {
-        if link as! String == "timer://" && self.time == 60 {
-            guard let callBack = reSendAction else { return true }
-            textView.isSelectable = false
-            callBack(self, textView)
-        }
-        return true
-    }
-}
-
-extension KMVerificationCodeView: NSTextFieldDelegate {
-    func controlTextDidEndEditing(_ obj: Notification) {
-        KMPrint("controlTextDidEndEditing")
-        let textField = obj.object as? NSTextField
-        for view in self.textFieldContentView.subviews {
-            let t = view.subviews.first as? FocusAwareTextField
-            if t == textField {
-                view.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
-            }
-        }
-    }
-}
-
-extension KMVerificationCodeView {
-    override var acceptsFirstResponder: Bool {
-            return true
-        }
-        
-    override func performKeyEquivalent(with event: NSEvent) -> Bool {
-        if event.type == .keyDown, event.modifierFlags.contains(.command), event.characters == "v" {
-            if let pasteboardString = NSPasteboard.general.string(forType: .string) {
-                KMPrint(pasteboardString)
-                if let num = Int(pasteboardString) {
-                    let textFieldArray = [self.code1TextField,self.code2TextField,self.code3TextField,self.code4TextField,self.code5TextField,self.code6TextField]
-                    for index in 0...textFieldArray.count - 1 {
-                        if index < pasteboardString.count {
-                            let textField = textFieldArray[index]
-                            let fifthChar = pasteboardString[pasteboardString.index(pasteboardString.startIndex, offsetBy: index)]
-                            textField?.textField.stringValue = String(fifthChar)
-                            textField?.stringValue = String(fifthChar)
-                            textField?.textField.becomeFirstResponder()
-                        }
-                    }
-                    if pasteboardString.count == 6 {
-                        self.autoVerificationCode()
-                    }
-                }
-                // 处理剪贴板中的字符串
-                return true
-            }
-        }
-        return super.performKeyEquivalent(with: event)
-    }
-}

+ 0 - 318
PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/View/KMVerificationCodeView.xib

@@ -1,318 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMVerificationCodeView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="alertHeightConstraint" destination="1QO-Az-BoJ" id="Lsw-Xg-gPE"/>
-                <outlet property="alertView" destination="1C1-4h-Ne5" id="C0N-Lu-aOz"/>
-                <outlet property="cancelButton" destination="Dsc-xE-C88" id="TbA-72-C4F"/>
-                <outlet property="cancellationButton" destination="a9g-1g-YLC" id="iv7-wa-MOs"/>
-                <outlet property="closeBox" destination="Iud-HK-ihw" id="PpO-8N-FWL"/>
-                <outlet property="closeButton" destination="jpK-iA-80T" id="aTl-9Q-h8z"/>
-                <outlet property="code1ContentView" destination="Eob-0C-Cjw" id="cVs-UH-Kti"/>
-                <outlet property="code1TextField" destination="Owf-p1-F5n" id="gaB-jZ-G1S"/>
-                <outlet property="code2ContentView" destination="gDo-oF-Q0h" id="1vP-l7-fry"/>
-                <outlet property="code2TextField" destination="ejA-JU-I7S" id="LfY-Ia-Hma"/>
-                <outlet property="code3ContentView" destination="Rkt-Go-slv" id="312-iT-WJs"/>
-                <outlet property="code3TextField" destination="7XU-Sy-VAr" id="0Xl-YC-vOy"/>
-                <outlet property="code4ContentView" destination="05f-4Y-nx7" id="eFI-AL-82n"/>
-                <outlet property="code4TextField" destination="WQO-qf-sor" id="zl9-wy-je5"/>
-                <outlet property="code5ContentView" destination="wke-e2-pun" id="R5S-67-r1t"/>
-                <outlet property="code5TextField" destination="741-wl-WSG" id="06A-6Z-otN"/>
-                <outlet property="code6ContentView" destination="NX7-ti-wS8" id="cdj-TL-2Cw"/>
-                <outlet property="code6TextField" destination="yiZ-u3-N0y" id="dWz-gd-Kkz"/>
-                <outlet property="describeLabel" destination="PtG-Zk-jK1" id="iap-zu-gce"/>
-                <outlet property="doneButtonTopConstraint" destination="39n-pK-cH2" id="sTd-d1-0yC"/>
-                <outlet property="textFieldContentView" destination="GFe-OK-ycy" id="diB-OK-kbZ"/>
-                <outlet property="timerTextView" destination="z0h-AC-rcc" id="Og9-w0-yWf"/>
-                <outlet property="titleLabel" destination="hHi-x1-jjo" id="5b2-Xt-P2L"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="404" height="420"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <subviews>
-                <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="Iud-HK-ihw" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                    <rect key="frame" x="8" y="400" width="12" height="12"/>
-                    <view key="contentView" id="mU3-Y8-U0X">
-                        <rect key="frame" x="0.0" y="0.0" width="12" height="12"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                    </view>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="12" id="Efj-ak-s8t"/>
-                        <constraint firstAttribute="width" constant="12" id="jzZ-pr-Kcs"/>
-                    </constraints>
-                </box>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jpK-iA-80T">
-                    <rect key="frame" x="8" y="400" width="12" height="12"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="12" id="9Yn-bj-QRN"/>
-                        <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="12" id="bOo-MH-Lfl"/>
-                        <constraint firstAttribute="width" constant="12" id="nkV-SO-SWG"/>
-                        <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="12" id="xkY-4a-ubB"/>
-                    </constraints>
-                    <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="control_btn_icon_close" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="ABp-CG-Gsr">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="closeButtonAction:" target="-2" id="QlW-g2-FXr"/>
-                    </connections>
-                </button>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hHi-x1-jjo">
-                    <rect key="frame" x="46" y="355" width="149" height="25"/>
-                    <textFieldCell key="cell" lineBreakMode="clipping" title="Cancel Account" id="uNB-kB-HgF">
-                        <font key="font" metaFont="system" size="21"/>
-                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="tSH-ge-CQr">
-                    <rect key="frame" x="48" y="203" width="308" height="120"/>
-                    <subviews>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="PtG-Zk-jK1">
-                            <rect key="frame" x="-2" y="104" width="164" height="16"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" title="Enter the verification code" id="jbp-DN-1Lc">
-                                <font key="font" usesAppearanceFont="YES"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="GFe-OK-ycy">
-                            <rect key="frame" x="0.0" y="54" width="308" height="42"/>
-                            <subviews>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Rkt-Go-slv">
-                                    <rect key="frame" x="105" y="0.0" width="36" height="42"/>
-                                    <subviews>
-                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="7XU-Sy-VAr" customClass="KMBaseTextField" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="0.0" y="6" width="36" height="28"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="28" id="WxU-RR-4Kt"/>
-                                            </constraints>
-                                        </customView>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="42" id="6RW-vR-O4u"/>
-                                        <constraint firstItem="7XU-Sy-VAr" firstAttribute="top" secondItem="Rkt-Go-slv" secondAttribute="top" constant="8" id="Imk-0Y-iAK"/>
-                                        <constraint firstAttribute="trailing" secondItem="7XU-Sy-VAr" secondAttribute="trailing" id="PgX-Am-2jD"/>
-                                        <constraint firstItem="7XU-Sy-VAr" firstAttribute="leading" secondItem="Rkt-Go-slv" secondAttribute="leading" id="RFP-ds-iXF"/>
-                                        <constraint firstAttribute="width" constant="36" id="s9v-32-nZi"/>
-                                    </constraints>
-                                </customView>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="05f-4Y-nx7">
-                                    <rect key="frame" x="158" y="0.0" width="36" height="42"/>
-                                    <subviews>
-                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="WQO-qf-sor" customClass="KMBaseTextField" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="0.0" y="6" width="36" height="28"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="28" id="POZ-rj-fXz"/>
-                                            </constraints>
-                                        </customView>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstAttribute="trailing" secondItem="WQO-qf-sor" secondAttribute="trailing" id="2FV-pJ-WRZ"/>
-                                        <constraint firstItem="WQO-qf-sor" firstAttribute="top" secondItem="05f-4Y-nx7" secondAttribute="top" constant="8" id="8rb-l1-jVH"/>
-                                        <constraint firstAttribute="width" constant="36" id="QPP-zC-Cj0"/>
-                                        <constraint firstAttribute="height" constant="42" id="VTu-jR-zRy"/>
-                                        <constraint firstItem="WQO-qf-sor" firstAttribute="leading" secondItem="05f-4Y-nx7" secondAttribute="leading" id="uAi-MP-PP9"/>
-                                    </constraints>
-                                </customView>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="wke-e2-pun">
-                                    <rect key="frame" x="210" y="0.0" width="36" height="42"/>
-                                    <subviews>
-                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="741-wl-WSG" customClass="KMBaseTextField" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="0.0" y="6" width="36" height="28"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="28" id="OBf-Jo-TIB"/>
-                                            </constraints>
-                                        </customView>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstItem="741-wl-WSG" firstAttribute="top" secondItem="wke-e2-pun" secondAttribute="top" constant="8" id="1Je-Es-9sg"/>
-                                        <constraint firstAttribute="height" constant="42" id="GQ9-HL-H6t"/>
-                                        <constraint firstItem="741-wl-WSG" firstAttribute="leading" secondItem="wke-e2-pun" secondAttribute="leading" id="MIc-YN-9fI"/>
-                                        <constraint firstAttribute="trailing" secondItem="741-wl-WSG" secondAttribute="trailing" id="hmy-Mu-bVK"/>
-                                        <constraint firstAttribute="width" constant="36" id="s7G-nU-52k"/>
-                                    </constraints>
-                                </customView>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="NX7-ti-wS8">
-                                    <rect key="frame" x="262" y="0.0" width="36" height="42"/>
-                                    <subviews>
-                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="yiZ-u3-N0y" customClass="KMBaseTextField" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="0.0" y="6" width="36" height="28"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="28" id="oX3-Zg-Ls8"/>
-                                            </constraints>
-                                        </customView>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstItem="yiZ-u3-N0y" firstAttribute="top" secondItem="NX7-ti-wS8" secondAttribute="top" constant="8" id="9CG-x6-HCX"/>
-                                        <constraint firstItem="yiZ-u3-N0y" firstAttribute="leading" secondItem="NX7-ti-wS8" secondAttribute="leading" id="C6v-8D-PCt"/>
-                                        <constraint firstAttribute="trailing" secondItem="yiZ-u3-N0y" secondAttribute="trailing" id="Gmp-51-k4N"/>
-                                        <constraint firstAttribute="height" constant="42" id="bQ0-gF-Anj"/>
-                                        <constraint firstAttribute="width" constant="36" id="lkj-7P-4GL"/>
-                                    </constraints>
-                                </customView>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="gDo-oF-Q0h">
-                                    <rect key="frame" x="53" y="0.0" width="36" height="42"/>
-                                    <subviews>
-                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="ejA-JU-I7S" customClass="KMBaseTextField" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="0.0" y="6" width="36" height="28"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="28" id="WJy-zG-5vf"/>
-                                            </constraints>
-                                        </customView>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstItem="ejA-JU-I7S" firstAttribute="leading" secondItem="gDo-oF-Q0h" secondAttribute="leading" id="8p2-KW-9Ds"/>
-                                        <constraint firstAttribute="width" constant="36" id="CE2-MN-j6c"/>
-                                        <constraint firstItem="ejA-JU-I7S" firstAttribute="top" secondItem="gDo-oF-Q0h" secondAttribute="top" constant="8" id="HvE-yk-Iz2"/>
-                                        <constraint firstAttribute="trailing" secondItem="ejA-JU-I7S" secondAttribute="trailing" id="Sf2-L3-S0R"/>
-                                        <constraint firstAttribute="height" constant="42" id="tK7-aw-mTc"/>
-                                    </constraints>
-                                </customView>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Eob-0C-Cjw">
-                                    <rect key="frame" x="0.0" y="0.0" width="36" height="42"/>
-                                    <subviews>
-                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Owf-p1-F5n" customClass="KMBaseTextField" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="0.0" y="6" width="36" height="28"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="28" id="OXh-iw-Cmn"/>
-                                            </constraints>
-                                        </customView>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstItem="Owf-p1-F5n" firstAttribute="top" secondItem="Eob-0C-Cjw" secondAttribute="top" constant="8" id="4c4-qJ-FOQ"/>
-                                        <constraint firstItem="Owf-p1-F5n" firstAttribute="leading" secondItem="Eob-0C-Cjw" secondAttribute="leading" id="AXI-lU-8Tj"/>
-                                        <constraint firstAttribute="trailing" secondItem="Owf-p1-F5n" secondAttribute="trailing" id="DA2-YO-5bz"/>
-                                        <constraint firstAttribute="width" constant="36" id="QBr-ug-9gy"/>
-                                        <constraint firstAttribute="height" constant="42" id="aVf-7f-qLB"/>
-                                    </constraints>
-                                </customView>
-                            </subviews>
-                            <constraints>
-                                <constraint firstItem="Eob-0C-Cjw" firstAttribute="centerX" secondItem="GFe-OK-ycy" secondAttribute="centerX" multiplier="0.12" id="1Ov-LC-iA5"/>
-                                <constraint firstItem="wke-e2-pun" firstAttribute="centerX" secondItem="GFe-OK-ycy" secondAttribute="centerX" multiplier="1.48" id="849-A6-2PD"/>
-                                <constraint firstItem="gDo-oF-Q0h" firstAttribute="centerX" secondItem="GFe-OK-ycy" secondAttribute="centerX" multiplier="0.46" id="INR-8S-dug"/>
-                                <constraint firstItem="gDo-oF-Q0h" firstAttribute="centerY" secondItem="Eob-0C-Cjw" secondAttribute="centerY" id="OcY-CS-0cc"/>
-                                <constraint firstItem="NX7-ti-wS8" firstAttribute="centerX" secondItem="GFe-OK-ycy" secondAttribute="centerX" multiplier="1.82" id="Tt6-2y-bGp"/>
-                                <constraint firstItem="NX7-ti-wS8" firstAttribute="centerY" secondItem="Eob-0C-Cjw" secondAttribute="centerY" id="Wug-Mn-xFX"/>
-                                <constraint firstItem="wke-e2-pun" firstAttribute="centerY" secondItem="Eob-0C-Cjw" secondAttribute="centerY" id="bB0-GQ-qFx"/>
-                                <constraint firstAttribute="height" constant="42" id="g9T-km-ir0"/>
-                                <constraint firstItem="05f-4Y-nx7" firstAttribute="centerX" secondItem="GFe-OK-ycy" secondAttribute="centerX" multiplier="1.14" id="ip2-8b-kY0"/>
-                                <constraint firstItem="05f-4Y-nx7" firstAttribute="centerY" secondItem="Eob-0C-Cjw" secondAttribute="centerY" id="j6Y-Lg-KeE"/>
-                                <constraint firstItem="Eob-0C-Cjw" firstAttribute="centerY" secondItem="GFe-OK-ycy" secondAttribute="centerY" id="luh-2L-y5V"/>
-                                <constraint firstItem="Rkt-Go-slv" firstAttribute="centerX" secondItem="GFe-OK-ycy" secondAttribute="centerX" multiplier="0.8" id="tI9-PF-fMA"/>
-                                <constraint firstItem="Rkt-Go-slv" firstAttribute="centerY" secondItem="Eob-0C-Cjw" secondAttribute="centerY" id="vuL-6f-peo"/>
-                            </constraints>
-                        </customView>
-                        <scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9im-Yz-x21">
-                            <rect key="frame" x="0.0" y="0.0" width="308" height="40"/>
-                            <clipView key="contentView" drawsBackground="NO" id="dUo-A4-8ZF">
-                                <rect key="frame" x="0.0" y="0.0" width="308" height="40"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <subviews>
-                                    <textView wantsLayer="YES" editable="NO" importsGraphics="NO" richText="NO" verticallyResizable="YES" spellingCorrection="YES" smartInsertDelete="YES" id="z0h-AC-rcc">
-                                        <rect key="frame" x="0.0" y="0.0" width="308" height="40"/>
-                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                        <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                        <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                        <size key="minSize" width="308" height="40"/>
-                                        <size key="maxSize" width="340" height="10000000"/>
-                                        <color key="insertionPointColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                    </textView>
-                                </subviews>
-                                <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                            </clipView>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="40" id="dSD-jH-Lea"/>
-                            </constraints>
-                            <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="kSY-ro-ezT">
-                                <rect key="frame" x="-100" y="-100" width="225" height="15"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                            </scroller>
-                            <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="erU-rg-edl">
-                                <rect key="frame" x="-100" y="-100" width="15" height="20"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                            </scroller>
-                        </scrollView>
-                    </subviews>
-                    <constraints>
-                        <constraint firstAttribute="trailing" secondItem="GFe-OK-ycy" secondAttribute="trailing" id="2mr-yo-1Jx"/>
-                        <constraint firstAttribute="trailing" secondItem="9im-Yz-x21" secondAttribute="trailing" id="AO8-aN-j26"/>
-                        <constraint firstItem="PtG-Zk-jK1" firstAttribute="top" secondItem="tSH-ge-CQr" secondAttribute="top" id="IAE-eJ-nKb"/>
-                        <constraint firstItem="GFe-OK-ycy" firstAttribute="top" secondItem="PtG-Zk-jK1" secondAttribute="bottom" constant="8" id="Sgd-wW-Idh"/>
-                        <constraint firstAttribute="bottom" secondItem="9im-Yz-x21" secondAttribute="bottom" id="bct-Oi-2Cv"/>
-                        <constraint firstItem="PtG-Zk-jK1" firstAttribute="leading" secondItem="tSH-ge-CQr" secondAttribute="leading" id="hWw-J8-CAJ"/>
-                        <constraint firstItem="GFe-OK-ycy" firstAttribute="leading" secondItem="tSH-ge-CQr" secondAttribute="leading" id="i6I-W1-WQq"/>
-                        <constraint firstItem="9im-Yz-x21" firstAttribute="leading" secondItem="tSH-ge-CQr" secondAttribute="leading" id="jMB-Mh-mV4"/>
-                        <constraint firstAttribute="height" constant="120" id="ue1-ra-cLJ"/>
-                    </constraints>
-                </customView>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="a9g-1g-YLC">
-                    <rect key="frame" x="48" y="159" width="308" height="32"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="32" id="PY2-4O-4h6"/>
-                        <constraint firstAttribute="width" constant="308" id="w5f-Qq-xPC"/>
-                    </constraints>
-                    <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" enabled="NO" imageScaling="proportionallyDown" inset="2" id="e8o-p4-g7M">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                        <string key="keyEquivalent" base64-UTF8="YES">
-DQ
-</string>
-                    </buttonCell>
-                </button>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Dsc-xE-C88">
-                    <rect key="frame" x="48" y="119" width="308" height="32"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="32" id="ca9-5l-vpv"/>
-                        <constraint firstAttribute="width" constant="308" id="iD4-7U-Oj9"/>
-                    </constraints>
-                    <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" enabled="NO" imageScaling="proportionallyDown" inset="2" id="QkM-SB-SEG">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="cancelButtonAction:" target="-2" id="dCu-0A-L4f"/>
-                    </connections>
-                </button>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="1C1-4h-Ne5" customClass="KMLightMemberAlertView" customModule="PDF_Master" customModuleProvider="target">
-                    <rect key="frame" x="0.0" y="0.0" width="404" height="48"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="48" id="1QO-Az-BoJ"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstItem="tSH-ge-CQr" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="48" id="12F-wl-R9Y"/>
-                <constraint firstItem="jpK-iA-80T" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="8" id="1Gn-6M-FpJ"/>
-                <constraint firstItem="a9g-1g-YLC" firstAttribute="top" secondItem="tSH-ge-CQr" secondAttribute="bottom" constant="12" id="39n-pK-cH2"/>
-                <constraint firstItem="jpK-iA-80T" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="8" id="Kq8-tS-sqn"/>
-                <constraint firstItem="Dsc-xE-C88" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="Sh0-zJ-nzk"/>
-                <constraint firstAttribute="bottom" secondItem="1C1-4h-Ne5" secondAttribute="bottom" id="VWJ-hd-PiF"/>
-                <constraint firstItem="hHi-x1-jjo" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="48" id="ZRh-Ex-hDf"/>
-                <constraint firstAttribute="trailing" secondItem="tSH-ge-CQr" secondAttribute="trailing" constant="48" id="dxO-HQ-b8T"/>
-                <constraint firstItem="hHi-x1-jjo" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="40" id="igb-dC-OYB"/>
-                <constraint firstItem="tSH-ge-CQr" firstAttribute="top" secondItem="hHi-x1-jjo" secondAttribute="bottom" constant="32" id="j6b-qa-xQv"/>
-                <constraint firstItem="Iud-HK-ihw" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="8" id="jjH-k0-lcf"/>
-                <constraint firstItem="Dsc-xE-C88" firstAttribute="top" secondItem="a9g-1g-YLC" secondAttribute="bottom" constant="8" id="lj5-6S-NWN"/>
-                <constraint firstItem="Iud-HK-ihw" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="8" id="nqR-6o-Qcv"/>
-                <constraint firstItem="1C1-4h-Ne5" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="nxD-aa-BbF"/>
-                <constraint firstItem="a9g-1g-YLC" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="tpD-mC-k7x"/>
-                <constraint firstAttribute="trailing" secondItem="1C1-4h-Ne5" secondAttribute="trailing" id="vu2-j2-kBc"/>
-            </constraints>
-            <point key="canvasLocation" x="83" y="228"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="control_btn_icon_close" width="12" height="12"/>
-    </resources>
-</document>

+ 2 - 3
PDF Office/PDF Master/Class/KMLightMember/InAppPurchase/Appstore/KMInAppPurchaseManager.swift

@@ -205,15 +205,14 @@ class KMInAppPurchaseManager: NSObject {
             
             if state == .noReceipt || state == .restoreFailed || state == .restoreVerFailed {
                 self.removeReceiptInfo()
-                KMLightMemberManager.manager.reloadUserInfo()
+               
             }
             
             if state == .verFailed ||
                 state == .verSuccess ||
                 state == .restoreVerFailed ||
                 state == .restoreVerSuccess {
-                //刷新用户信息
-                KMLightMemberManager.manager.reloadUserInfo()
+           
             }
             
             self.type = .unknow

+ 3 - 36
PDF Office/PDF Master/Class/KMLightMember/InAppPurchase/DMG/KMDMGPurchaseManager.swift

@@ -20,36 +20,13 @@ class KMDMGPurchaseManager: NSObject {
     }
     
     func updatePurchaseState() -> KMPurchaseManagerState {
-        let info = KMLightMemberManager.manager.info.subscriptionInfoList
         var tempState: KMPurchaseManagerState = .unknow
-        if info.count > 0 {
-            for item in info {
-                switch item.status {
-                case 0:
-                    tempState = .unknow
-                case 1:
-                    tempState = .subscription
-                case 2:
-                    tempState = .subscriptionExpired
-                case 3:
-                    tempState = .trial
-                case 4:
-                    tempState = .trialExpired
-                default:
-                    tempState = .unknow
-                }
-            }
-        }
+           
         return tempState
     }
     
     func purchaseProduct(productIdentifier: String, email: String, completion: KMPurchaseCompletion) {
-//        NSWorkspace.shared.open(URL(string: "http://test-pdf-pro.kdan.cn:3021/master/checkout?email=\(email)")!)
-#if DEBUG
-        NSWorkspace.shared.open(URL(string: "\(KMLightMemberManager.manager.config.kStoreServerURL)/store/master-subscription?email=\(email)")!)
-#else
-        NSWorkspace.shared.open(URL(string: "\(KMLightMemberManager.manager.config.kStoreServerURL)/store/master-subscription?email=\(email)")!)
-#endif
+ 
         completion(false, .success)
     }
     
@@ -60,16 +37,6 @@ class KMDMGPurchaseManager: NSObject {
     }
     
     func restorePurchases() {
-        KMRequestServerManager.manager.getUserInfo { [weak self] success, data, error, isLocal in
-            if success {
-                KMPrint("DMG刷新用户信息成功")
-                if KMLightMemberManager.manager.purchaseState == .subscription {
-                    let controller = KMSubscribeWaterMarkWindowController.isSampleController()
-                    controller.closeWindow()
-                }
-            } else {
-                KMPrint("DMG刷新用户信息失败")
-            }
-        }
+     
     }
 }

+ 2 - 26
PDF Office/PDF Master/Class/KMLightMember/InAppPurchase/KMPurchaseManager.swift

@@ -67,22 +67,6 @@ class KMPurchaseManager: NSObject {
 #if VERSION_FREE
         KMPrint("正在订阅中AppStore")
         
-        let userId: String = KMLightMemberManager.manager.info.id
-//        KMRequestServerManager.manager.createOrder(productId: "21", userId: userId) { success, orderId, result in
-//            if success {
-//                if orderId?.count != 0 {
-                    KMInAppPurchaseManager.manager.purchaseProduct(productIdentifier: PRODUCT_1) { isSuccess, error in
-                        if isSuccess {
-                            completion(true, error)
-                        } else {
-                            completion(false, error)
-                        }
-                    }
-//                }
-//            } else {
-//                completion(false, .orderFailed)
-//            }
-//        }
 #endif
         
 #if VERSION_DMG
@@ -93,19 +77,11 @@ class KMPurchaseManager: NSObject {
     }
     
     func showStore() {
-#if VERSION_DMG
-        let email: String = UserDefaults.standard.value(forKey: "kLoginEmail") as? String ?? ""
-        NSWorkspace.shared.open(URL(string: "\(KMLightMemberManager.manager.config.kStoreServerURL)/store/master?email=\(email)")!)
-#endif
+ 
     }
     
     func showPurchasesInfo() {
-#if VERSION_DMG
-        if KMLightMemberManager.manager.isLogin() {
-            let token: String = KMLightMemberManager.manager.token.access_token
-            NSWorkspace.shared.open(URL(string: "\(KMLightMemberManager.manager.config.kStoreServerURL)/account/master-subscription?appid=16&token=\(token)")!)
-        }
-#endif
+ 
     }
     
     func restorePurchases(_ completion: @escaping KMPurchaseRestoreCompletion) {

+ 0 - 285
PDF Office/PDF Master/Class/KMLightMember/Manager/KMLightMemberManager.swift

@@ -1,285 +0,0 @@
-//
-//  KMLightMemberManager.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/22.
-//
-
-import Cocoa
-
-let USER_LOGINSTATE_NOTIFICATION = "kUserLoginStateNotification" //用户登录状态改变通知
-let USER_INFO_CHANGE_NOTIFICATION = "kUserInfoChangeNotification" //用户信息改变通知
-let ADVANCED_NOTIFICATION = "kAdvancedContentViewShowNotification" //用户高级引导显示
-
-@objc enum KMLightMemberUserState: Int, CaseIterable {
-    case unknown = 0//,"unknown"
-    case login = 1//"login" //登录
-    case logOut = 2//"logOut" //登出
-    case cancellation = 3//"cancellation" //注销
-}
-
-@objcMembers class KMLightMemberManager: NSObject {
-    static let manager = KMLightMemberManager()
-
-    var config: KMLightMemberConfig = KMLightMemberConfig()
-    var info: KMLightMemberUserInfo = KMLightMemberUserInfo()
-    var token: KMLightMemberToken = KMLightMemberToken()
-    
-    var userState: KMLightMemberUserState = .unknown //用户状态
-    var purchaseState: KMPurchaseManagerState { //订阅状态
-        get {
-            return KMPurchaseManager.manager.state
-        }
-    }
-     
-    /**
-     是否显示高级功能视图
-     */
-    var canShowAdvancedView: Bool = true {
-        didSet {
-            NotificationCenter.default.post(name: NSNotification.Name(rawValue: ADVANCED_NOTIFICATION), object: nil)
-        }
-    }
-
-    override init() {
-        super.init()
-        self.reloadUserInfo()
-    }
-    
-    func logOut() {
-        DispatchQueue.main.async {
-            self.userState = .logOut
-            KMLightMemberCache.cache.clean()
-            self.reloadUserInfo()
-            NotificationCenter.default.post(name: NSNotification.Name(rawValue: USER_LOGINSTATE_NOTIFICATION), object: nil, userInfo: nil)
-        }
-    }
-    
-    func logIn() {
-        self.userState = .login
-        self.reloadUserInfo()
-        NotificationCenter.default.post(name: NSNotification.Name(rawValue: USER_LOGINSTATE_NOTIFICATION), object: nil, userInfo: nil)
-    }
-    
-    func cancellation() {
-        self.userState = .cancellation
-        self.reloadUserInfo()
-        NotificationCenter.default.post(name: NSNotification.Name(rawValue: USER_LOGINSTATE_NOTIFICATION), object: nil, userInfo: nil)
-    }
-}
-
-//MARK: - 数据
-extension KMLightMemberManager {
-    /**
-     刷新本地用户数据
-     */
-    func reloadUserInfo() {
-        //获取用户信息
-        let userInfo = KMLightMemberCache.cache.readData(type: .info)
-        if userInfo.count != 0 {
-            KMLightMemberUserInfo.parseData(data: userInfo, needSave: false) { [weak self] data in
-                self?.info = data
-            }
-        } else {
-            self.info = KMLightMemberUserInfo()
-        }
-        
-        let token = KMLightMemberCache.cache.readData(type: .token)
-        if token.count != 0 {
-            KMLightMemberToken.parseData(data: token) { [weak self] data in
-                self?.token = data
-            }
-        } else {
-            self.token = KMLightMemberToken()
-        }
-        NotificationCenter.default.post(name: NSNotification.Name(rawValue: USER_INFO_CHANGE_NOTIFICATION), object: nil, userInfo: nil)
-    }
-    
-    /**
-     刷新本地用户数据
-     */
-    func updateNetworkingUserInfo(completion: @escaping (_ isDidLogout: Bool) -> Void) {
-        KMRequestServerManager.manager.getUserInfo { [weak self] success, data, error, isLocal in
-            if success {
-                self?.reloadUserInfo()
-                completion(false)
-            } else {
-                if error?.code == 304 {
-                    KMLightMemberManager.manager.logOut()
-                    completion(true)
-                }
-                completion(false)
-            }
-        }
-    }
-    
-    /**
-     token是否生效
-     */
-    func isTokenValid() async -> Bool {
-        var result = false
-        
-        if self.isLogin() {
-            do {
-                let (success, error) = try await KMRequestServerManager.manager.getUserInfo2()
-//                Thread.sleep(forTimeInterval: 20.0)
-                if success {
-                    result = true
-                } else {
-                    if error.code == 304 {
-                        KMLightMemberManager.manager.logOut()
-                        result = false
-                    } else {
-                        result = true
-                    }
-                }
-                return result
-            } catch {
-                return result
-            }
-        }
-        return result
-    }
-}
-
-//MARK: - 快捷方法
-extension KMLightMemberManager {
-    //是否已经登录
-    func isLogin() -> Bool {
-        var result: Bool = false
-        if token.access_token != "" {
-            result = true
-        }
-        return result
-    }
-    
-    //是否已经注销
-    func isLogOff() -> Bool {
-        var result: Bool = false
-        return result
-    }
-    
-    //是否能使用高级功能
-    func canUseAdvanced(needNetworking: Bool = false) async -> Bool {
-        var result: Bool = false
-        
-        var tokenValid = true
-        if needNetworking {
-            tokenValid = await self.isTokenValid()
-        }
-        KMPrint(tokenValid)
-        if tokenValid && info.isInFreeUseTime || (self.purchaseState == .subscription || self.purchaseState == .trial) {
-            result = true
-        }
-        return result
-    }
-    
-//    //是否能使用付费功能
-//    func canPayFunction(needNetworking: Bool = false) async -> Bool {
-//        var result: Bool = false
-//        //先确认可以使用高级功能,再确认是否已经订阅
-//        if await self.canUseAdvanced(needNetworking: needNetworking) && (self.purchaseState == .subscription || self.purchaseState == .trial) {
-//            result = true
-//        }
-//        return result
-//    }
-    
-    //是否能使用付费功能
-    func canPayFunction() -> Bool {
-        var result: Bool = false
-        //先确认可以使用高级功能,再确认是否已经订阅
-        if (self.purchaseState == .subscription || self.purchaseState == .trial) {
-            result = true
-        }
-        return result
-    }
-    
-    //是否显示订单信息
-    func existOrderInfo() -> Bool {
-        return self.info.existOrderInfo ?? false
-    }
-}
-
-//MARK: 登录注册界面弹出逻辑
-/*
- 弹出策略:
- 每日首次进入阅读页,自动弹出【注册弹窗】;关闭弹窗后,当日不再弹出,次日零点重置
- 注意:首次进入阅读页之前,通过其他方式弹出过【注册弹窗】,则进入阅读页不再主动弹出
- **/
-extension KMLightMemberManager {
-    //检查是否需要弹起注册登录框
-    func checkPopupRegister() -> Bool {
-        var needPop = false
-        self.resetRegisterPopupStatus()
-        
-        var info: [String : Any] = [:]
-        if (UserDefaults.standard.value(forKey: "CheckPopupRegistration") == nil) {
-            
-        } else {
-            info = (UserDefaults.standard.value(forKey: "CheckPopupRegistration") as! [String : Any])
-        }
-        
-        let isPopupShownToday = info["isPopupShownToday"] as? Bool ?? false
-        var lastPopupDate = info["lastPopupDate"] as? Date
-        
-        // 检查是否已经弹出过注册弹窗
-        if (!isPopupShownToday) {
-            // 获取当前日期
-            let currentDate = Date()
-
-            // 检查上次弹窗显示的日期是否为空,或者不是当天
-            if lastPopupDate == nil || (lastPopupDate != nil &&
-                                        !Calendar.current.isDate(lastPopupDate!, inSameDayAs: currentDate)) {
-                // 更新上次弹窗显示的日期为当前日期
-                lastPopupDate = currentDate
-                info.updateValue(lastPopupDate!, forKey: "lastPopupDate")
-                info.updateValue(true, forKey: "isPopupShownToday")
-                UserDefaults.standard.set(info, forKey: "CheckPopupRegistration")
-                UserDefaults.standard.synchronize()
-                needPop = true
-            }
-        }
-        return needPop
-    }
-    
-    func updatePopupShownToday(isPop: Bool) {
-        var info: [String : Any] = [:]
-        if (UserDefaults.standard.value(forKey: "CheckPopupRegistration") == nil) {
-            
-        } else {
-            info = (UserDefaults.standard.value(forKey: "CheckPopupRegistration") as! [String : Any])
-        }
-        info.updateValue(isPop, forKey: "isPopupShownToday")
-        UserDefaults.standard.set(info, forKey: "CheckPopupRegistration")
-        UserDefaults.standard.synchronize()
-    }
-    
-    func resetRegisterPopupStatus() {
-        var info: [String : Any] = [:]
-        if (UserDefaults.standard.value(forKey: "CheckPopupRegistration") == nil) {
-            
-        } else {
-            info = (UserDefaults.standard.value(forKey: "CheckPopupRegistration") as! [String : Any])
-        }
-        
-        var isPopupShownToday = info["isPopupShownToday"]
-        let lastPopupDate = info["lastPopupDate"] as? Date
-        
-        // 获取当前日期和时间
-        let currentDate = Date()
-        // 获取当前日历
-        let calendar = Calendar.current
-        // 获取当天的午夜时间
-        let midnight = calendar.startOfDay(for: currentDate)
-        // 检查上次弹窗显示的日期是否早于当天的午夜时间
-        if let lastPopupDate = lastPopupDate, lastPopupDate < midnight {
-            // 重置弹窗状态
-            isPopupShownToday = false
-            
-            info.updateValue(isPopupShownToday!, forKey: "isPopupShownToday")
-//            info.updateValue(NSDate(), forKey: "lastPopupDate")
-            UserDefaults.standard.set(info, forKey: "CheckPopupRegistration")
-            UserDefaults.standard.synchronize()
-        }
-    }
-}

+ 4 - 678
PDF Office/PDF Master/Class/KMLightMember/Manager/KMRequestServerManager.swift

@@ -184,320 +184,6 @@ class KMRequestServerManager: NSObject {
 
 //MARK: - 会员
 extension KMRequestServerManager {
-    /**
-     @abstract 获取验证码
-     @param verifyCodeType 验证入口类型
-     @param email 邮箱
-     */
-    func getVerifyCode(verifyCodeType: KMVerifyCodeType, email: String, complete: @escaping KMRequestServerComplete) {
-        let urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-sso/auth/getVerifyCode"
-        let params: [String: Any] = ["action": verifyCodeType.rawValue,
-                                     "appId": "16",
-                                     "receiver": email,
-                                     "type": "0"]
-
-        KMRequestServer.requestServer.request(urlString: urlString, method: .get, params: params) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                complete(true, result)
-            } else {
-                complete(false, result)
-            }
-        }
-    }
-    
-    /**
-     @abstract 注册
-     @param userName  用户账号(邮箱)
-     @param verifyCode 验证码
-     */
-    func register(userName: String, password: String, verifyCode: String, complete: @escaping (_ success: Bool, _ requestData: KMLightMemberToken?, _ result: Result) -> Void) {
-        let uuid: String = GetHardwareUUID() ?? ""
-        let urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-sso/auth/emailRegister"
-        let params: [String: Any] = ["appId": "16",
-                                     "deviceSign": uuid,
-                                     "password": password,
-                                     "platformType": "0",
-                                     "username": userName,
-                                     "verifyCode": verifyCode,
-                                     "model": "Mac"]
-
-        KMRequestServer.requestServer.request(urlString: urlString, method: .post, params: params) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-        } completion: { [unowned self] task, responseObject, error in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                //解析数据
-                KMLightMemberToken.parseData(data: result.result) { data in
-                    //登录成功
-                    KMLightMemberManager.manager.logIn()
-                    complete(true, data, result)
-                }
-            } else {
-                complete(false, nil, result)
-            }
-        }
-    }
-    
-    /**
-     @abstract 注销
-     @param verifyCode  验证码
-     */
-    func logOff(verifyCode: String, complete: @escaping KMRequestServerComplete) {
-        let token: String = KMLightMemberManager.manager.token.access_token
-        if token == "" {
-            return
-        }
-        
-        var urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-sso/user/logOffForUser"
-//        let params = ["code":verifyCode]
-        urlString = urlString + (NSString(format: "?code=%@&appId=%@", verifyCode, "16") as String)
-        KMRequestServer.requestServer.request(urlString: urlString, method: .post, params: nil) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-            requestSerializer.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                //登出
-                KMLightMemberCache.cache.clean()
-                KMLightMemberManager.manager.logOut()
-                complete(true, result)
-            } else {
-                complete(false, result)
-            }
-        }
-    }
-    
-    /**
-     @abstract 登录
-     @param email  邮箱
-     @param password 密码
-     */
-    func login(email: String, password: String, complete: @escaping (_ success: Bool, _ requestData: KMLightMemberToken?, _ result: Result?) -> Void) {
-        var urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-sso/auth/emailLogin"
-        let uuid: String = GetHardwareUUID() ?? ""
-//        let params: [String: String] = ["appId": "16",
-//                                        "deviceSign": uuid,
-//                                        "email": email,
-//                                        "password": password,
-//                                        "platformType": "0"]
-
-        urlString = urlString + (NSString(format: "?appId=16&deviceSign=%@&email=%@&password=%@&platformType=0&model=%@", uuid, email, password, "Mac") as String)
-        KMRequestServer.requestServer.request(urlString: urlString, method: .post, params: nil) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                //解析数据
-                KMLightMemberToken.parseData(data: result.result) { data in
-                    //登录成功
-                    KMLightMemberManager.manager.logIn()
-                    complete(true, data, nil)
-                }
-            } else {
-                complete(false, nil, result)
-            }
-        }
-    }
-    
-    /**
-     @abstract 登出
-     */
-    func logout(complete: @escaping KMRequestServerComplete) {
-        let token: String = KMLightMemberManager.manager.token.access_token
-        if token == "" {
-            return
-        }
-        let uuid: String = GetHardwareUUID() ?? ""
-        var urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-sso/user/logout"
-        
-//        let params: [String: Any] = ["deviceSign": uuid,
-//                                     "appId": "16"]
-        
-        urlString = urlString + (NSString(format: "?appId=16&deviceSign=%@", uuid) as String)
-        
-        KMRequestServer.requestServer.request(urlString: urlString, method: .post, params: nil) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-            requestSerializer.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
-        } completion: { [unowned self] (task, responseObject, error) in
-            //登出成功
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                //登出
-                KMLightMemberManager.manager.logOut()
-                complete(true, result)
-            } else {
-                complete(false, result)
-            }
-        }
-    }
-    
-    /**
-     @abstract 修改密码
-     @param url  源文件url
-     @param data 数据
-     @retrun document
-     */
-    func resetPassword(account: String, firstPassword: String, secondPassword: String, verifyCode: String, complete: @escaping KMRequestServerComplete) {
-        let urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-sso/auth/resetPassword"
-        let params: [String: Any] = ["account": account,
-                                     "appId": "16",
-                                     "firstPassword": firstPassword,
-                                     "platformType": "0",
-                                     "secondPassword": secondPassword,
-                                     "verifyCode": verifyCode]
-
-        KMRequestServer.requestServer.request(urlString: urlString, method: .post, params: params) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                complete(true, result)
-            } else {
-                complete(false, result)
-            }
-        }
-    }
-
-    /**
-     @abstract 获取用户信息
-     */
-    func getUserInfo(complete: @escaping (_ success: Bool, _ data: KMLightMemberUserInfo?, _ result: Result?, _ isLocal: Bool) -> Void) {
-        let token: String = KMLightMemberManager.manager.token.access_token
-        if token == "" {
-            complete(false , nil, Result(message: "token 不存在", code: 304), false)
-            return
-        }
-        //先拿缓存数据 再请求新数据
-        let cacheData = KMLightMemberCache.cache.readData()
-        if cacheData.count != 0 {
-            KMLightMemberUserInfo.parseData(data: cacheData, needSave: false) { data in
-                complete(true ,data, nil, true)
-            }
-        }
-        
-        let urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-sso/user/me"
-
-        KMRequestServer.requestServer.request(urlString: urlString, method: .get, params: nil) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-            requestSerializer.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                //解析数据
-                KMLightMemberUserInfo.parseData(data: responseObject as! NSDictionary) { data in
-                    KMLightMemberManager.manager.reloadUserInfo()
-                    complete(true, data, nil, false)
-                }
-            } else {
-                complete(false, nil, result, false)
-            }
-        }
-    }
-    
-    func getUserInfo2() async throws -> (Bool, Result) {
-        let token: String = KMLightMemberManager.manager.token.access_token
-        if token == "" {
-            return (false, Result())
-        }
-
-        if #available(macOS 10.15, *) {
-            return try await withCheckedThrowingContinuation { continuation in
-                let urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-sso/user/me"
-                KMRequestServer.requestServer.request(urlString: urlString, method: .get, params: nil) { requestSerializer in
-                    requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-                    requestSerializer.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
-                } completion: { [unowned self] (task, responseObject, error) in
-                    let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-                    DispatchQueue.main.async {
-                        if result.code == 200 {
-                            //解析数据
-                            KMLightMemberUserInfo.parseData(data: responseObject as! NSDictionary) { data in
-                                KMLightMemberManager.manager.reloadUserInfo()
-                                continuation.resume(returning: (true, result))
-                            }
-                        } else {
-                            continuation.resume(returning: (false, result))
-                        }
-                    }
-                }
-            }
-        } else {
-            // Fallback on earlier versions
-            return (true, Result())
-        }
-    }
-    
-    /**
-     @abstract 验证码验证是否正确
-     @param account  用户账号(邮箱)
-     @param verifyCode 验证码
-     @retrun verifyCodeType 验证码入口类型
-     */
-    func verificationCode(account: String, verifyCode: String, verifyCodeType: KMVerifyCodeType, complete: @escaping KMRequestServerComplete) {
-        let urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-sso/auth/isEmailCodeValid"
-        let params: [String: Any] = ["account": account,
-                                     "code": verifyCode,
-                                     "type": verifyCodeType.rawValue,
-                                     "appId": "16"]
-
-        KMRequestServer.requestServer.request(urlString: urlString, method: .get, params: params) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                complete(true, result)
-            } else {
-                complete(false, result)
-            }
-        }
-    }
-    
-    /**
-     @abstract 邮箱验证
-     @param account  用户账号(邮箱)
-     @param verifyCodeType 验证码
-     @retrun verifyCodeType 验证码入口类型
-     */
-    func verificationEmail(userName: String, verifyEmailType: KMVerifyEmailType, complete: @escaping KMRequestServerComplete) {
-        let urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-sso/auth/validUser"
-        let params: [String: Any] = ["appId": "16",
-                                     "username": userName,
-                                     "platformType": "0",
-                                     "validType": verifyEmailType.rawValue]
-
-        KMRequestServer.requestServer.request(urlString: urlString, method: .post, params: params) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                complete(true, result)
-            } else {
-                complete(false, result)
-            }
-        }
-    }
-    
-    func getDeviceRetensionCoupon(complete: @escaping KMRequestServerDateComplete) {
-
-        let urlString = AIInfoConfig().aiActionURL + "api/devices/getRetensionCoupon"
-        let params: [String:Any] = ["unique_sn": self.uuid(),
-                                    "platform": "DMG"]
-
-        KMRequestServer.requestServer.request(urlString: urlString, method: .post, params: params) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 && result.error != nil && result.message != "unknown error" {
-                complete(true, responseObject as? NSDictionary)
-            } else {
-                complete(false, responseObject as? NSDictionary)
-            }
-        }
-    }
-    
     
     //MARK: Private Method
     private func uuid() -> String {
@@ -505,364 +191,10 @@ extension KMRequestServerManager {
     }
 }
 
-//MARK: - 订阅
-extension KMRequestServerManager {
-    //创建订单
-    func createOrder(productId: String, userId: String, complete: @escaping (_ success: Bool, _ orderId: String?, _ result: Result?) -> Void) {
-        let urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-website/pay/appStoreCreateOrder"
-        let params: [String: Any] = ["productId": productId,
-                                     "paymentMethod": "APPLE_PAY",
-                                     "userId": userId,
-                                     "appId": "16"]
-        
-        let token: String = KMLightMemberManager.manager.token.access_token
-        if token == "" {
-            complete(false, "", Result())
-            return
-        }
-        KMRequestServer.requestServer.request(urlString: urlString, method: .post, params: params) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-            requestSerializer.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                complete(true, result.result["id"] as! String, result)
-            } else {
-                complete(false, "", result)
-            }
-        }
-    }
-    
-    //
-    func restore(productId: String, userId: String, complete: @escaping (_ success: Bool, _ orderId: String?, _ result: Result?) -> Void) {
-        let urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-website/pay/appStoreCreateOrder"
-        let params: [String: Any] = ["productId": productId,
-                                     "paymentMethod": "APPLE_PAY",
-                                     "userId": userId,
-                                     "appId": "16"]
-        
-        let token: String = KMLightMemberManager.manager.token.access_token
-        if token == "" {
-            complete(false, "", Result())
-            return
-        }
-        KMRequestServer.requestServer.request(urlString: urlString, method: .post, params: params) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-            requestSerializer.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                complete(true, result.result["id"] as! String, result)
-            } else {
-                complete(false, "", result)
-            }
-        }
-    }
-    
-    func parseVerification(applePayProductId: String, orderId: String, receipt: String, restore: Int = 0, complete: @escaping KMRequestServerComplete) {
-        let urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-website/pay/appStoreOrderSucceed"
-        let params: [String: Any] = ["applePayProductId": applePayProductId,
-                                     "orderId": orderId,
-                                     "receipt": receipt,
-                                     "restore": restore]
-        KMPrint("二次验证上传数据:\(params)")
-        let token: String = KMLightMemberManager.manager.token.access_token
-        if token == "" {
-            complete(false, Result())
-            return
-        }
-        KMRequestServer.requestServer.request(urlString: urlString, method: .post, params: params) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-            requestSerializer.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                complete(true, result)
-            } else {
-                complete(false, result)
-            }
-        }
-    }
-    
-    func checkDeviceStatus(complete: @escaping KMRequestServerComplete) {
-        var urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-sso/auth/checkDeviceStatus"
-        
-        let uuid: String = GetHardwareUUID() ?? ""
-//        let params: [String: Any] = ["appId": "16",
-//                                     "deviceSign": uuid]
-        urlString = urlString + (NSString(format: "?appId=16&deviceSign=%@", uuid) as String)
-        KMRequestServer.requestServer.request(urlString: urlString, method: .post, params: nil) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                complete(true, result)
-            } else {
-                complete(false, result)
-            }
-        }
-    }
-    
-    func appStoreEquityVerification(applePayProductId: String, receipt: String, complete: @escaping KMRequestServerComplete) {
-        let urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-website/pay/appStoreEquityVerification"
-        
-        let params: [String: Any] = ["applePayProductId": applePayProductId,
-                                     "paymentMethod": "APPLE_PAY",
-                                     "receipt": receipt
-                                    ]
-        KMPrint("票据信息上传数据:\(params)")
-        var token: String = KMLightMemberManager.manager.token.access_token
-        if token == "" {
-            complete(false, Result())
-            return
-        }
-        
-        KMRequestServer.requestServer.request(urlString: urlString, method: .post, params: params) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-            requestSerializer.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                complete(true, result)
-            } else {
-                complete(false, result)
-            }
-        }
-    }
-    
-    func appStoreBuyComplete(applePayProductId: String, receipt: String, isPurchase: Bool = false, complete: @escaping KMRequestServerComplete) {
-        let urlString = KMLightMemberManager.manager.config.kServerURL + "/pdf-office-website/pay/appStoreBuyComplete"
-        let userId = KMLightMemberManager.manager.info.id 
-        let params: [String: Any] = ["applePayProductId": applePayProductId,
-                                     "paymentMethod": "APPLE_PAY",
-                                     "receipt": receipt,
-                                     "appId": "16",
-                                     "productId": "21",
-                                     "userId": userId
-                                    ]
-        KMPrint("票据信息上传数据:\(params)")
-        KMRequestServer.requestServer.request(urlString: urlString, method: .post, params: params) { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-        } completion: { [unowned self] (task, responseObject, error) in
-            let result = self.dealData(responseObject: responseObject as? NSDictionary, error: error)
-            if result.code == 200 {
-                complete(true, result)
-            } else {
-                complete(false, result)
-            }
-        }
-    }
-}
 
 //MARK: - AI
 extension KMRequestServerManager {
-    /**
-     @abstract 翻译上传
-     @param file  文件路径
-     @param version 版本号
-     */
-    func aiTranslationFileUpload(file: String, version: String, complete: @escaping KMRequestServerComplete) {
-        
-        let infoDictionary = Bundle .main.infoDictionary!
-        let userInfo = KMLightMemberCache.cache.readData(type: .info)
-        let majorVersion = infoDictionary["CFBundleShortVersionString"]
-        let urlString = KMAIServerConfig().aiTranslationURL + "/v1/translate/fileUpload"
-        let fileData = FileManager.default.contents(atPath: file)
-        let params: [String: Any] = ["file": fileData,
-                                     "projectId": "2",
-                                     "version": version,
-                                     "userId": userInfo["id"] as Any]
-        KMRequestServer.requestServer.aiTranslation(urlString: urlString, params: params) { formData in
-            let fileURL = URL(fileURLWithPath: file)
-            try? formData.appendPart(withFileURL: fileURL, name: "file", fileName: fileURL.lastPathComponent, mimeType: "application/octet-stream")
-        } requestSerializer: { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-        } completion: { task, responseObject, error in
-            if responseObject != nil {
-                let data: NSDictionary = responseObject!["data"] as? NSDictionary ?? [:]
-                let code: String = responseObject!["code"] as? String ?? "06005"
-                let message: String = responseObject!["msg"] as? String ?? "unknown error"
-                let error = NSError(domain: message, code: Int(code)!)
-                let result = Result(result: data,message: message,code: Int(code)!, error: error)
-                if result.code == 200 {
-                    complete(true, result)
-                } else {
-                    complete(false, result)
-                }
-            } else {
-                let error = NSError(domain: "unknown error", code: 404)
-                let result = Result(result: [:],message: "unknown error",code: 404, error: error)
-                complete(false, result)
-            }
-        }
-    }
-    
-    /**
-     @abstract 文件翻译
-     @param fileKey  文件Key
-     @param from 初始语言
-     @param to 结束语言
-     @param version 应用版本
-     */
-    func aiTranslationFileTranslateHandle(fileKey: String, from: String, to: String, version: String, complete: @escaping KMRequestServerComplete) {
-        
-        let infoDictionary = Bundle .main.infoDictionary!
-        let userInfo = KMLightMemberCache.cache.readData(type: .info)
-        let majorVersion = infoDictionary["CFBundleShortVersionString"]
-        let urlString = KMAIServerConfig().aiTranslationURL + "/v1/translate/fileTranslateHandle"
-        if userInfo.count > 0 {
-            var semaphore = DispatchSemaphore (value: 0)
-
-            let parameters = String(format: "{\r\n    \"fileKey\": \"%@\",\r\n    \"from\": \"%@\",\r\n    \"to\": \"%@\",\r\n    \"version\": \"%@\",\r\n    \"projectId\": \"2\",\r\n    \"userId\": \"%@\"\r\n}", fileKey, from, to, version, userInfo["id"] as! String)
-            let postData = parameters.data(using: .utf8)
-
-            var request = URLRequest(url: URL(string: urlString)!,timeoutInterval: Double.infinity)
-            request.addValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-            request.addValue("application/json", forHTTPHeaderField: "Content-Type")
-
-            request.httpMethod = "POST"
-            request.httpBody = postData
-
-            let task = URLSession.shared.dataTask(with: request) { data, response, error in
-               guard let data = data else {
-                   KMPrint(String(describing: error))
-                  semaphore.signal()
-                  return
-               }
-                let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary ?? [:]
-                if jsonObject != nil {
-                    let data1: NSDictionary = jsonObject!["data"] as? NSDictionary ?? [:]
-                    let code: String = jsonObject!["code"] as? String ?? "06005"
-                    let message: String = jsonObject!["msg"] as? String ?? "unknown error"
-                    let error = NSError(domain: message, code: Int(code)!)
-                    let result = Result(result: data1,message: message,code: Int(code)!, error: error)
-                    if result.code == 200 {
-                        complete(true, result)
-                    } else {
-                        complete(false, result)
-                    }
-
-                } else {
-                    let error = NSError(domain: "unknown error", code: 404)
-                    let result = Result(result: [:],message: "unknown error",code: 404, error: error)
-                    complete(false, result)
-                }
-               semaphore.signal()
-            }
-            
-            task.resume()
-            semaphore.wait()
-        }
-    }
-
-    /**
-     @abstract 内容翻译
-     @param q  选中
-     @param from 初始语言
-     @param to 结束语言
-     @param version 应用版本
-     */
-    func aiTranslationTextTrans(q: String, from: String, to: String, version: String, complete: @escaping KMRequestServerComplete) {
-        
-        let infoDictionary = Bundle .main.infoDictionary!
-        let userInfo = KMLightMemberCache.cache.readData(type: .info)
-        let majorVersion = infoDictionary["CFBundleShortVersionString"]
-        let urlString = KMAIServerConfig().aiTranslationURL + "/v1/translate/textTrans"
-        if userInfo.count > 0 {
-            var semaphore = DispatchSemaphore (value: 0)
-            
-            var escapedString = q
-            if q.contains("\n") || q.contains("\r") {
-                escapedString = q.replacingOccurrences(of: "\n", with: "\\n")
-                escapedString = escapedString.replacingOccurrences(of: "\r", with: "\\r")
-            } else if q.contains("\u{2028}") {
-                
-            }
-            escapedString = String(data: escapedString.data(using: .utf8)!, encoding: .utf8)!
-    //        let escapedString = String(data: q.data(using: .utf8)!, encoding: .utf8)!
-            let parameters = String(format: "{\r\n    \"q\": \"%@\",\r\n    \"from\": \"%@\",\r\n    \"to\": \"%@\",\r\n    \"version\": \"%@\",\r\n    \"projectId\": \"2\",\r\n    \"userId\": \"%@\"\r\n}", escapedString, from, to, version, userInfo["id"] as! String)
-
-            let postData = parameters.data(using: .utf8)
-
-            var request = URLRequest(url: URL(string: urlString)!,timeoutInterval: Double.infinity)
-            request.addValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-            request.addValue("application/json", forHTTPHeaderField: "Content-Type")
-
-            request.httpMethod = "POST"
-            request.httpBody = postData
-
-            let task = URLSession.shared.dataTask(with: request) { data, response, error in
-               guard let data = data else {
-                   KMPrint(String(describing: error))
-                  semaphore.signal()
-                  return
-               }
-                let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary ?? [:]
-                if jsonObject != nil {
-                    let data1: NSDictionary = jsonObject!["data"] as? NSDictionary ?? [:]
-                    let code: String = jsonObject!["code"] as? String ?? "06005"
-                    let message: String = jsonObject!["msg"] as? String ?? "unknown error"
-                    let error = NSError(domain: message, code: Int(code)!)
-                    let result = Result(result: data1,message: message,code: Int(code)!, error: error)
-                    if result.code == 200 {
-                        complete(true, result)
-                    } else {
-                        complete(false, result)
-                    }
-                } else {
-                    let error = NSError(domain: "unknown error", code: 404)
-                    let result = Result(result: [:],message: "unknown error",code: 404, error: error)
-                    complete(false, result)
-                }
-               semaphore.signal()
-            }
-            
-            task.resume()
-            semaphore.wait()
-        }
-    }
-    
-    /**
-     @abstract重写 & 纠错
-     @param content  内容
-     @param version 版本号
-     */
-    func aiRewriting(content: String, version: String, state: KMAIRewritingState, complete: @escaping KMRequestServerComplete) {
-        
-        let userInfo = KMLightMemberCache.cache.readData(type: .info)
-        var urlString = KMAIServerConfig().aiRewritingURL + "/api/rewrite"
-//        if state == .AIErrorCorrection {
-//            urlString = KMAIServerConfig().aiRewritingURL + "/api/correct-typos"
-//        }
-        let params: [String: Any] = ["project_id": 2,
-                                     "content": content,
-                                     "version": version,
-                                     "user_id": userInfo["id"] as Any]
-        
-        KMRequestServer.requestServer.aiRewriting(urlString: urlString, params: params) { formData in
-            
-        } requestSerializer: { requestSerializer in
-            requestSerializer.setValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
-        } completion: { task, responseObject, error in
-            if responseObject != nil {
-                let data: NSDictionary = responseObject!["data"] as? NSDictionary ?? [:]
-                let code: String = responseObject!["code"] as? String ?? "06005"
-                let message: String = responseObject!["message"] as? String ?? "unknown error"
-                let error = NSError(domain: message, code: Int(code)!)
-                let result = Result(result: data,message: message,code: Int(code)!, error: error)
-                if result.code == 200 {
-                    complete(true, result)
-                } else {
-                    complete(false, result)
-                }
-            } else {
-                let error = NSError(domain: "unknown error", code: 404)
-                let result = Result(result: [:],message: "unknown error",code: 404, error: error)
-                complete(false, result)
-            }
-        }
-    }
-
+  
 }
 
 //MARK: - 数据处理
@@ -919,9 +251,7 @@ extension KMRequestServerManager {
         }
         
         if code == 304 {
-            self.checkDeviceStatus { success, result in
-                
-            }
+             
         }
         
         if code == 330 {
@@ -936,9 +266,7 @@ extension KMRequestServerManager {
                     if window != nil {
                         loginAlert?.beginSheetModal(for: window) { result in
                             if (result == .alertFirstButtonReturn) {
-                                if KMLoginWindowController.fetchSampleController() == nil {
-                                    KMLoginWindowController.show(window: window)
-                                }
+                                 
                             } else if result == .alertSecondButtonReturn {
                                 self.loginAlert = nil
                                 return
@@ -955,9 +283,7 @@ extension KMRequestServerManager {
         if code == 343 {
             DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.2, execute: { [unowned self] in
                 var window = NSWindow.currentWindow()
-                let _ = KMAccountExceptionWindowController.show(window: window)
-                KMLightMemberManager.manager.logOut()
-            })
+             })
         }
         
 //        if code == 500 {

+ 0 - 69
PDF Office/PDF Master/Class/KMLightMember/Model/KMLightMemberToken.swift

@@ -1,69 +0,0 @@
-//
-//  KMLightMemberToken.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/27.
-//
-
-import Cocoa
-
-class KMLightMemberToken: NSObject, Codable{
-    var access_token: String = ""
-    var expires_in: String = ""
-    var refresh_token: String = ""
-    var token_type: String = ""
-    //    var scope: String = ""
-}
-
-extension KMLightMemberToken {
-    static public func parseData(data: NSDictionary, completion:(_ data: KMLightMemberToken) -> Void) -> Void {
-        if (data.count != 0) {
-            KMLightMemberCache.cache.saveData(data: data, type: .token)
-        }
-        
-        var result: KMLightMemberToken = KMLightMemberToken()
-        
-        let jsonString: String = DictionaryToJson.dictionary(toJson: data)!
-        let jsonData: Data = jsonString.data(using: .utf8)!
-        
-        let decoder = JSONDecoder()
-//                decoder.dataDecodingStrategy = .base64
-//                decoder.keyDecodingStrategy = .convertFromSnakeCase //带下划线命名
-
-        decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "+∞", negativeInfinity: "-∞", nan: "NaN")
-#if DEBUG
-        //MARK: 测试使用
-        var lightMemberToken = try! decoder.decode(KMLightMemberToken.self, from: jsonData)
-        if (lightMemberToken != nil) {
-            result = lightMemberToken
-        }
-#else
-//            MARK: 此处try 使用 ? ,如果数据出问题 advertisementModel将无参数, 测试时使用!
-        var lightMemberToken = try? decoder.decode(KMLightMemberToken.self, from: jsonData)
-        if (lightMemberToken != nil) {
-            result = lightMemberToken!
-        }
-#endif
-        completion(result)
-    }
-}
-
-
-
-public class DictionaryToJson: NSObject {
-    public static func dictionary(toJson dic: AnyObject?) -> String? {
-    var jsonData: Data? = nil
-        do {
-            if let dic = dic {
-                jsonData = try JSONSerialization.data(withJSONObject: dic, options: .prettyPrinted)
-            }
-        } catch let parseError {
-            KMPrint("(parseError.localizedDescription)")
-        }
-        if let jsonData = jsonData {
-            return String(data: jsonData, encoding: .utf8)
-        }
-        return nil
-    }
-}
-

+ 0 - 211
PDF Office/PDF Master/Class/KMLightMember/Model/KMLightMemberUserInfo.swift

@@ -1,211 +0,0 @@
-//
-//  KMLightMemberUserInfo.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/2/22.
-//
-
-import Cocoa
-
-class KMLightMemberUserInfo: NSObject, Codable {
-    var id: String = ""
-    var appId: String = ""
-    var freeDate: String = ""
-    var isInFreeUseTime: Bool = false //是否免费使用
-    var email: String = ""
-    var platformType: Int = 0
-//    var accountType: Int = 0
-    var createdAt: String = ""
-    var validFlag: String = "" // 0是已注销 5是注销中
-    var subscriptionInfoList: [KMLightMemberUserSubscriptionInfo] = []
-    var existOrderInfo: Bool?
-    
-//    accountSource = 0;
-//    accountType = "<null>";
-//    appId = 16;
-//    area = "<null>";
-//    companyId = "<null>";
-//    createdAt = "2023-07-04 16:52:47";
-//    digestPassword = "<null>";
-//    email = "wahek23894@dotvilla.com";
-//    freeDate = "2023-06-22 08:00:00";
-//    fullName = "<null>";
-//    id = "6d9bf147-177b-408c-aeac-4116a30805a8";
-//    industry = "<null>";
-//    isInFreeUseTime = 1;
-//    job = "<null>";
-//    lastPopularizeAt = "<null>";
-//    lastPresentedCouponAt = "<null>";
-//    mailable = "<null>";
-//    phone = "<null>";
-//    platformType = 0;
-//    remark = "<null>";
-//    resetToken = "<null>";
-//    role = "<null>";
-//    subscribed = "<null>";
-//    subscriberType = "<null>";
-//
-//    var companyId: String = ""
-//    var fullName: String = ""
-//    var subscriberType: String = ""
-//    var subscribed: String = ""
-//    var digestPassword: String = ""
-//    var phone: String = ""
-//    var industry: String = ""
-//    var lastPopularizeAt: String = ""
-//    var lastPresentedCouponAt: String = ""
-//    var mailable: String = ""
-//    var resetToken: String = ""
-//    var role: String = ""
-//    var job: String = ""
-//    var area: String = ""
-//    var accountSource: String = ""
-//    var updatedAt: String = ""
-//    var remark: String = ""
-//    var validFlag: String = ""
-//    var subscriptionInfoList: Any
-}
-
-class KMLightMemberUserSubscriptionInfo: NSObject, Codable {
-    var endDate: String?
-    var id: String?
-    var payType: Int? //0:未自动续订 1:自动续订
-    var platform: Int?
-    var status: Int?
-    var userId: String?
-}
-
-extension KMLightMemberUserInfo {
-    //MARK: data
-    /**
-     @abstract 解析数据
-     @param data 传入参数 NSDictionary
-     @return KMAdvertisementModel
-      */
-    static public func parseData(data: NSDictionary, needSave: Bool = true, completion:(_ result: KMLightMemberUserInfo) -> Void) -> Void {
-        var result: KMLightMemberUserInfo = KMLightMemberUserInfo()
-        if data.count > 0 {
-            if (data.count != 0 && needSave) {
-                KMLightMemberCache.cache.saveData(data: data)
-            }
-            var resultData = KMLightMemberCache.cache.removeNullValuesFromDictionary(data as! [String : Any])
-            //兼容旧数据
-            if resultData["subscriptionInfoList"] == nil {
-                resultData.updateValue([], forKey: "subscriptionInfoList")
-            }
-            
-            let jsonString: String = DictionaryToJson.dictionary(toJson: resultData as? AnyObject)!
-            let jsonData: Data = jsonString.data(using: .utf8)!
-            
-            let decoder = JSONDecoder()
-    //                decoder.dataDecodingStrategy = .base64
-    //                decoder.keyDecodingStrategy = .convertFromSnakeCase //带下划线命名
-
-            decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "+∞", negativeInfinity: "-∞", nan: "NaN")
-    #if DEBUG
-            //MARK: 测试使用
-            var lightMemberUserInfo = try! decoder.decode(KMLightMemberUserInfo.self, from: jsonData)
-            if (lightMemberUserInfo != nil) {
-                result = KMLightMemberUserInfo.allowLoadItemData(lightMemberUserInfo)
-            }
-    #else
-    //      MARK: 此处try 使用 ? ,如果数据出问题 advertisementModel将无参数, 测试时使用!
-            var lightMemberUserInfo = try? decoder.decode(KMLightMemberUserInfo.self, from: jsonData)
-            if (lightMemberUserInfo != nil) {
-                result = KMLightMemberUserInfo.allowLoadItemData(lightMemberUserInfo!)
-            }
-    #endif
-        }
-        completion(result)
-    }
-    
-    func allowLoadData(data: NSDictionary) -> Bool {
-        var result = false
-        
-//        let status = (data["status"] as? Int) ?? 0
-//        let app_name: String = data["app_name"] as? String ?? ""
-//
-//        if (status == 1 &&
-//            app_name == configuration.appName.string()) {
-//            result = true
-//        }
-        return result
-        
-    }
-    
-    func allowLoadContentData(data: KMLightMemberUserInfo) -> Bool {
-        var result = false
-        
-//        let time: NSInteger = NSInteger(KMAdvertisementTimeStampConversion.getCurrentTimeInterval())!
-//        let startTime: NSInteger = NSInteger(data.startTime!)!
-//        let endTime: NSInteger = NSInteger(data.endTime!)!
-//        let platform = configuration.platform
-//        let subscribeType = configuration.subscribeType
-//        let version = data.version ?? "1.0"
-//        let localVersion = self.getLocalVersion()
-//        let hidden = data.hidden ?? false
-//
-//        if (time >= startTime &&
-//            time <= endTime &&
-//            platform == data.platform &&
-//            self.compareVersion(nowVersion:localVersion, newVersion: version) &&
-//            (subscribeType == data.subscribeType || data.subscribeType == .all) &&
-//            !hidden) {
-//            result = true
-//        }
-        return result
-    }
-    
-    //过滤item是否显示
-    static func allowLoadItemData(_ data: KMLightMemberUserInfo) -> KMLightMemberUserInfo {
-        var result = data
-        var array: [KMLightMemberUserSubscriptionInfo] = []
-        
-        let subscriptionList = data.subscriptionInfoList
-        for item in subscriptionList {
-            if item.platform == 1 {
-                array.append(item)
-            }
-        }
-//        if subscriptionList.count > 1 {
-            result.existOrderInfo = true
-//        } else {
-//            result.existOrderInfo = false
-//        }
-        result.subscriptionInfoList = array
-        return result
-    }
-    
-    //获取本地版本号
-    func getLocalVersion() -> String {
-        var localVersion = ""
-        if let v: String = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String {
-            localVersion = v
-        }
-        return localVersion
-    }
-    
-    func compareVersion(nowVersion: String, newVersion: String) -> Bool {
-        let nowArray = nowVersion.split(separator: ".")
-        let newArray = newVersion.split(separator: ".")
-        let big = nowArray.count > newArray.count ? newArray.count : nowArray.count
-        if big != 0 {
-            for index in 0...big - 1 {
-                let first = nowArray[index]
-                let second = newArray[index]
-                if Int(first)! < Int(second)!  {
-                    return true
-                }
-                if index == big - 1 {
-                    if Int(first)! <= Int(second)!  {
-                        return true
-                    }
-                }
-            }
-        } else {
-            return true
-        }
-        return false
-    }
-}
-

+ 0 - 77
PDF Office/PDF Master/Class/KMLightMember/Tools/Alert/KMPurchaseAlertView.swift

@@ -1,77 +0,0 @@
-//
-//  KMPurchaseAlertView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/7/17.
-//
-
-import Cocoa
-
-class KMPurchaseAlertView: BaseXibView {
-
-    @IBOutlet weak var iconImageView: NSImageView!
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var heightConstraint: NSLayoutConstraint!
-    @IBOutlet weak var contentBackgroundView: NSView!
-    
-    var event: Any? = nil
-    deinit {
-         KMPrint("KMPurchaseAlertView delloc")
-    }
-    
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-    
-    static func show(view: NSView, string: String) -> KMPurchaseAlertView? {
-//        if let window = NSApp.mainWindow {
-        let alertView = KMPurchaseAlertView(frame: view.bounds )
-        view.addSubview(alertView)
-        alertView.titleLabel.stringValue = string
-        alertView.dismissShow()
-        return alertView
-//        }
-        return nil
-    }
-    
-    func dismissShow() {
-        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 3.0) {
-            NSAnimationContext.runAnimationGroup { NSAnimationContext in
-                self.animator().alphaValue = 0
-                self.removeFromSuperview()
-            }
-        }
-    }
-    
-    func setup() {
-        self.contentBackgroundView.backgroundColor(NSColor.km_init(hex: "#000000").withAlphaComponent(1))
-        self.contentBackgroundView.border(NSColor.clear, 0, 4)
-        self.titleLabel.textColor = NSColor.km_init(hex: "#FFFFFF")
-        self.titleLabel.font = NSFont.SFProTextRegularFont(14)
-    }
-}
-
-//MARK: 时间拦截
-extension KMPurchaseAlertView {
-    override func mouseUp(with event: NSEvent) {
-        
-    }
-    
-    override func mouseDown(with event: NSEvent) {
-        
-    }
-    
-    override func mouseMoved(with event: NSEvent) {
-        
-    }
-    
-    override func mouseEntered(with event: NSEvent) {
-        
-    }
-    
-    override func mouseExited(with event: NSEvent) {
-        
-    }
-}

+ 0 - 64
PDF Office/PDF Master/Class/KMLightMember/Tools/Alert/KMPurchaseAlertView.xib

@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMPurchaseAlertView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="contentBackgroundView" destination="XUl-hB-7sK" id="f5r-6U-duF"/>
-                <outlet property="heightConstraint" destination="PbS-kQ-gV5" id="ZEn-O1-qLT"/>
-                <outlet property="iconImageView" destination="jSr-AR-J79" id="WeA-cJ-HrO"/>
-                <outlet property="titleLabel" destination="ojP-eQ-jrF" id="301-fA-d7z"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="768" height="479"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="XUl-hB-7sK">
-                    <rect key="frame" x="270" y="216" width="229" height="48"/>
-                    <subviews>
-                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jSr-AR-J79">
-                            <rect key="frame" x="16" y="16" width="16" height="16"/>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="16" id="G0g-yD-f8b"/>
-                                <constraint firstAttribute="height" constant="16" id="tg7-fD-CXI"/>
-                            </constraints>
-                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="icon_tips_error_small" id="8cn-Ay-TdH"/>
-                        </imageView>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ojP-eQ-jrF">
-                            <rect key="frame" x="38" y="16" width="177" height="16"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" title="阿萨德发斯蒂芬去玩儿武器二" id="eZd-NL-okI">
-                                <font key="font" metaFont="system"/>
-                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="jSr-AR-J79" firstAttribute="leading" secondItem="XUl-hB-7sK" secondAttribute="leading" constant="16" id="DfT-hd-kGJ"/>
-                        <constraint firstAttribute="height" constant="48" id="PbS-kQ-gV5"/>
-                        <constraint firstItem="jSr-AR-J79" firstAttribute="centerY" secondItem="XUl-hB-7sK" secondAttribute="centerY" id="Vyp-mE-fhi"/>
-                        <constraint firstAttribute="trailing" secondItem="ojP-eQ-jrF" secondAttribute="trailing" constant="16" id="dl8-tN-s4r"/>
-                        <constraint firstItem="ojP-eQ-jrF" firstAttribute="centerY" secondItem="XUl-hB-7sK" secondAttribute="centerY" id="gBV-sw-UzB"/>
-                        <constraint firstItem="ojP-eQ-jrF" firstAttribute="leading" secondItem="jSr-AR-J79" secondAttribute="trailing" constant="8" id="hCC-Je-57m"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstItem="XUl-hB-7sK" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="7j0-aA-Bvb"/>
-                <constraint firstItem="XUl-hB-7sK" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="90I-i6-lbJ"/>
-                <constraint firstItem="XUl-hB-7sK" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="U19-KS-f2m"/>
-                <constraint firstItem="XUl-hB-7sK" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="skj-Cx-l6w"/>
-            </constraints>
-            <point key="canvasLocation" x="212" y="233.5"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="icon_tips_error_small" width="16" height="16"/>
-    </resources>
-</document>

+ 3 - 24
PDF Office/PDF Master/Class/PDFTools/Compress/Controller/KMCompressWindowController.swift

@@ -112,14 +112,7 @@ class KMCompressWindowController: NSWindowController {
         self.initUIProperty()
         
         smallVC.state = .Checked
-        
-        Task { @MainActor in
-            if await (KMLightMemberManager.manager.canPayFunction() == false) {
-                self.limit = true
-            } else {
-                self.limit = false
-            }
-        }
+         
     }
     
     private func initUIProperty() {
@@ -174,23 +167,9 @@ class KMCompressWindowController: NSWindowController {
             return
         }
         
-        Task { @MainActor in
-            if await (KMLightMemberManager.manager.canPayFunction() == false) {
-                let _ = KMSubscribeWaterMarkWindowController.show(window: self.window!) { isSubscribeSuccess, isWaterMarkExport, isClose in
-                    if (isClose) {
-                        return
-                    }
-                    if (isSubscribeSuccess) {
-                        self._compressButtonAction()
-                    }
-                    if (isWaterMarkExport) {
-                        self._compressButtonAction(limit: true)
-                    }
-                }
-                return
-            }
+        
             self._compressButtonAction()
-        }
+     
     }
     
     func getUniqueFilePath(filePath: String) -> String {

+ 40 - 0
PDF Office/PDF Master/Class/PDFTools/EditPDF/Tools/KMEditPDfHanddler.swift

@@ -13,6 +13,46 @@ import Cocoa
     case close = 2
 }
 
+@objc enum KMSubscribeWaterMarkType: Int {
+    case none       = 0
+    case stamp      = 1
+    case link
+    case sign
+    case editText
+    case editImage
+    case insert
+    case extract
+    case replace
+    case split
+    case delete
+    case rotate
+    case copy
+    case toWord
+    case toExcel
+    case toPPT
+    case toRTF
+    case toCSV
+    case toHTML
+    case toText
+    case toImage
+    case compress
+    case merge
+    case setPassword
+    case removePassword
+    case crop
+    case aiTranslate
+    case aiRewrite
+    case aiCorrect
+    case save
+    
+    func isConvertType() -> Bool {
+        if (self == .toWord || self == .toExcel || self == .toPPT || self == .toRTF || self == .toCSV || self == .toHTML || self == .toText || self == .toImage) {
+            return true
+        }
+        return false
+    }
+}
+
 // EditPDF处理对象
 class KMEditPDfHanddler: NSObject {
     weak var viewC: KMMainViewController?

+ 6 - 49
PDF Office/PDF Master/Class/PDFTools/Merge/OCPart/KMPDFEditAppendWindow.m

@@ -260,15 +260,7 @@ static KMPDFEditAppendWindow *windowController = nil;
 
 - (void)km_windowWillCloseNotifation:(NSNotification *)noti {
     __weak typeof(self) weakSelf = self;
-    BOOL result = [KMLightMemberManager.manager canPayFunction];
-    self.limit = !result;
-        
-    if (result) {
-        self.limitLable.hidden = YES;
-        self.limitTipIv.hidden = YES;
-    } else {
- 
-    }
+    
 }
 
 - (void)windowDidLoad {
@@ -492,32 +484,10 @@ static KMPDFEditAppendWindow *windowController = nil;
     self.limitLable.font = [NSFont SFProTextRegularFont:12];
     self.limitLable.textColor = [NSColor km_initWithHex:@"#F3465B" alpha:1];
     self.limit = NO;
+  
+    self.limitLable.hidden = NO;
+    self.limitTipIv.hidden = NO;
     
-    BOOL result = [KMLightMemberManager.manager canPayFunction];
-    self.limit = !result;
-    
-    if (result) {
-        self.limitLable.hidden = YES;
-        self.limitTipIv.hidden = YES;
-    } else {
-//#if VERSION_DMG
-//        [KMLightMemberManager.manager canUseAdvancedWithNeedNetworking:NO completionHandler:^(BOOL isLogin) {
-//            dispatch_sync(dispatch_get_main_queue(), ^{
-//                if (isLogin) {
-//                    weakSelf.limitLable.hidden = NO;
-//                    weakSelf.limitTipIv.hidden = NO;
-//                } else {
-//                    weakSelf.limitLable.hidden = YES;
-//                    weakSelf.limitTipIv.hidden = YES;
-//                }
-//            });
-//        }];
-//        
-//#else
-        self.limitLable.hidden = NO;
-        self.limitTipIv.hidden = NO;
-//#endif
-    }
 }
 
 - (void)updateButtonState
@@ -1181,19 +1151,9 @@ static KMPDFEditAppendWindow *windowController = nil;
     if (!self.canMerge) {
         return;
     }
-//#if VERSION_DMG
-//    [KMLightMemberManager.manager canUseAdvancedWithNeedNetworking:NO completionHandler:^(BOOL result) {
-//        dispatch_async(dispatch_get_main_queue(), ^{
-//            if (result) {
-//                [self doAppend];
-//            } else {
-//                [KMComparativeTableViewController showWithWindow:self.window :KMComparativeInputTypeMerge inputType:KMSubscribeWaterMarkTypeMerge];
-//            }
-//        });
-//    }];
-//#else
+ 
     [self doAppend];
-//#endif
+ 
 }
 
 - (IBAction)doAppend {
@@ -1769,9 +1729,6 @@ static NSInteger kKMMergeCountMax = 2;
 #if VERSION_DMG
     return NO;
 #else
-    if ([KMLightMemberManager manager].isLogin) {
-        return NO;
-    }
     NSInteger cnt = [self getMergeCount];
     if (cnt >= kKMMergeCountMax) {
         return YES;

+ 1 - 8
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -3067,14 +3067,7 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
     }
     
     func aiTranslationPDFFileAction() {
-#if VERSION_DMG
-#else
-        if !KMLightMemberManager.manager.isLogin() && NSApp.mainWindow != nil {
-            KMLoginWindowController.show(window: NSApp.mainWindow!)
-            
-            return
-        }
-#endif
+ 
         self.trackEvent_aiTranslate()
         self._aiTranslationPDFFileAction()
     }

+ 2 - 2
PDF Office/PDF Master/Class/Preference/Tools/KMPreferenceManager.swift

@@ -2008,9 +2008,9 @@ extension KMPreferenceManager {
     public func initDataForAppLaunch() {
 //        KMPreferenceManager.shared.author = NSFullUserName()
         if (KMPreferenceManager.shared.autoSave) {
-            if KMLightMemberManager.manager.canPayFunction() == false {
+             
                 KMPreferenceManager.shared.autoSave = false
-            }
+       
         }
     }
 }

+ 5 - 24
PDF Office/PDF Master/Class/Welcome/KMWelcomeWindowController.swift

@@ -172,14 +172,8 @@ class KMWelcomeWindowController: NSWindowController {
             box?.contentView?.addSubview(nextButtonVC.view)
             nextButtonVC.view.frame = box?.contentView?.bounds ?? NSZeroRect
             nextButtonVC.view.autoresizingMask = [.width, .height]
-    //        nextButtonVC.stringValue = NSLocalizedString(@"Next");
-            if (KMLightMemberManager.manager.isLogin()) { // let’s start
-                nextButtonVC.stringValue = KMLocalizedString("Let's Start")
-            } else {
-                nextButtonVC.stringValue = KMLocalizedString("Sign up")
-            }
+   
             nextButtonVC.target = self
-    //        nextButtonVC.action = @selector(nextButtonAction:);
             nextButtonVC.action = #selector(_signUpButtonAction)
             
             nextButtonVC.button(type: .Cta, size: .l)
@@ -212,11 +206,7 @@ class KMWelcomeWindowController: NSWindowController {
         self.signUpBox.contentView?.addSubview(self._signUpButtonVC!.view)
         self._signUpButtonVC?.view.frame = self.signUpBox.contentView!.bounds
         self._signUpButtonVC?.view.autoresizingMask = [.width, .height]
-        if (KMLightMemberManager.manager.isLogin()) { // let’s start
-            self._signUpButtonVC?.stringValue = KMLocalizedString("Let's Start")
-        } else {
-            self._signUpButtonVC?.stringValue = KMLocalizedString("Sign up")
-        }
+     
         
         self._signUpButtonVC?.target = self;
         self._signUpButtonVC?.action = #selector(_signUpButtonAction)
@@ -261,11 +251,9 @@ class KMWelcomeWindowController: NSWindowController {
             label.font = NSFont(name: "SFProText-Regular", size: 14)
             label.textColor = NSColor(red: 23.0/255.0, green: 112.0/255.0, blue: 244.0/255.0, alpha: 1)
 
-            if (KMLightMemberManager.manager.isLogin()) {
-                label.isHidden = true
-            } else {
+           
                 label.isHidden = false
-            }
+           
         }
         self.remindMeLaterBox.isHidden = true
     }
@@ -352,14 +340,7 @@ class KMWelcomeWindowController: NSWindowController {
     }
     
     @objc private func _signUpButtonAction() {
-        if (KMLightMemberManager.manager.isLogin()) {
-            self._closeAction()
-        } else {
-            if let callback = self.itemClick {
-                callback(3, self)
-            }
-            self.close()
-        }
+       
     }
     
     private func _closeAction() {

+ 1 - 2
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -1831,8 +1831,7 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
     func pdfViewDidClick(onLink pdfView: CPDFView!, withURL url: String!) {
         if let urlString = url, urlString == kKMPurchaseProductURLString {
             //跳转订阅比较表
-            let _ = KMComparativeTableViewController.show(window: NSApp.mainWindow ?? NSWindow())
-            return
+             return
         }
         
         if url.hasPrefix("smb://") {

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 759
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj


+ 15 - 0
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -2373,6 +2373,21 @@
                   endingLineNumber = "835"
                   offsetFromSymbolStart = "1740">
                </Location>
+               <Location
+                  uuid = "14EF9D11-330E-4DB1-A4D2-AA533CF55782 - ae5dbea256bdda5d"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMMainViewController.removePDFWatermark() -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "835"
+                  endingLineNumber = "835"
+                  offsetFromSymbolStart = "1496">
+               </Location>
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>