From b41479c91e6685511c1f8ba8586106b322073b62 Mon Sep 17 00:00:00 2001 From: Ben Sanders Date: Sun, 2 Aug 2026 09:49:25 -0400 Subject: added statscounter code --- .../lib/sass/uri.rb | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.101.0-arm64-darwin/lib/sass/uri.rb (limited to 'vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.101.0-arm64-darwin/lib/sass/uri.rb') diff --git a/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.101.0-arm64-darwin/lib/sass/uri.rb b/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.101.0-arm64-darwin/lib/sass/uri.rb new file mode 100644 index 0000000..2e0f9b9 --- /dev/null +++ b/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.101.0-arm64-darwin/lib/sass/uri.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +require 'uri' + +module Sass + # The {Uri} class. + # + # It follows RFC3986 to match the behavior of Uri class from Dart. + # + # @see https://www.rfc-editor.org/info/rfc3986/ + module Uri + module_function + + def decode_uri_component(str) + str.b.gsub(/%\h\h/, ::URI::TBLDECWWWCOMP_).force_encoding(str.encoding) + end + + def encode_uri_component(str) + str.b.gsub(/[^0-9A-Za-z\-._~]/n, ::URI::TBLENCURICOMP_).force_encoding(str.encoding) + end + + def encode_uri_path_component(str) + str.b.gsub(%r{[^0-9A-Za-z\-._~!$&'()*+,;=:@/]}n, ::URI::TBLENCURICOMP_).force_encoding(str.encoding) + end + + def encode_uri_query_component(str) + str.b.gsub(%r{[^0-9A-Za-z\-._~!$&'()*+,;=:@/?]}n, ::URI::TBLENCURICOMP_).force_encoding(str.encoding) + end + + def file_uri_to_path(uri) + path = decode_uri_component(::URI::RFC3986_PARSER.parse(uri).path) + if path.start_with?('/') + windows_path = path[1..] + path = windows_path if File.absolute_path?(windows_path) + end + path + end + + def path_to_file_uri(path) + path = "/#{path}" unless path.start_with?('/') + "file://#{encode_uri_path_component(path)}" + end + + def pwd + pwd = Dir.pwd + pwd += '/' unless pwd.end_with?('/') + path_to_file_uri(pwd) + end + + def relative(to, from) + ::URI::RFC3986_PARSER.parse(to).route_from(from).to_s + end + end + + private_constant :Uri +end -- cgit v1.2.3