import Foundation /// The one subframe document the shell serves: chat visuals run their scripts here, under this /// response's policy instead of the page's. The page posts the built visual; it nests it in a /// srcdoc child. Keep in sync with Kotlin and mobile-native-chat-visual-frame-contract.ts. enum MobileWebShellChatVisualFrame { static let path = "/chat-visual-frame" /// NATIVE_CHAT_VISUAL_HOST_CSP without the CDN origins, so visuals load nothing remote (WebRTC is outside /// CSP, as on desktop), behind an opaque-origin sandbox that keeps the page's origin, storage and bridge out. static let csp = [ "sandbox allow-scripts", "default-src 'none'", "script-src 'unsafe-inline' data: blob:", "style-src 'unsafe-inline' data: blob:", "font-src data: blob:", "img-src data: blob:", "connect-src 'none'", "frame-src 'none'", "child-src 'none'", "worker-src 'none'", "object-src 'none'", "media-src 'none'", "manifest-src 'none'", "form-action 'none'", "base-uri about:" ].joined(separator: "; ") static let document = Data("""
""".utf8) }